File tree Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -46,11 +46,23 @@ option(FIND_BLAS "Find external BLAS and LAPACK" ON)
46
46
47
47
# --- find BLAS and LAPACK
48
48
if (FIND_BLAS )
49
- find_package (BLAS )
49
+ if (NOT BLAS_FOUND )
50
+ #Required for MKL
51
+ if (DEFINED ENV{MKLROOT} OR "${BLA_VENDOR} " MATCHES "^Intel" )
52
+ enable_language ("C" )
53
+ endif ()
54
+ find_package ("BLAS" )
55
+ endif ()
50
56
if (BLAS_FOUND )
51
57
add_compile_definitions (STDLIB_EXTERNAL_BLAS )
52
58
endif ()
53
- find_package (LAPACK )
59
+ if (NOT LAPACK_FOUND )
60
+ #Required for MKL
61
+ if (DEFINED ENV{MKLROOT} OR "${BLA_VENDOR} " MATCHES "^Intel" )
62
+ enable_language ("C" )
63
+ endif ()
64
+ find_package ("LAPACK" )
65
+ endif ()
54
66
if (LAPACK_FOUND )
55
67
add_compile_definitions (STDLIB_EXTERNAL_LAPACK )
56
68
endif ()
Original file line number Diff line number Diff line change @@ -122,10 +122,10 @@ add_library(${PROJECT_NAME} ${SRC})
122
122
123
123
# Link to BLAS and LAPACK
124
124
if (BLAS_FOUND )
125
- target_link_libraries (${PROJECT_NAME} BLAS::BLAS )
125
+ target_link_libraries (${PROJECT_NAME} " BLAS::BLAS" )
126
126
endif ()
127
127
if (LAPACK_FOUND )
128
- target_link_libraries (${PROJECT_NAME} LAPACK::LAPACK )
128
+ target_link_libraries (${PROJECT_NAME} " LAPACK::LAPACK" )
129
129
endif ()
130
130
131
131
set_target_properties (
You can’t perform that action at this time.
0 commit comments