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)
master
Robert Falkenberg 3 years ago
parent 7f6ca43e68
commit f7eb2a237b

@ -16,31 +16,45 @@
find_path(MKL_INCLUDE_DIR find_path(MKL_INCLUDE_DIR
NAMES mkl.h NAMES mkl.h
HINTS $ENV{MKL_DIR}/include HINTS $ENV{MKL_DIR}/include
/opt/intel/oneapi/mkl/latest/include
/opt/intel/mkl/include
/usr/include/mkl
PATHS) PATHS)
find_path(MKL_FFTW_INCLUDE_DIR find_path(MKL_FFTW_INCLUDE_DIR
NAMES fftw3.h NAMES fftw3.h
HINTS $ENV{MKL_DIR}/include/fftw HINTS $ENV{MKL_DIR}/include/fftw
/opt/intel/oneapi/mkl/latest/include/fftw
/opt/intel/mkl/include/fftw
/usr/include/mkl/fftw
PATHS) PATHS)
find_library(MKL_LIBRARIES find_library(MKL_LIBRARIES
NAMES mkl_rt NAMES mkl_rt
HINTS $ENV{MKL_DIR}/lib/intel64 HINTS $ENV{MKL_DIR}/lib/intel64
/opt/intel/oneapi/mkl/latest/lib/intel64
/opt/intel/mkl/lib/intel64
PATHS) PATHS)
find_library(MKL_CORE find_library(MKL_CORE
NAMES libmkl_core.a NAMES libmkl_core.a
HINTS $ENV{MKL_DIR}/lib/intel64 HINTS $ENV{MKL_DIR}/lib/intel64
/opt/intel/oneapi/mkl/latest/lib/intel64/
/opt/intel/mkl/lib/intel64
PATHS) PATHS)
find_library(MKL_ILP find_library(MKL_ILP
NAMES libmkl_intel_ilp64.a NAMES libmkl_intel_ilp64.a
HINTS $ENV{MKL_DIR}/lib/intel64 HINTS $ENV{MKL_DIR}/lib/intel64
/opt/intel/oneapi/mkl/latest/lib/intel64/
/opt/intel/mkl/lib/intel64
PATHS) PATHS)
find_library(MKL_SEQ find_library(MKL_SEQ
NAMES libmkl_sequential.a NAMES libmkl_sequential.a
HINTS $ENV{MKL_DIR}/lib/intel64 HINTS $ENV{MKL_DIR}/lib/intel64
/opt/intel/oneapi/mkl/latest/lib/intel64/
/opt/intel/mkl/lib/intel64
PATHS) PATHS)
set(MKL_STATIC_LIBRARIES -Wl,--start-group ${MKL_CORE} ${MKL_ILP} ${MKL_SEQ} -Wl,--end-group -lpthread -lm -ldl) set(MKL_STATIC_LIBRARIES -Wl,--start-group ${MKL_CORE} ${MKL_ILP} ${MKL_SEQ} -Wl,--end-group -lpthread -lm -ldl)

Loading…
Cancel
Save