diff --git a/CMakeLists.txt b/CMakeLists.txt index 41cb52b23..b8e1d6ad1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -66,6 +66,19 @@ foreach (DBLAS_OBJ ${DBLAS_OBJS}) set_target_properties(${DBLAS_OBJ} PROPERTIES COMPILE_DEFINITIONS "${PREV_DEFS};DOUBLE") list(APPEND TARGET_OBJS "$") endforeach () + +# netlib: + +# Can't just use lapack-netlib's CMake files, since they are set up to search for BLAS, build and install a binary. We just want to build a couple of lib files out of lapack and lapacke. + +# N.B. if a source is added or removed you MUST re-run the cmake command manually; make will not do it. +file(GLOB DLA_SOURCES "${NETLIB_LAPACK_DIR}/SRC/d*.f") + +add_library(DLA_OBJ OBJECT ${DLA_SOURCES}) +set_target_properties(${DLA_OBJ} PROPERTIES COMPILE_FLAGS ${LAPACK_FFLAGS}) +list(APPEND TARGET_OBJS "$") + +# add objects to the openblas lib add_library(openblas ${TARGET_OBJS}) # TODO: Why is the config saved here? Is this necessary with CMake? diff --git a/cmake/utils.cmake b/cmake/utils.cmake index 9b5d7de14..a6952c833 100644 --- a/cmake/utils.cmake +++ b/cmake/utils.cmake @@ -128,7 +128,7 @@ function(GenerateNamedObjects sources_in float_type_in) list(APPEND obj_defines "CBLAS") endif () - list(APPEND obj_defines "ASMNAME=${FU}${obj_name};ASMFNAME=${FU}${obj_name}${BU};NAME=${obj_name}${BU};CNAME=${obj_name};CAR_NAME=\"${obj_name}${BU}\";CHAR_CNAME=\"${obj_name}\"") + list(APPEND obj_defines "ASMNAME=${FU}${obj_name};ASMFNAME=${FU}${obj_name}${BU};NAME=${obj_name}${BU};CNAME=${obj_name};CHAR_NAME=\"${obj_name}${BU}\";CHAR_CNAME=\"${obj_name}\"") list(APPEND obj_defines ${defines_in}) list(APPEND obj_defines ${float_type_in})