diff options
author | langou <julien.langou@ucdenver.edu> | 2017-02-04 10:04:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-04 10:04:29 +0100 |
commit | 48a80fb7cb409d7b9f23c75af03236a35d0e67cd (patch) | |
tree | 1cb751c4efcc3239ee9ac642f9b4fc55ff0a830b /LAPACKE | |
parent | cabb28f2b07b709c20f18d928cbf054ccb076c24 (diff) | |
parent | 44cd01fd33a6aa783e7244bf9ecf236c06d411f7 (diff) | |
download | lapack-48a80fb7cb409d7b9f23c75af03236a35d0e67cd.tar.gz lapack-48a80fb7cb409d7b9f23c75af03236a35d0e67cd.tar.bz2 lapack-48a80fb7cb409d7b9f23c75af03236a35d0e67cd.zip |
Merge pull request #119 from turboencabulator/cleanup
Linking fixes
Diffstat (limited to 'LAPACKE')
-rw-r--r-- | LAPACKE/CMakeLists.txt | 44 | ||||
-rw-r--r-- | LAPACKE/example/CMakeLists.txt | 8 | ||||
-rw-r--r-- | LAPACKE/lapacke.pc.in | 2 | ||||
-rw-r--r-- | LAPACKE/src/CMakeLists.txt | 62 | ||||
-rw-r--r-- | LAPACKE/src/Makefile | 35 | ||||
-rw-r--r-- | LAPACKE/utils/CMakeLists.txt | 2 |
6 files changed, 79 insertions, 74 deletions
diff --git a/LAPACKE/CMakeLists.txt b/LAPACKE/CMakeLists.txt index 2a60a1ea..d9a85ee6 100644 --- a/LAPACKE/CMakeLists.txt +++ b/LAPACKE/CMakeLists.txt @@ -36,23 +36,35 @@ macro(append_subdir_files variable dirname) endmacro() append_subdir_files(LAPACKE_INCLUDE "include") -append_subdir_files(SRC_OBJ "src") -append_subdir_files(SRCX_OBJ "src") -append_subdir_files(MATGEN_OBJ "src") -append_subdir_files(UTILS_OBJ "utils") +append_subdir_files(SOURCES "src") +append_subdir_files(DEPRECATED "src") +append_subdir_files(EXTENDED "src") +append_subdir_files(MATGEN "src") +append_subdir_files(UTILS "utils") +if(BUILD_DEPRECATED) + list(APPEND SOURCES ${DEPRECATED}) +endif() if(USE_XBLAS) - add_library(lapacke ${SRC_OBJ} ${SRCX_OBJ} ${UTILS_OBJ}) - target_link_libraries(lapacke ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES} ${XBLAS_LIBRARY}) -else() - if(LAPACKE_WITH_TMG) - add_library(lapacke ${SRC_OBJ} ${MATGEN_OBJ} ${UTILS_OBJ}) - target_link_libraries(lapacke tmglib ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES}) - else() - add_library(lapacke ${SRC_OBJ} ${UTILS_OBJ}) - target_link_libraries(lapacke ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES}) - endif() + list(APPEND SOURCES ${EXTENDED}) +endif() +if(LAPACKE_WITH_TMG) + list(APPEND SOURCES ${MATGEN}) +endif() +list(APPEND SOURCES ${UTILS}) + +add_library(lapacke ${SOURCES}) +set_target_properties( + lapacke PROPERTIES + LINKER_LANGUAGE C + VERSION ${LAPACK_VERSION} + SOVERSION ${LAPACK_MAJOR_VERSION} + ) + +if(LAPACKE_WITH_TMG) + target_link_libraries(lapacke PRIVATE tmglib) endif() +target_link_libraries(lapacke PRIVATE ${LAPACK_LIBRARIES}) lapack_install_library(lapacke) install(FILES ${LAPACKE_INCLUDE} ${LAPACK_BINARY_DIR}/include/lapacke_mangling.h DESTINATION include) @@ -78,8 +90,8 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/lapacke-config-install.cmake.in install(FILES ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/lapacke-config.cmake ${LAPACK_BINARY_DIR}/lapacke-config-version.cmake - DESTINATION ${LIBRARY_DIR}/cmake/lapacke-${LAPACK_VERSION} + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/lapacke-${LAPACK_VERSION} ) install(EXPORT lapacke-targets - DESTINATION ${LIBRARY_DIR}/cmake/lapacke-${LAPACK_VERSION}) + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/lapacke-${LAPACK_VERSION}) diff --git a/LAPACKE/example/CMakeLists.txt b/LAPACKE/example/CMakeLists.txt index a1c59096..fa75c731 100644 --- a/LAPACKE/example/CMakeLists.txt +++ b/LAPACKE/example/CMakeLists.txt @@ -3,10 +3,10 @@ add_executable(xexample_DGESV_colmajor example_DGESV_colmajor.c lapacke_example_ add_executable(xexample_DGELS_rowmajor example_DGELS_rowmajor.c lapacke_example_aux.c lapacke_example_aux.h) add_executable(xexample_DGELS_colmajor example_DGELS_colmajor.c lapacke_example_aux.c lapacke_example_aux.h) -target_link_libraries(xexample_DGESV_rowmajor lapacke ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES}) -target_link_libraries(xexample_DGESV_colmajor lapacke ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES}) -target_link_libraries(xexample_DGELS_rowmajor lapacke ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES}) -target_link_libraries(xexample_DGELS_colmajor lapacke ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES}) +target_link_libraries(xexample_DGESV_rowmajor lapacke) +target_link_libraries(xexample_DGESV_colmajor lapacke) +target_link_libraries(xexample_DGELS_rowmajor lapacke) +target_link_libraries(xexample_DGELS_colmajor lapacke) add_test(example_DGESV_rowmajor ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/xexample_DGESV_rowmajor) add_test(example_DGESV_colmajor ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/xexample_DGESV_colmajor) diff --git a/LAPACKE/lapacke.pc.in b/LAPACKE/lapacke.pc.in index 028f8da6..e4b83569 100644 --- a/LAPACKE/lapacke.pc.in +++ b/LAPACKE/lapacke.pc.in @@ -6,4 +6,4 @@ Description: C Standard Interface to LAPACK Linear Algebra PACKage Version: @LAPACK_VERSION@ URL: http://www.netlib.org/lapack/#_standard_c_language_apis_for_lapack Libs: -L${libdir} -llapacke -Requires: lapack blas +Requires.private: lapack diff --git a/LAPACKE/src/CMakeLists.txt b/LAPACKE/src/CMakeLists.txt index 82be4267..846d52ae 100644 --- a/LAPACKE/src/CMakeLists.txt +++ b/LAPACKE/src/CMakeLists.txt @@ -1,6 +1,4 @@ -#aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR} SRC_OBJ) - -set(SRC_OBJ +set(SOURCES lapacke_cbbcsd.c lapacke_cbbcsd_work.c lapacke_cbdsqr.c @@ -2278,36 +2276,34 @@ lapacke_csyr_work.c lapacke_ilaver.c ) -if(BUILD_DEPRECATED) - list(APPEND SRC_OBJ - lapacke_cggsvp.c - lapacke_cggsvp_work.c - lapacke_dggsvp.c - lapacke_dggsvp_work.c - lapacke_sggsvp.c - lapacke_sggsvp_work.c - lapacke_zggsvp.c - lapacke_zggsvp_work.c - lapacke_cggsvd.c - lapacke_cggsvd_work.c - lapacke_dggsvd.c - lapacke_dggsvd_work.c - lapacke_sggsvd.c - lapacke_sggsvd_work.c - lapacke_zggsvd.c - lapacke_zggsvd_work.c - lapacke_cgeqpf.c - lapacke_cgeqpf_work.c - lapacke_dgeqpf.c - lapacke_dgeqpf_work.c - lapacke_sgeqpf.c - lapacke_sgeqpf_work.c - lapacke_zgeqpf.c - lapacke_zgeqpf_work.c) - message(STATUS "Building LAPACKE deprecated routines") -endif() +set(DEPRECATED +lapacke_cggsvp.c +lapacke_cggsvp_work.c +lapacke_dggsvp.c +lapacke_dggsvp_work.c +lapacke_sggsvp.c +lapacke_sggsvp_work.c +lapacke_zggsvp.c +lapacke_zggsvp_work.c +lapacke_cggsvd.c +lapacke_cggsvd_work.c +lapacke_dggsvd.c +lapacke_dggsvd_work.c +lapacke_sggsvd.c +lapacke_sggsvd_work.c +lapacke_zggsvd.c +lapacke_zggsvd_work.c +lapacke_cgeqpf.c +lapacke_cgeqpf_work.c +lapacke_dgeqpf.c +lapacke_dgeqpf_work.c +lapacke_sgeqpf.c +lapacke_sgeqpf_work.c +lapacke_zgeqpf.c +lapacke_zgeqpf_work.c +) -set(SRCX_OBJ +set(EXTENDED lapacke_cgbrfsx.c lapacke_cporfsx.c lapacke_dgerfsx.c lapacke_sgbrfsx.c lapacke_ssyrfsx.c lapacke_zherfsx.c lapacke_cgbrfsx_work.c lapacke_cporfsx_work.c lapacke_dgerfsx_work.c lapacke_sgbrfsx_work.c lapacke_ssyrfsx_work.c lapacke_zherfsx_work.c lapacke_cgerfsx.c lapacke_csyrfsx.c lapacke_dporfsx.c lapacke_sgerfsx.c lapacke_zgbrfsx.c lapacke_zporfsx.c @@ -2323,7 +2319,7 @@ lapacke_chesvxx_work.c lapacke_dgbsvxx_work.c lapacke_dsysvxx_work.c lapacke_ ) # FILE PARTS OF TMGLIB -set(MATGEN_OBJ +set(MATGEN lapacke_clatms.c lapacke_clatms_work.c lapacke_dlatms.c diff --git a/LAPACKE/src/Makefile b/LAPACKE/src/Makefile index a7898d58..8297546b 100644 --- a/LAPACKE/src/Makefile +++ b/LAPACKE/src/Makefile @@ -32,12 +32,12 @@ ############################################################################## # makefile for LAPACKE, used to build lapacke binary. # -# Note: we use multiple SRC_OBJA, SRC_OBJB, etc, instead of a single SRC_OBJ +# Note: we use multiple OBJ_A, OBJ_B, etc, instead of a single OBJ # to allow build with mingw (argument list too long for the msys ar) # include ../../make.inc -SRC_OBJA = \ +OBJ_A = \ lapacke_cbbcsd.o \ lapacke_cbbcsd_work.o \ lapacke_cbdsqr.o \ @@ -1097,7 +1097,7 @@ lapacke_dsytri2x.o \ lapacke_dsytri2x_work.o \ lapacke_dsytri_work.o -SRC_OBJB = \ +OBJ_B = \ lapacke_dsytrs.o \ lapacke_dsytrs_rook.o \ lapacke_dsytrs2.o \ @@ -2322,7 +2322,8 @@ lapacke_zsyr_work.o \ lapacke_csyr_work.o \ lapacke_ilaver.o -DEPRECSRC = \ +ifdef BUILD_DEPRECATED +DEPRECATED = \ lapacke_cggsvp.o \ lapacke_cggsvp_work.o \ lapacke_dggsvp.o \ @@ -2347,8 +2348,10 @@ lapacke_sgeqpf.o \ lapacke_sgeqpf_work.o \ lapacke_zgeqpf.o \ lapacke_zgeqpf_work.o +endif -SRCX_OBJ = \ +ifdef USEXBLAS +EXTENDED = \ lapacke_cgbrfsx.o lapacke_cporfsx.o lapacke_dgerfsx.o lapacke_sgbrfsx.o lapacke_ssyrfsx.o lapacke_zherfsx.o \ lapacke_cgbrfsx_work.o lapacke_cporfsx_work.o lapacke_dgerfsx_work.o lapacke_sgbrfsx_work.o lapacke_ssyrfsx_work.o lapacke_zherfsx_work.o \ lapacke_cgerfsx.o lapacke_csyrfsx.o lapacke_dporfsx.o lapacke_sgerfsx.o lapacke_zgbrfsx.o lapacke_zporfsx.o \ @@ -2361,10 +2364,11 @@ lapacke_cgesvxx.o lapacke_csysvxx.o lapacke_dposvxx.o lapacke_ lapacke_cgesvxx_work.o lapacke_csysvxx_work.o lapacke_dposvxx_work.o lapacke_sgesvxx_work.o lapacke_zgbsvxx_work.o lapacke_zposvxx_work.o \ lapacke_chesvxx.o lapacke_dgbsvxx.o lapacke_dsysvxx.o lapacke_sposvxx.o lapacke_zgesvxx.o lapacke_zsysvxx.o \ lapacke_chesvxx_work.o lapacke_dgbsvxx_work.o lapacke_dsysvxx_work.o lapacke_sposvxx_work.o lapacke_zgesvxx_work.o lapacke_zsysvxx_work.o +endif - +ifdef LAPACKE_WITH_TMG # FILE PARTS OF TMGLIB -MATGEN_OBJ = \ +MATGEN = \ lapacke_clatms.o \ lapacke_clatms_work.o \ lapacke_dlatms.o \ @@ -2393,23 +2397,16 @@ lapacke_slagsy.o \ lapacke_slagsy_work.o \ lapacke_zlagsy.o \ lapacke_zlagsy_work.o - -ifdef USEXBLAS -ALLXOBJ = $(SRCX_OBJ) -endif - -ifdef BUILD_DEPRECATED -DEPRECATED = $(DEPRECSRC) endif all: ../../$(LAPACKELIB) -../../$(LAPACKELIB): $(SRC_OBJA) $(SRC_OBJB) $(MATGEN_OBJ) $(ALLXOBJ) $(DEPRECATED) - $(ARCH) $(ARCHFLAGS) $@ $(SRC_OBJA) - $(ARCH) $(ARCHFLAGS) $@ $(SRC_OBJB) - $(ARCH) $(ARCHFLAGS) $@ $(MATGEN_OBJ) - $(ARCH) $(ARCHFLAGS) $@ $(ALLXOBJ) +../../$(LAPACKELIB): $(OBJ_A) $(OBJ_B) $(DEPRECATED) $(EXTENDED) $(MATGEN) + $(ARCH) $(ARCHFLAGS) $@ $(OBJ_A) + $(ARCH) $(ARCHFLAGS) $@ $(OBJ_B) $(ARCH) $(ARCHFLAGS) $@ $(DEPRECATED) + $(ARCH) $(ARCHFLAGS) $@ $(EXTENDED) + $(ARCH) $(ARCHFLAGS) $@ $(MATGEN) $(RANLIB) $@ .c.o: diff --git a/LAPACKE/utils/CMakeLists.txt b/LAPACKE/utils/CMakeLists.txt index c8b8511e..dd36ee33 100644 --- a/LAPACKE/utils/CMakeLists.txt +++ b/LAPACKE/utils/CMakeLists.txt @@ -1,4 +1,4 @@ -set(UTILS_OBJ +set(UTILS lapacke_c_nancheck.c lapacke_ctr_trans.c lapacke_make_complex_float.c lapacke_zgb_nancheck.c lapacke_cgb_nancheck.c lapacke_d_nancheck.c lapacke_s_nancheck.c lapacke_zgb_trans.c lapacke_cgb_trans.c lapacke_dgb_nancheck.c lapacke_sgb_nancheck.c lapacke_zge_nancheck.c |