File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 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)
4242 set (CMAKE_MAXIMUM_RANK 4 CACHE STRING "Maximum array rank for generated procedures" )
4343endif ()
4444
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+
4555# --- find preprocessor
4656find_program (FYPP fypp )
4757if (NOT FYPP )
Original file line number Diff line number Diff line change @@ -120,6 +120,14 @@ set(SRC
120120
121121add_library (${PROJECT_NAME} ${SRC} )
122122
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+
123131set_target_properties (
124132 ${PROJECT_NAME}
125133 PROPERTIES
You can’t perform that action at this time.
0 commit comments