summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Benda <jacob.benda@gmail.com>2019-05-04 09:38:02 (GMT)
committerJakub Benda <jacob.benda@gmail.com>2019-05-04 09:38:02 (GMT)
commit8527dbbf4443daf3b43f3b1543192c3a2f26be80 (patch)
tree7e63b7a4c9dad3a9fc0408a23e57951607c4f424
parentd3a0582b0c0095ab95c3610ba93f3d38b5a13620 (diff)
downloadCMake-8527dbbf4443daf3b43f3b1543192c3a2f26be80.zip
CMake-8527dbbf4443daf3b43f3b1543192c3a2f26be80.tar.gz
CMake-8527dbbf4443daf3b43f3b1543192c3a2f26be80.tar.bz2
FindBLAS: Use Intel fortran interface on OS X even with GNU Fortran
According to Intel MKL Link Line Advisor, there is no GNU Fortran interface library provided for OS X variant of Intel MKL. Because of this missing library, FindBLAS was failing on OS X, looking for nonexistent library libmkl_gf_[i]lp64. To prevent this, FindBLAS will now always use Intel Fortran interface for MKL on OS X (libmkl_intel_[i]lp64), even with GNU Fortran.
-rw-r--r--Modules/FindBLAS.cmake3
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/FindBLAS.cmake b/Modules/FindBLAS.cmake
index 77e689f..8d55ac7 100644
--- a/Modules/FindBLAS.cmake
+++ b/Modules/FindBLAS.cmake
@@ -239,7 +239,8 @@ if (BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All")
set(BLAS_mkl_DLL_SUFFIX "_dll")
endif()
else()
- if(CMAKE_Fortran_COMPILER_LOADED AND CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
+ # Switch to GNU Fortran support layer if needed (but not on Apple, where MKL does not provide it)
+ if(CMAKE_Fortran_COMPILER_LOADED AND CMAKE_Fortran_COMPILER_ID STREQUAL "GNU" AND NOT APPLE)
set(BLAS_mkl_INTFACE "gf")
set(BLAS_mkl_THREADING "gnu")
set(BLAS_mkl_OMP "gomp")