From 5817812eb2aa6fae9a570a3dfc914f083eab228d Mon Sep 17 00:00:00 2001 From: Kyle Guinn Date: Wed, 1 Feb 2017 21:19:08 -0600 Subject: Fix overlinking/underlinking LAPACK dependencies --- TESTING/EIG/CMakeLists.txt | 2 +- TESTING/LIN/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'TESTING') diff --git a/TESTING/EIG/CMakeLists.txt b/TESTING/EIG/CMakeLists.txt index 19fffcd4..d4577133 100644 --- a/TESTING/EIG/CMakeLists.txt +++ b/TESTING/EIG/CMakeLists.txt @@ -119,7 +119,7 @@ set(ZEIGTST zchkee.f macro(add_eig_executable name) add_executable(${name} ${ARGN}) - target_link_libraries(${name} tmglib ${LAPACK_LIBRARIES}) + target_link_libraries(${name} tmglib ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES}) endmacro() if(BUILD_SINGLE) diff --git a/TESTING/LIN/CMakeLists.txt b/TESTING/LIN/CMakeLists.txt index 27ee2659..7749d15b 100644 --- a/TESTING/LIN/CMakeLists.txt +++ b/TESTING/LIN/CMakeLists.txt @@ -207,7 +207,7 @@ set(ZLINTSTRFP zchkrfp.f zdrvrfp.f zdrvrf1.f zdrvrf2.f zdrvrf3.f zdrvrf4.f zerrr macro(add_lin_executable name) add_executable(${name} ${ARGN}) - target_link_libraries(${name} tmglib ${LAPACK_LIBRARIES}) + target_link_libraries(${name} tmglib ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES}) endmacro() if(BUILD_SINGLE) -- cgit v1.2.3 From c2f0429d7bf15a588f4a2a4e844a7c91212efbfc Mon Sep 17 00:00:00 2001 From: Kyle Guinn Date: Fri, 3 Feb 2017 00:25:30 -0600 Subject: 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. --- TESTING/MATGEN/CMakeLists.txt | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'TESTING') diff --git a/TESTING/MATGEN/CMakeLists.txt b/TESTING/MATGEN/CMakeLists.txt index 54cf9d9e..3a38ea18 100644 --- a/TESTING/MATGEN/CMakeLists.txt +++ b/TESTING/MATGEN/CMakeLists.txt @@ -51,25 +51,22 @@ set(ZMATGEN zlatms.f zlatme.f zlatmr.f zlatmt.f zlagge.f zlaghe.f zlagsy.f zlakf2.f zlarge.f zlaror.f zlarot.f zlatm1.f zlarnd.f zlatm2.f zlatm3.f zlatm5.f zlatm6.f zlahilb.f) + +set(SOURCES) if(BUILD_SINGLE) - set(ALLOBJ ${SMATGEN} ${SCATGEN}) + list(APPEND SOURCES ${SMATGEN} ${SCATGEN}) endif() if(BUILD_DOUBLE) - set(ALLOBJ ${ALLOBJ} ${DMATGEN} ${DZATGEN}) + list(APPEND SOURCES ${DMATGEN} ${DZATGEN}) endif() if(BUILD_COMPLEX) - set(ALLOBJ ${ALLOBJ} ${CMATGEN} ${SCATGEN}) + list(APPEND SOURCES ${CMATGEN} ${SCATGEN}) endif() if(BUILD_COMPLEX16) - set(ALLOBJ ${ALLOBJ} ${ZMATGEN} ${DZATGEN}) + list(APPEND SOURCES ${ZMATGEN} ${DZATGEN}) endif() +list(REMOVE_DUPLICATES SOURCES) -if(NOT ALLOBJ) - set(ALLOBJ ${SMATGEN} ${CMATGEN} ${SCATGEN} ${DMATGEN} ${ZMATGEN} - ${DZATGEN}) -else() - list(REMOVE_DUPLICATES ALLOBJ) -endif() -add_library(tmglib ${ALLOBJ}) +add_library(tmglib ${SOURCES}) target_link_libraries(tmglib ${LAPACK_LIBRARIES}) lapack_install_library(tmglib) -- cgit v1.2.3 From decbedea650acbe947d33d642115988f361f0ccd Mon Sep 17 00:00:00 2001 From: Kyle Guinn Date: Fri, 3 Feb 2017 02:04:18 -0600 Subject: Remove duplicate sources ${SECOND_SRC} and ${DSECOND_SRC} are already included in LAPACK, so no need to link them again. --- TESTING/EIG/CMakeLists.txt | 12 ++++-------- TESTING/LIN/CMakeLists.txt | 20 ++++++++++---------- 2 files changed, 14 insertions(+), 18 deletions(-) (limited to 'TESTING') diff --git a/TESTING/EIG/CMakeLists.txt b/TESTING/EIG/CMakeLists.txt index d4577133..2c41999d 100644 --- a/TESTING/EIG/CMakeLists.txt +++ b/TESTING/EIG/CMakeLists.txt @@ -123,21 +123,17 @@ macro(add_eig_executable name) endmacro() if(BUILD_SINGLE) -add_eig_executable(xeigtsts ${SEIGTST} ${SCIGTST} ${AEIGTST} - ${SECOND_SRC}) +add_eig_executable(xeigtsts ${SEIGTST} ${SCIGTST} ${AEIGTST}) endif() if(BUILD_COMPLEX) -add_eig_executable(xeigtstc ${CEIGTST} ${SCIGTST} ${AEIGTST} - ${SECOND_SRC}) +add_eig_executable(xeigtstc ${CEIGTST} ${SCIGTST} ${AEIGTST}) endif() if(BUILD_DOUBLE) -add_eig_executable(xeigtstd ${DEIGTST} ${DZIGTST} ${AEIGTST} - ${DSECOND_SRC}) +add_eig_executable(xeigtstd ${DEIGTST} ${DZIGTST} ${AEIGTST}) endif() if(BUILD_COMPLEX16) -add_eig_executable(xeigtstz ${ZEIGTST} ${DZIGTST} ${AEIGTST} - ${DSECOND_SRC}) +add_eig_executable(xeigtstz ${ZEIGTST} ${DZIGTST} ${AEIGTST}) endif() diff --git a/TESTING/LIN/CMakeLists.txt b/TESTING/LIN/CMakeLists.txt index 7749d15b..04a6036f 100644 --- a/TESTING/LIN/CMakeLists.txt +++ b/TESTING/LIN/CMakeLists.txt @@ -211,29 +211,29 @@ macro(add_lin_executable name) endmacro() if(BUILD_SINGLE) - add_lin_executable(xlintsts ${ALINTST} ${SCLNTST} ${SLINTST} ${SECOND_SRC}) - add_lin_executable(xlintstrfs ${SLINTSTRFP} ${SECOND_SRC}) + add_lin_executable(xlintsts ${ALINTST} ${SLINTST} ${SCLNTST}) + add_lin_executable(xlintstrfs ${SLINTSTRFP}) endif() if(BUILD_DOUBLE) - add_lin_executable(xlintstd ${ALINTST} ${DLINTST} ${DZLNTST} ${DSECOND_SRC}) - add_lin_executable(xlintstrfd ${DLINTSTRFP} ${DSECOND_SRC}) + add_lin_executable(xlintstd ${ALINTST} ${DLINTST} ${DZLNTST}) + add_lin_executable(xlintstrfd ${DLINTSTRFP}) endif() if(BUILD_SINGLE AND BUILD_DOUBLE) - add_lin_executable(xlintstds ${DSLINTST} ${SECOND_SRC} ${DSECOND_SRC}) + add_lin_executable(xlintstds ${DSLINTST}) endif() if(BUILD_COMPLEX) - add_lin_executable(xlintstc ${ALINTST} ${CLINTST} ${SCLNTST} ${SECOND_SRC}) - add_lin_executable(xlintstrfc ${CLINTSTRFP} ${SECOND_SRC}) + add_lin_executable(xlintstc ${ALINTST} ${CLINTST} ${SCLNTST}) + add_lin_executable(xlintstrfc ${CLINTSTRFP}) endif() if(BUILD_COMPLEX16) - add_lin_executable(xlintstz ${ALINTST} ${ZLINTST} ${DZLNTST} ${DSECOND_SRC}) - add_lin_executable(xlintstrfz ${ZLINTSTRFP} ${DSECOND_SRC}) + add_lin_executable(xlintstz ${ALINTST} ${ZLINTST} ${DZLNTST}) + add_lin_executable(xlintstrfz ${ZLINTSTRFP}) endif() if(BUILD_COMPLEX AND BUILD_COMPLEX16) - add_lin_executable(xlintstzc ${ZCLINTST} ${SECOND_SRC} ${DSECOND_SRC}) + add_lin_executable(xlintstzc ${ZCLINTST}) endif() -- cgit v1.2.3 From 44cd01fd33a6aa783e7244bf9ecf236c06d411f7 Mon Sep 17 00:00:00 2001 From: Kyle Guinn Date: Fri, 3 Feb 2017 21:05:09 -0600 Subject: Strip out comments that don't apply --- TESTING/EIG/CMakeLists.txt | 25 ++----------------------- TESTING/EIG/Makefile | 5 ++--- TESTING/MATGEN/CMakeLists.txt | 24 ++---------------------- TESTING/MATGEN/Makefile | 5 ++--- 4 files changed, 8 insertions(+), 51 deletions(-) (limited to 'TESTING') diff --git a/TESTING/EIG/CMakeLists.txt b/TESTING/EIG/CMakeLists.txt index 2c41999d..20fd25b4 100644 --- a/TESTING/EIG/CMakeLists.txt +++ b/TESTING/EIG/CMakeLists.txt @@ -3,34 +3,13 @@ # The test files are organized as follows: # # AEIGTST -- Auxiliary test routines used in all precisions -# SCIGTST -- Auxiliary test routines used in REAL and COMPLEX -# DZIGTST -- Auxiliary test routines used in DOUBLE PRECISION and -# COMPLEX*16 +# SCIGTST -- Auxiliary test routines used in single precision +# DZIGTST -- Auxiliary test routines used in double precision # SEIGTST -- Single precision real test routines # CEIGTST -- Single precision complex test routines # DEIGTST -- Double precision real test routines # ZEIGTST -- Double precision complex test routines # -# Test programs can be generated for all or some of the four different -# precisions. Enter make followed by one or more of the data types -# desired. Some examples: -# make single -# make single complex -# make single double complex complex16 -# Alternatively, the command -# make -# without any arguments creates all four test programs. -# The executable files are called -# xeigtsts, xeigtstd, xeigtstc, and xeigtstz -# and are created in the next higher directory level. -# -# To remove the object files after the executable files have been -# created, enter -# make clean -# On some systems, you can force the source files to be recompiled by -# entering (for example) -# make single FRC=FRC -# ######################################################################## set(AEIGTST diff --git a/TESTING/EIG/Makefile b/TESTING/EIG/Makefile index eef087d9..1de4a737 100644 --- a/TESTING/EIG/Makefile +++ b/TESTING/EIG/Makefile @@ -5,9 +5,8 @@ include ../../make.inc # The test files are organized as follows: # # AEIGTST -- Auxiliary test routines used in all precisions -# SCIGTST -- Auxiliary test routines used in REAL and COMPLEX -# DZIGTST -- Auxiliary test routines used in DOUBLE PRECISION and -# COMPLEX*16 +# SCIGTST -- Auxiliary test routines used in single precision +# DZIGTST -- Auxiliary test routines used in double precision # SEIGTST -- Single precision real test routines # CEIGTST -- Single precision complex test routines # DEIGTST -- Double precision real test routines diff --git a/TESTING/MATGEN/CMakeLists.txt b/TESTING/MATGEN/CMakeLists.txt index 3a38ea18..0fd12df8 100644 --- a/TESTING/MATGEN/CMakeLists.txt +++ b/TESTING/MATGEN/CMakeLists.txt @@ -2,33 +2,13 @@ # This is the makefile to create a library of the test matrix # generators used in LAPACK. The files are organized as follows: # -# SCATGEN -- Auxiliary routines called from both REAL and COMPLEX -# DZATGEN -- Auxiliary routines called from both DOUBLE PRECISION -# and COMPLEX*16 +# SCATGEN -- Auxiliary routines called from single precision +# DZATGEN -- Auxiliary routines called from double precision # SMATGEN -- Single precision real matrix generation routines # CMATGEN -- Single precision complex matrix generation routines # DMATGEN -- Double precision real matrix generation routines # ZMATGEN -- Double precision complex matrix generation routines # -# The library can be set up to include routines for any combination -# of the four precisions. To create or add to the library, enter make -# followed by one or more of the precisions desired. Some examples: -# make single -# make single complex -# make single double complex complex16 -# Alternatively, the command -# make -# without any arguments creates a library of all four precisions. -# The library is called -# tmglib.a -# and is created at the LAPACK directory level. -# -# To remove the object files after the library is created, enter -# make clean -# On some systems, you can force the source files to be recompiled by -# entering (for example) -# make single FRC=FRC -# ####################################################################### set(SCATGEN slatm1.f slatm7.f slaran.f slarnd.f) diff --git a/TESTING/MATGEN/Makefile b/TESTING/MATGEN/Makefile index 28cabc1e..4cc69f7e 100644 --- a/TESTING/MATGEN/Makefile +++ b/TESTING/MATGEN/Makefile @@ -4,9 +4,8 @@ include ../../make.inc # This is the makefile to create a library of the test matrix # generators used in LAPACK. The files are organized as follows: # -# SCATGEN -- Auxiliary routines called from both REAL and COMPLEX -# DZATGEN -- Auxiliary routines called from both DOUBLE PRECISION -# and COMPLEX*16 +# SCATGEN -- Auxiliary routines called from single precision +# DZATGEN -- Auxiliary routines called from double precision # SMATGEN -- Single precision real matrix generation routines # CMATGEN -- Single precision complex matrix generation routines # DMATGEN -- Double precision real matrix generation routines -- cgit v1.2.3