Added DLA sources from lapack-netlib.
authorHank Anderson <hank.p.anderson@gmail.com>
Tue, 10 Feb 2015 17:01:01 +0000 (11:01 -0600)
committerHank Anderson <hank.p.anderson@gmail.com>
Tue, 10 Feb 2015 17:01:01 +0000 (11:01 -0600)
Can't use the lapack-netlib cmake files, since they are designed to
build a complete lapack/blas library. They have their own fortran
detection and flag setup and so on. Instead I'll just recreate the
makefiles I need.

Fixed a typo in the NAME defines.

CMakeLists.txt
cmake/utils.cmake

index 41cb52b..b8e1d6a 100644 (file)
@@ -66,6 +66,19 @@ foreach (DBLAS_OBJ ${DBLAS_OBJS})
   set_target_properties(${DBLAS_OBJ} PROPERTIES COMPILE_DEFINITIONS "${PREV_DEFS};DOUBLE")
   list(APPEND TARGET_OBJS "$<TARGET_OBJECTS:${DBLAS_OBJ}>")
 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 "$<TARGET_OBJECTS:DLA_OBJ>")
+
+# add objects to the openblas lib
 add_library(openblas ${TARGET_OBJS})
 
 # TODO: Why is the config saved here? Is this necessary with CMake?
index 9b5d7de..a6952c8 100644 (file)
@@ -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})