Skip to content

Commit 3b248f1

Browse files
authored
correctly determine INTEL_ROOT_DEFAULT using MKLROOT env variable (#1706)
* correctly determine INTEL_ROOT_DEFAULT using MKLROOT env variable * handle $ENV{MKLROOT} for any OS
1 parent 173a0d1 commit 3b248f1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,12 @@ if(DEFINED ENV{INTELROOT})
3232
elseif(DEFINED ENV{ONEAPI_ROOT})
3333
set(INTEL_ROOT_DEFAULT $ENV{ONEAPI_ROOT}/..)
3434
elseif(DEFINED ENV{MKLROOT})
35-
set(INTEL_ROOT_DEFAULT $ENV{MKLROOT}/..)
35+
if(WIN32)
36+
set(INTEL_ROOT_DEFAULT $ENV{MKLROOT}/..)
37+
else()
38+
# Other system like arch set env MKLROOT by default
39+
set(INTEL_ROOT_DEFAULT $ENV{MKLROOT}/../../..)
40+
endif()
3641
elseif(WIN32)
3742
set(ProgramFilesx86 "ProgramFiles(x86)")
3843
set(INTEL_ROOT_DEFAULT PATHS

0 commit comments

Comments
 (0)