Fix overlinking CBLAS dependencies
authorKyle Guinn <elyk03@gmail.com>
Thu, 2 Feb 2017 03:10:58 +0000 (21:10 -0600)
committerKyle Guinn <elyk03@gmail.com>
Thu, 2 Feb 2017 06:28:38 +0000 (00:28 -0600)
CBLAS/cblas.pc.in
CBLAS/examples/CMakeLists.txt
CBLAS/src/CMakeLists.txt
CBLAS/testing/CMakeLists.txt

index 4a938fe..7cf09f2 100644 (file)
@@ -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
index a4bab6b..0241fd1 100644 (file)
@@ -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)
index 6577656..70262d4 100644 (file)
@@ -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)
index fe9a51e..eb32e73 100644 (file)
@@ -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)