File tree 1 file changed +19
-7
lines changed
1 file changed +19
-7
lines changed Original file line number Diff line number Diff line change @@ -45,14 +45,26 @@ if(EIGEN_WITH_MKL)
45
45
EIGEN_USE_LAPACKE_STRICT
46
46
)
47
47
elseif (APPLE )
48
- target_link_libraries (Eigen3_Eigen INTERFACE
49
- "-framework Accelerate"
50
- "/opt/homebrew/opt/lapack/lib/liblapacke.dylib"
51
- )
52
- target_compile_definitions (Eigen3_Eigen INTERFACE
53
- EIGEN_USE_BLAS
54
- EIGEN_USE_LAPACKE_STRICT
48
+ find_package (BLAS REQUIRED)
49
+ find_library (LAPACKE lapacke PATHS
50
+ "/opt/local/lib/lapack"
51
+ "/opt/homebrew/opt/lapack/lib"
55
52
)
53
+ if (NOT LAPACKE)
54
+ # BLAS should be available on macOS, but LAPACKE might not be
55
+ message (WARNING "LAPACKE library not found (required for EIGEN_USE_LAPACKE on macOS)! "
56
+ "Perhaps you need to install it (e.g., brew install lapack). "
57
+ "Eigen will be built without LAPACKE support." )
58
+ else ()
59
+ message (STATUS "Found BLAS and LAPACKE. Enabling Eigen LAPACKE support." )
60
+ target_link_libraries (Eigen3_Eigen INTERFACE
61
+ ${BLAS_LIBRARIES} ${LAPACKE}
62
+ )
63
+ target_compile_definitions (Eigen3_Eigen INTERFACE
64
+ EIGEN_USE_BLAS
65
+ EIGEN_USE_LAPACKE_STRICT
66
+ )
67
+ endif ()
56
68
endif ()
57
69
58
70
# On Windows, enable natvis files to improve debugging experience
You can’t perform that action at this time.
0 commit comments