Selaa lähdekoodia

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.
Jakub Benda 6 vuotta sitten
vanhempi
sitoutus
8527dbbf44
1 muutettua tiedostoa jossa 2 lisäystä ja 1 poistoa
  1. 2 1
      Modules/FindBLAS.cmake

+ 2 - 1
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")