mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-13 19:50:34 +00:00
Improve finding of BLAS libraries in macOS / Macports
MacPorts' lapack is not guaranteed to produce libblas.dylib. For example if the +openblas variant is used, then lapack uses openblas. This commit tries to find and use libopenblas.dylib if libblas.dylib is not found. Fixes usage of BLAS_ROOT
This commit is contained in:
parent
fd960398d8
commit
9dc57a61d0
@ -20,11 +20,13 @@ if(DEFINED ENV{BLAS_ROOT})
|
||||
endif()
|
||||
|
||||
find_library(BLAS_LIBRARIES
|
||||
libblas.dylib
|
||||
NAMES libblas.dylib libopenblas.dylib
|
||||
PATHS
|
||||
${BLAS_ROOT_USER_DEFINED}
|
||||
${BLAS_ROOT_USER_DEFINED}/lapack
|
||||
/opt/local/lib/lapack
|
||||
/opt/local/lib/
|
||||
/usr/local/opt/lapack/lib
|
||||
/usr/local/lib
|
||||
NO_DEFAULT_PATH
|
||||
NO_SYSTEM_ENVIRONMENT_PATH
|
||||
NO_CMAKE_ENVIRONMENT_PATH
|
||||
@ -34,6 +36,7 @@ find_library(BLAS_LIBRARIES
|
||||
|
||||
if(BLAS_LIBRARIES)
|
||||
set(BLAS_FOUND TRUE)
|
||||
message(STATUS "BLAS library found at ${BLAS_LIBRARIES}")
|
||||
endif()
|
||||
|
||||
|
||||
@ -41,9 +44,9 @@ find_library(LAPACK_LIBRARIES
|
||||
liblapack.dylib
|
||||
PATHS
|
||||
${BLAS_ROOT_USER_DEFINED}
|
||||
${BLAS_ROOT_USER_DEFINED}/lapack
|
||||
/opt/local/lib/lapack
|
||||
/usr/local/opt/lapack/lib
|
||||
/usr/local/lib
|
||||
NO_DEFAULT_PATH
|
||||
NO_SYSTEM_ENVIRONMENT_PATH
|
||||
NO_CMAKE_ENVIRONMENT_PATH
|
||||
@ -53,4 +56,5 @@ find_library(LAPACK_LIBRARIES
|
||||
|
||||
if(LAPACK_LIBRARIES)
|
||||
set(LAPACK_FOUND TRUE)
|
||||
message(STATUS "LAPACK library found at ${LAPACK_LIBRARIES}")
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user