From f7eb2a237b06248227cb01db0e143339493f0f92 Mon Sep 17 00:00:00 2001 From: Robert Falkenberg Date: Tue, 1 Mar 2022 15:05:28 +0100 Subject: [PATCH] cmake,MKL: add default library search paths - /opt/intel/oneapi/mkl/latest (intel-oneapi-mkl 2022.0.2) - /opt/intel/mkl (intel-mkl 2020.4.304 on Archlinux) --- cmake/modules/FindMKL.cmake | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/cmake/modules/FindMKL.cmake b/cmake/modules/FindMKL.cmake index f64a1a9a9..42e3d9197 100644 --- a/cmake/modules/FindMKL.cmake +++ b/cmake/modules/FindMKL.cmake @@ -16,31 +16,45 @@ find_path(MKL_INCLUDE_DIR NAMES mkl.h HINTS $ENV{MKL_DIR}/include + /opt/intel/oneapi/mkl/latest/include + /opt/intel/mkl/include + /usr/include/mkl PATHS) find_path(MKL_FFTW_INCLUDE_DIR NAMES fftw3.h HINTS $ENV{MKL_DIR}/include/fftw + /opt/intel/oneapi/mkl/latest/include/fftw + /opt/intel/mkl/include/fftw + /usr/include/mkl/fftw PATHS) find_library(MKL_LIBRARIES NAMES mkl_rt HINTS $ENV{MKL_DIR}/lib/intel64 + /opt/intel/oneapi/mkl/latest/lib/intel64 + /opt/intel/mkl/lib/intel64 PATHS) find_library(MKL_CORE NAMES libmkl_core.a HINTS $ENV{MKL_DIR}/lib/intel64 + /opt/intel/oneapi/mkl/latest/lib/intel64/ + /opt/intel/mkl/lib/intel64 PATHS) find_library(MKL_ILP NAMES libmkl_intel_ilp64.a HINTS $ENV{MKL_DIR}/lib/intel64 + /opt/intel/oneapi/mkl/latest/lib/intel64/ + /opt/intel/mkl/lib/intel64 PATHS) find_library(MKL_SEQ NAMES libmkl_sequential.a HINTS $ENV{MKL_DIR}/lib/intel64 + /opt/intel/oneapi/mkl/latest/lib/intel64/ + /opt/intel/mkl/lib/intel64 PATHS) set(MKL_STATIC_LIBRARIES -Wl,--start-group ${MKL_CORE} ${MKL_ILP} ${MKL_SEQ} -Wl,--end-group -lpthread -lm -ldl)