Skip to content

Commit 4dba844

Browse files
author
Jared Frazier
committed
better find mkl logic
1 parent 77c0227 commit 4dba844

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

CMakeLists.txt

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ option(BUILD_SHARED_LIBS "Build shared libraries" ON)
44
option(BUILD_TESTING "Build tests" OFF)
55

66
option(ENABLE_SPBLAS "Build with SPBLAS" ON)
7-
option(ENABLE_FIND_INTEL_MKL "Find intel MKL config" OFF)
7+
option(ENABLE_FIND_INTEL_MKL "Find intel MKL config" ON)
88

99
option(ENABLE_FFTPACK "Build with fftpack" OFF)
1010
option(ENABLE_PFUNIT "Build with pFUnit" OFF)
@@ -20,22 +20,16 @@ project(
2020
# Set paths to Intel oneAPI MKL
2121
if(${ENABLE_SPBLAS})
2222
if (${ENABLE_FIND_INTEL_MKL})
23-
#find_package(MKL CONFIG)
23+
# automatically set paths (preferred option)
2424
find_package(MKL REQUIRED)
25-
#get_target_property(MKLINCLUDE MKL::MKL INTERFACE_INCLUDE_DIRECTORIES)
26-
endif()
27-
28-
# manually set MKL vars
29-
if (NOT MKL_FOUND)
30-
message(STATUS "Did not find MKL, trying to use env vars/user input")
25+
else()
26+
# manually set paths
3127
set(MKLROOT $ENV{MKLROOT} CACHE PATH "Installation directory of Intel MKL")
3228
if (NOT MKLROOT)
3329
message(FATAL_ERROR "MKLROOT environment variable is not set.")
3430
endif()
3531
set(MKLLIB ${MKLROOT}/lib CACHE PATH "Path to Intel MKL Libraries")
3632
set(MKLINCLUDE ${MKLROOT}/include/ CACHE PATH "Path to Intel MKL include files")
37-
else()
38-
message(STATUS "Found MKL")
3933
endif()
4034
endif()
4135

0 commit comments

Comments
 (0)