File tree 2 files changed +18
-0
lines changed
2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,16 @@ if(NOT DEFINED CMAKE_MAXIMUM_RANK)
42
42
set (CMAKE_MAXIMUM_RANK 4 CACHE STRING "Maximum array rank for generated procedures" )
43
43
endif ()
44
44
45
+ # --- find BLAS and LAPACK
46
+ find_package (BLAS)
47
+ if (BLAS_FOUND)
48
+ add_compile_definitions (STDLIB_EXTERNAL_BLAS)
49
+ endif ()
50
+ find_package (LAPACK)
51
+ if (LAPACK_FOUND)
52
+ add_compile_definitions (STDLIB_EXTERNAL_LAPACK)
53
+ endif ()
54
+
45
55
# --- find preprocessor
46
56
find_program (FYPP fypp)
47
57
if (NOT FYPP)
Original file line number Diff line number Diff line change @@ -120,6 +120,14 @@ set(SRC
120
120
121
121
add_library (${PROJECT_NAME} ${SRC} )
122
122
123
+ # Link to BLAS and LAPACK
124
+ if (BLAS_FOUND)
125
+ target_link_libraries (${PROJECT_NAME} BLAS::BLAS)
126
+ endif ()
127
+ if (LAPACK_FOUND)
128
+ target_link_libraries (${PROJECT_NAME} LAPACK::LAPACK)
129
+ endif ()
130
+
123
131
set_target_properties (
124
132
${PROJECT_NAME}
125
133
PROPERTIES
You can’t perform that action at this time.
0 commit comments