summaryrefslogtreecommitdiff
path: root/Modules
diff options
context:
space:
mode:
authorSeth R Johnson <johnsonsr@ornl.gov>2021-07-13 18:14:10 -0400
committerSeth R Johnson <johnsonsr@ornl.gov>2021-07-14 10:59:59 -0400
commitfc54e68c053436c22c4c17a3c265f59974852179 (patch)
tree35b855fa5745285729b1ee1f25b8168250249eb8 /Modules
parent460e812369db398da34e14c9d40c3ecec06afaf1 (diff)
downloadcmake-fc54e68c053436c22c4c17a3c265f59974852179.tar.gz
Find{BLAS,LAPACK}: improve found message on Cray
With Cray compiler wrappers (implicitly tested on OLCF Spock) the BLAS and LAPACK libraries are automatically linked as necessary through the wrapper script and programming environment. With this change, the configure output is: ``` -- Found BLAS: implicitly linked <snip> -- Found LAPACK: implicitly linked ``` rather than ``` -- Found BLAS: 1 <snip> -- Found LAPACK: LAPACK_LIBRARIES-PLACEHOLDER-FOR-EMPTY-LIBRARIES ```
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindBLAS.cmake2
-rw-r--r--Modules/FindLAPACK.cmake7
2 files changed, 8 insertions, 1 deletions
diff --git a/Modules/FindBLAS.cmake b/Modules/FindBLAS.cmake
index 726ff75bf8..a6fd2c9ca5 100644
--- a/Modules/FindBLAS.cmake
+++ b/Modules/FindBLAS.cmake
@@ -386,6 +386,8 @@ if(BLA_VENDOR STREQUAL "All")
)
endif()
if(BLAS_WORKS)
+ # Give a more helpful "found" message
+ set(BLAS_WORKS "implicitly linked")
set(_blas_fphsa_req_var BLAS_WORKS)
endif()
endif()
diff --git a/Modules/FindLAPACK.cmake b/Modules/FindLAPACK.cmake
index 3146e06d44..d753244e3e 100644
--- a/Modules/FindLAPACK.cmake
+++ b/Modules/FindLAPACK.cmake
@@ -350,7 +350,7 @@ if(NOT LAPACK_NOT_FOUND_MESSAGE)
"lib/${LAPACK_mkl_ARCH_NAME}"
)
- # First try empty lapack libs
+ # First try empty lapack libs (implicitly linked or automatic from BLAS)
if(NOT ${_LIBRARIES})
check_lapack_libraries(
${_LIBRARIES}
@@ -363,6 +363,11 @@ if(NOT LAPACK_NOT_FOUND_MESSAGE)
"${LAPACK_mkl_LIB_PATH_SUFFIXES}"
"${_BLAS_LIBRARIES}"
)
+ if(LAPACK_WORKS AND NOT _BLAS_LIBRARIES)
+ # Give a more helpful "found" message
+ set(LAPACK_WORKS "implicitly linked")
+ set(_lapack_fphsa_req_var LAPACK_WORKS)
+ endif()
endif()
# Then try the search libs