Fix overlinking/underlinking LAPACK dependencies
authorKyle Guinn <elyk03@gmail.com>
Thu, 2 Feb 2017 03:19:08 +0000 (21:19 -0600)
committerKyle Guinn <elyk03@gmail.com>
Thu, 2 Feb 2017 06:28:39 +0000 (00:28 -0600)
SRC/CMakeLists.txt
TESTING/EIG/CMakeLists.txt
TESTING/LIN/CMakeLists.txt
lapack.pc.in

index 0fbbfdb..0f6c9ae 100644 (file)
@@ -523,8 +523,8 @@ set_target_properties(
   )
 
 if(USE_XBLAS)
-  target_link_libraries(lapack ${XBLAS_LIBRARY})
+  target_link_libraries(lapack PRIVATE ${XBLAS_LIBRARY})
 endif()
-target_link_libraries(lapack ${BLAS_LIBRARIES})
+target_link_libraries(lapack PRIVATE ${BLAS_LIBRARIES})
 
 lapack_install_library(lapack)
index 19fffcd..d457713 100644 (file)
@@ -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)
index 27ee265..7749d15 100644 (file)
@@ -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)
index 878efc2..711012d 100644 (file)
@@ -6,4 +6,4 @@ Description: FORTRAN reference implementation of LAPACK Linear Algebra PACKage
 Version: @LAPACK_VERSION@
 URL: http://www.netlib.org/lapack/
 Libs: -L${libdir} -llapack
-Requires: blas
+Requires.private: blas