summaryrefslogtreecommitdiffstats
path: root/Modules/FindBLAS.cmake
diff options
context:
space:
mode:
authorAlexander Neumann <Alexander.Neumann@hamburg.de>2019-06-07 20:06:43 (GMT)
committerBrad King <brad.king@kitware.com>2019-06-17 12:03:07 (GMT)
commit276b56f01c757ef0fc8b08d2a55422c59b3f007c (patch)
treee3b7d950dcbd67175a3dae8dec652f8cdaf3bf62 /Modules/FindBLAS.cmake
parenta4231943117f5ba3dd0fdc6c8b1824334162b69f (diff)
downloadCMake-276b56f01c757ef0fc8b08d2a55422c59b3f007c.zip
CMake-276b56f01c757ef0fc8b08d2a55422c59b3f007c.tar.gz
CMake-276b56f01c757ef0fc8b08d2a55422c59b3f007c.tar.bz2
FindBLAS: Add second try for OpenBLAS with thread libraries.
Issue: #16221
Diffstat (limited to 'Modules/FindBLAS.cmake')
-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")