summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-12-12 17:09:06 (GMT)
committerBrad King <brad.king@kitware.com>2019-12-12 17:10:47 (GMT)
commitd1e111d166891dea7653f49acb13b2262242758e (patch)
tree3ce2f320b1427618da7de96b40524aece398ea78 /Modules
parent2a5e5b25ba4d6eb68dbee29381774562c98e228f (diff)
downloadCMake-d1e111d166891dea7653f49acb13b2262242758e.zip
CMake-d1e111d166891dea7653f49acb13b2262242758e.tar.gz
CMake-d1e111d166891dea7653f49acb13b2262242758e.tar.bz2
FindBLAS: Consider OpenBLAS with thread libraries only with C or CXX
The check added by commit 276b56f01c (FindBLAS: Add second try for OpenBLAS with thread libraries., 2019-06-07, v3.15.0-rc2~5^2) can work only when C or CXX is enabled. Fixes: #20092
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindBLAS.cmake8
1 files changed, 6 insertions, 2 deletions
diff --git a/Modules/FindBLAS.cmake b/Modules/FindBLAS.cmake
index 77f9d0e..d3acafc 100644
--- a/Modules/FindBLAS.cmake
+++ b/Modules/FindBLAS.cmake
@@ -481,8 +481,12 @@ if (BLA_VENDOR STREQUAL "OpenBLAS" OR BLA_VENDOR STREQUAL "All")
""
)
endif()
- if(NOT BLAS_LIBRARIES)
- find_package(Threads)
+ if(NOT BLAS_LIBRARIES AND (CMAKE_C_COMPILER_LOADED OR CMAKE_CXX_COMPILER_LOADED))
+ if(BLAS_FIND_QUIETLY OR NOT BLAS_FIND_REQUIRED)
+ find_package(Threads)
+ else()
+ find_package(Threads REQUIRED)
+ endif()
# OpenBLAS (http://www.openblas.net)
check_fortran_libraries(
BLAS_LIBRARIES