summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-11-12 14:12:50 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-11-12 14:12:56 (GMT)
commit08b06680432f658661a26a4cff795f3fd68527ec (patch)
tree903f8475030dcfbec44fd63ccbb1f83fe8b39543 /Modules
parenta97987bda942c6c1afcfe2d8c90637e510ad323b (diff)
parentf7f3d8987ad501583031f0e1d5290370542cc1f3 (diff)
downloadCMake-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.cmake8
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()