From 0ebb712165267a7fd305795588d3e4323a93dea2 Mon Sep 17 00:00:00 2001 From: Kyle Guinn Date: Wed, 1 Feb 2017 21:10:58 -0600 Subject: Fix overlinking CBLAS dependencies --- CBLAS/cblas.pc.in | 2 +- CBLAS/examples/CMakeLists.txt | 2 +- CBLAS/src/CMakeLists.txt | 2 +- CBLAS/testing/CMakeLists.txt | 22 +++++++++++----------- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/CBLAS/cblas.pc.in b/CBLAS/cblas.pc.in index 4a938fe1..7cf09f21 100644 --- a/CBLAS/cblas.pc.in +++ b/CBLAS/cblas.pc.in @@ -6,4 +6,4 @@ Description: C Standard Interface to BLAS Basic Linear Algebra Subprograms Version: @LAPACK_VERSION@ URL: http://www.netlib.org/blas/#_cblas Libs: -L${libdir} -lcblas -Requires: blas +Requires.private: blas diff --git a/CBLAS/examples/CMakeLists.txt b/CBLAS/examples/CMakeLists.txt index a4bab6be..0241fd16 100644 --- a/CBLAS/examples/CMakeLists.txt +++ b/CBLAS/examples/CMakeLists.txt @@ -1,7 +1,7 @@ add_executable(xexample1_CBLAS cblas_example1.c) add_executable(xexample2_CBLAS cblas_example2.c) -target_link_libraries(xexample1_CBLAS cblas ${BLAS_LIBRARIES}) +target_link_libraries(xexample1_CBLAS cblas) target_link_libraries(xexample2_CBLAS cblas ${BLAS_LIBRARIES}) add_test(example1_CBLAS ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/xexample1_CBLAS) diff --git a/CBLAS/src/CMakeLists.txt b/CBLAS/src/CMakeLists.txt index 6577656b..70262d4c 100644 --- a/CBLAS/src/CMakeLists.txt +++ b/CBLAS/src/CMakeLists.txt @@ -124,5 +124,5 @@ if(CBLAS_COMPLEX16) endif() add_library(cblas ${ALLOBJ}) -target_link_libraries(cblas ${BLAS_LIBRARIES}) +target_link_libraries(cblas PRIVATE ${BLAS_LIBRARIES}) lapack_install_library(cblas) diff --git a/CBLAS/testing/CMakeLists.txt b/CBLAS/testing/CMakeLists.txt index fe9a51e1..eb32e73d 100644 --- a/CBLAS/testing/CMakeLists.txt +++ b/CBLAS/testing/CMakeLists.txt @@ -52,9 +52,9 @@ if(BUILD_SINGLE) add_executable(xscblat2 c_sblat2.f ${STESTL2O} ${LAPACK_BINARY_DIR}/include/cblas_test.h) add_executable(xscblat3 c_sblat3.f ${STESTL3O} ${LAPACK_BINARY_DIR}/include/cblas_test.h) - target_link_libraries(xscblat1 cblas ${BLAS_LIBRARIES}) - target_link_libraries(xscblat2 cblas ${BLAS_LIBRARIES}) - target_link_libraries(xscblat3 cblas ${BLAS_LIBRARIES}) + target_link_libraries(xscblat1 cblas) + target_link_libraries(xscblat2 cblas) + target_link_libraries(xscblat3 cblas) add_cblas_test(stest1.out "" xscblat1) add_cblas_test(stest2.out sin2 xscblat2) @@ -66,9 +66,9 @@ if(BUILD_DOUBLE) add_executable(xdcblat2 c_dblat2.f ${DTESTL2O} ${LAPACK_BINARY_DIR}/include/cblas_test.h) add_executable(xdcblat3 c_dblat3.f ${DTESTL3O} ${LAPACK_BINARY_DIR}/include/cblas_test.h) - target_link_libraries(xdcblat1 cblas ${BLAS_LIBRARIES}) - target_link_libraries(xdcblat2 cblas ${BLAS_LIBRARIES}) - target_link_libraries(xdcblat3 cblas ${BLAS_LIBRARIES}) + target_link_libraries(xdcblat1 cblas) + target_link_libraries(xdcblat2 cblas) + target_link_libraries(xdcblat3 cblas) add_cblas_test(dtest1.out "" xdcblat1) add_cblas_test(dtest2.out din2 xdcblat2) @@ -81,8 +81,8 @@ if(BUILD_COMPLEX) add_executable(xccblat3 c_cblat3.f ${CTESTL3O} ${LAPACK_BINARY_DIR}/include/cblas_test.h) target_link_libraries(xccblat1 cblas ${BLAS_LIBRARIES}) - target_link_libraries(xccblat2 cblas ${BLAS_LIBRARIES}) - target_link_libraries(xccblat3 cblas ${BLAS_LIBRARIES}) + target_link_libraries(xccblat2 cblas) + target_link_libraries(xccblat3 cblas) add_cblas_test(ctest1.out "" xccblat1) add_cblas_test(ctest2.out cin2 xccblat2) @@ -94,9 +94,9 @@ if(BUILD_COMPLEX16) add_executable(xzcblat2 c_zblat2.f ${ZTESTL2O} ${LAPACK_BINARY_DIR}/include/cblas_test.h) add_executable(xzcblat3 c_zblat3.f ${ZTESTL3O} ${LAPACK_BINARY_DIR}/include/cblas_test.h) - target_link_libraries(xzcblat1 cblas ${BLAS_LIBRARIES}) - target_link_libraries(xzcblat2 cblas ${BLAS_LIBRARIES}) - target_link_libraries(xzcblat3 cblas ${BLAS_LIBRARIES}) + target_link_libraries(xzcblat1 cblas) + target_link_libraries(xzcblat2 cblas) + target_link_libraries(xzcblat3 cblas) add_cblas_test(ztest1.out "" xzcblat1) add_cblas_test(ztest2.out zin2 xzcblat2) -- cgit v1.2.3