summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-06-17 12:03:14 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-06-17 12:03:22 (GMT)
commit1e1e306d9a13cdc1f8110c84192c37d7eedf5b3c (patch)
tree9411cb57665ee557f3af68516e13aec71ed0ac71 /Modules
parent0da805bff39f5e465d48f678f3b49b3dc738ab9f (diff)
parent276b56f01c757ef0fc8b08d2a55422c59b3f007c (diff)
downloadCMake-1e1e306d9a13cdc1f8110c84192c37d7eedf5b3c.zip
CMake-1e1e306d9a13cdc1f8110c84192c37d7eedf5b3c.tar.gz
CMake-1e1e306d9a13cdc1f8110c84192c37d7eedf5b3c.tar.bz2
Merge topic 'FindBLAS-OpenBLAS-thread'
276b56f01c FindBLAS: Add second try for OpenBLAS with thread libraries. Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3434
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindBLAS.cmake16
1 files changed, 15 insertions, 1 deletions
diff --git a/Modules/FindBLAS.cmake b/Modules/FindBLAS.cmake
index 65e5d1c..77f9d0e 100644
--- a/Modules/FindBLAS.cmake
+++ b/Modules/FindBLAS.cmake
@@ -152,7 +152,9 @@ macro(Check_Fortran_Libraries LIBRARIES _prefix _name _flags _list _thread)
foreach(_library ${_list})
set(_combined_name ${_combined_name}_${_library})
-
+ if(NOT "${_thread}" STREQUAL "")
+ set(_combined_name ${_combined_name}_thread)
+ endif()
if(_libraries_work)
if (BLA_STATIC)
if (WIN32)
@@ -479,6 +481,18 @@ if (BLA_VENDOR STREQUAL "OpenBLAS" OR BLA_VENDOR STREQUAL "All")
""
)
endif()
+ if(NOT BLAS_LIBRARIES)
+ find_package(Threads)
+ # OpenBLAS (http://www.openblas.net)
+ check_fortran_libraries(
+ BLAS_LIBRARIES
+ BLAS
+ sgemm
+ ""
+ "openblas"
+ "${CMAKE_THREAD_LIBS_INIT}"
+ )
+ endif()
endif ()
if (BLA_VENDOR STREQUAL "FLAME" OR BLA_VENDOR STREQUAL "All")