FindBLAS: Select Intel MKL Fortran ABI and threading runtime independently

This commit is contained in:
Ye Luo
2026-09-07 10:30:34 -04:00
committed by Brad King
parent 9e593fd2c0
commit e4a3ef7f8b
+6 -2
View File
@@ -501,13 +501,17 @@ if(BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All")
set(BLAS_mkl_START_GROUP "")
set(BLAS_mkl_END_GROUP "")
endif()
# Switch to GNU Fortran support layer if needed (but not on Apple, where MKL does not provide it)
# Switch to GNU Fortran ABI regarding how functions return complex numbers and how characters are passed (but not on Apple, where MKL does not provide it).
if(CMAKE_Fortran_COMPILER_LOADED AND (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU" OR CMAKE_Fortran_COMPILER_ID STREQUAL "LCC") AND NOT APPLE)
set(BLAS_mkl_INTFACE "gf")
else()
set(BLAS_mkl_INTFACE "intel")
endif()
# Switch to GNU libgomp ABI regarding the OpenMP runtime (but not on Apple, where MKL does not provide it).
if(CMAKE_Fortran_COMPILER_LOADED AND (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU" OR CMAKE_Fortran_COMPILER_ID STREQUAL "LCC") AND NOT APPLE)
set(BLAS_mkl_THREADING "gnu")
set(BLAS_mkl_OMP "gomp")
else()
set(BLAS_mkl_INTFACE "intel")
set(BLAS_mkl_THREADING "intel")
set(BLAS_mkl_OMP "iomp5")
endif()