diff options
author | Brad King <brad.king@kitware.com> | 2020-11-12 14:12:50 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-11-12 14:12:56 (GMT) |
commit | 08b06680432f658661a26a4cff795f3fd68527ec (patch) | |
tree | 903f8475030dcfbec44fd63ccbb1f83fe8b39543 /Modules | |
parent | a97987bda942c6c1afcfe2d8c90637e510ad323b (diff) | |
parent | f7f3d8987ad501583031f0e1d5290370542cc1f3 (diff) | |
download | CMake-08b06680432f658661a26a4cff795f3fd68527ec.zip CMake-08b06680432f658661a26a4cff795f3fd68527ec.tar.gz CMake-08b06680432f658661a26a4cff795f3fd68527ec.tar.bz2 |
Merge topic 'FindBLAS/OpenBLAS-OpenMP'
f7f3d8987a FindBLAS: Add dependency of OpenBLAS on OpenMP for BLA_STATIC
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5487
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindBLAS.cmake | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Modules/FindBLAS.cmake b/Modules/FindBLAS.cmake index e4353df..715049b 100644 --- a/Modules/FindBLAS.cmake +++ b/Modules/FindBLAS.cmake @@ -586,16 +586,22 @@ if(BLA_VENDOR STREQUAL "OpenBLAS" OR BLA_VENDOR STREQUAL "All") else() find_package(Threads REQUIRED) endif() + set(_threadlibs "${CMAKE_THREAD_LIBS_INIT}") + if(BLA_STATIC) + find_package(OpenMP COMPONENTS C) + list(PREPEND _threadlibs "${OpenMP_C_LIBRARIES}") + endif() check_blas_libraries( BLAS_LIBRARIES BLAS sgemm "" "openblas" - "${CMAKE_THREAD_LIBS_INIT}" + "${_threadlibs}" "" "" ) + unset(_threadlibs) endif() endif() |