summaryrefslogtreecommitdiff
path: root/BLAS
diff options
context:
space:
mode:
authorKyle Guinn <elyk03@gmail.com>2017-02-03 00:25:30 -0600
committerKyle Guinn <elyk03@gmail.com>2017-02-03 00:25:30 -0600
commitc2f0429d7bf15a588f4a2a4e844a7c91212efbfc (patch)
tree27e7b29c750ed7d782ae3aa115ad6a3864f5e1db /BLAS
parente64606d9f0823a46bd83b46decd03b996867a1bf (diff)
downloadlapack-c2f0429d7bf15a588f4a2a4e844a7c91212efbfc.tar.gz
lapack-c2f0429d7bf15a588f4a2a4e844a7c91212efbfc.tar.bz2
lapack-c2f0429d7bf15a588f4a2a4e844a7c91212efbfc.zip
Use appending to create lists of source files
Allows any combination of types/precisions to be built at once. Name the lists "SOURCES" instead of "ALLOBJ" since they contain lists of source files, not object files. Fix problems in BLAS: Was missing the ${CBLAS3} file set when building with BLAS_COMPLEX. Was adding ${BLASLIB} as if it were a source file.
Diffstat (limited to 'BLAS')
-rw-r--r--BLAS/SRC/CMakeLists.txt22
1 files changed, 8 insertions, 14 deletions
diff --git a/BLAS/SRC/CMakeLists.txt b/BLAS/SRC/CMakeLists.txt
index b9f722d6..42930279 100644
--- a/BLAS/SRC/CMakeLists.txt
+++ b/BLAS/SRC/CMakeLists.txt
@@ -113,30 +113,24 @@ set(DBLAS3 dgemm.f dsymm.f dsyrk.f dsyr2k.f dtrmm.f dtrsm.f)
set(ZBLAS3 zgemm.f zsymm.f zsyrk.f zsyr2k.f ztrmm.f ztrsm.f
zhemm.f zherk.f zher2k.f)
-# default build all of it
-set(ALLOBJ ${SBLAS1} ${SBLAS2} ${SBLAS3} ${DBLAS1} ${DBLAS2} ${DBLAS3}
- ${CBLAS1} ${CBLAS2} ${CBLAS3} ${ZBLAS1}
- ${ZBLAS2} ${ZBLAS3} ${ALLBLAS})
+
+set(SOURCES)
if(BLAS_SINGLE)
- set(ALLOBJ ${SBLAS1} ${ALLBLAS}
- ${SBLAS2} ${SBLAS3})
+ list(APPEND SOURCES ${SBLAS1} ${ALLBLAS} ${SBLAS2} ${SBLAS3})
endif()
if(BLAS_DOUBLE)
- set(ALLOBJ ${DBLAS1} ${ALLBLAS}
- ${DBLAS2} ${DBLAS3})
+ list(APPEND SOURCES ${DBLAS1} ${ALLBLAS} ${DBLAS2} ${DBLAS3})
endif()
if(BLAS_COMPLEX)
- set(ALLOBJ ${BLASLIB} ${CBLAS1} ${CB1AUX}
- ${ALLBLAS} ${CBLAS2})
+ list(APPEND SOURCES ${CBLAS1} ${CB1AUX} ${ALLBLAS} ${CBLAS2} ${CBLAS3})
endif()
if(BLAS_COMPLEX16)
- set(ALLOBJ ${BLASLIB} ${ZBLAS1} ${ZB1AUX}
- ${ALLBLAS} ${ZBLAS2} ${ZBLAS3})
+ list(APPEND SOURCES ${ZBLAS1} ${ZB1AUX} ${ALLBLAS} ${ZBLAS2} ${ZBLAS3})
endif()
+list(REMOVE_DUPLICATES SOURCES)
-
-add_library(blas ${ALLOBJ})
+add_library(blas ${SOURCES})
set_target_properties(
blas PROPERTIES
VERSION ${LAPACK_VERSION}