File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -153,12 +153,18 @@ if(${BLAS} STREQUAL "MKL" OR DEFINED ENV{MKLROOT})
153153 CACHE STRING "" )
154154 endif ()
155155elseif (NOT DEFINED ENV{BLAS_LIBS} AND NOT DEFINED ENV{BLAS_CFLAGS})
156- set (BLAS_INCLUDE_DIRS
157- ""
158- CACHE STRING "" )
159- set (BLAS_LIBRARIES
160- -lcblas
161- CACHE STRING "" )
156+ # if nothing is specified via environment variables, let's try FindBLAS
157+ find_package (BLAS)
158+ if (NOT BLAS_FOUND)
159+ # Nothing specified by the user and FindBLAS didn't find anything; let's try
160+ # if cblas is available on the system paths.
161+ set (BLAS_INCLUDE_DIRS
162+ ""
163+ CACHE STRING "" )
164+ set (BLAS_LIBRARIES
165+ -lcblas
166+ CACHE STRING "" )
167+ endif ()
162168endif ()
163169add_compile_definitions (AMICI_BLAS_${BLAS} )
164170
You can’t perform that action at this time.
0 commit comments