Commit d6a0b24d authored by Brad King's avatar Brad King Committed by Kitware Robot
Browse files

Merge topic 'FindBLAS-default-OpenMP' into release-3.20

9ef82d95

 FindBLAS: Fix detection of OpenMP as dependency of BLA_STATIC
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !5993
parents f8af94a2 9ef82d95
......@@ -619,8 +619,17 @@ if(BLA_VENDOR STREQUAL "OpenBLAS" OR BLA_VENDOR STREQUAL "All")
endif()
set(_threadlibs "${CMAKE_THREAD_LIBS_INIT}")
if(BLA_STATIC)
find_package(OpenMP COMPONENTS C)
list(PREPEND _threadlibs "${OpenMP_C_LIBRARIES}")
set(_blas_STATIC_CMAKE_FIND_LIBRARY_SUFFIXES "${CMAKE_FIND_LIBRARY_SUFFIXES}")
set(CMAKE_FIND_LIBRARY_SUFFIXES "${_blas_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES}")
if (CMAKE_C_COMPILER_LOADED)
find_package(OpenMP COMPONENTS C)
list(PREPEND _threadlibs "${OpenMP_C_LIBRARIES}")
elseif(CMAKE_CXX_COMPILER_LOADED)
find_package(OpenMP COMPONENTS CXX)
list(PREPEND _threadlibs "${OpenMP_CXX_LIBRARIES}")
endif()
set(CMAKE_FIND_LIBRARY_SUFFIXES "${_blas_STATIC_CMAKE_FIND_LIBRARY_SUFFIXES}")
unset(_blas_STATIC_CMAKE_FIND_LIBRARY_SUFFIXES)
endif()
check_blas_libraries(
BLAS_LIBRARIES
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment