summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorevatux <evatux@gmail.com>2020-06-16 16:50:20 (GMT)
committerevatux <evatux@gmail.com>2020-06-16 17:33:11 (GMT)
commitd880d2805f9e25b3b391be1056d45694c71ef17f (patch)
treeffede2000d26b8703733a6a8680025f381efcb91 /Modules
parent187f77f59cb2b66b9e5960993ead4deb81bc96ca (diff)
downloadCMake-d880d2805f9e25b3b391be1056d45694c71ef17f.zip
CMake-d880d2805f9e25b3b391be1056d45694c71ef17f.tar.gz
CMake-d880d2805f9e25b3b391be1056d45694c71ef17f.tar.bz2
FindBLAS: Extend search directories for MKL
Even though Intel MKL typically puts the libraries under `$MKLROOT/lib/$arch_$os` some installations may still use `$MKLROOT/lib/$arch/` path. Ideally, `$arch` should be a symlink to `$arch_$os`, but sometimes the opposite happens (for instance, see Intel MKL distribution in Arch Linux [1]), and sometimes only `$arch` directory alone is present. This patch extends the search list with `$MKLROOT/lib/$arch` with lower priority than `$MKLROOT/lib/$arch_$os`, as the latter is the official path to Intel MKL libraries. It is also worth mentioning that Intel MKL Link Line Adviser [2] recommends using `$MKLROOT/lib/$arch` directory in a link line: ``` -L${MKLROOT}/lib/intel64 -Wl,--no-as-needed -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread -lm -ldl ``` [1] https://www.archlinux.org/packages/community/x86_64/intel-mkl/files/ [2] https://software.intel.com/content/www/us/en/develop/articles/intel-mkl-link-line-advisor.html
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindBLAS.cmake2
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/FindBLAS.cmake b/Modules/FindBLAS.cmake
index 4c569b3..c5d791e 100644
--- a/Modules/FindBLAS.cmake
+++ b/Modules/FindBLAS.cmake
@@ -483,7 +483,9 @@ if(BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All")
endif()
set(BLAS_mkl_LIB_PATH_SUFFIXES
"compiler/lib" "compiler/lib/${BLAS_mkl_ARCH_NAME}_${BLAS_mkl_OS_NAME}"
+ "compiler/lib/${BLAS_mkl_ARCH_NAME}"
"mkl/lib" "mkl/lib/${BLAS_mkl_ARCH_NAME}_${BLAS_mkl_OS_NAME}"
+ "mkl/lib/${BLAS_mkl_ARCH_NAME}"
"lib/${BLAS_mkl_ARCH_NAME}_${BLAS_mkl_OS_NAME}")
foreach(IT ${BLAS_SEARCH_LIBS})