2020-12-30 12:35:06 +00:00
|
|
|
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
|
2019-03-22 10:00:13 +00:00
|
|
|
# This file is part of GNSS-SDR.
|
|
|
|
#
|
2020-12-30 12:35:06 +00:00
|
|
|
# SPDX-FileCopyrightText: 2011-2020 C. Fernandez-Prades cfernandez(at)cttc.es
|
|
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
2019-03-22 10:00:13 +00:00
|
|
|
|
|
|
|
# Avoid using the BLAS and LAPACK implementations that comes with the Accelerate
|
|
|
|
# framework, which causes a bug when the BeiDou constellation is enabled
|
|
|
|
|
2020-02-29 13:33:09 +00:00
|
|
|
if(NOT BLAS_ROOT)
|
|
|
|
set(BLAS_ROOT_USER_DEFINED /usr/local/lib)
|
|
|
|
else()
|
|
|
|
set(BLAS_ROOT_USER_DEFINED ${BLAS_ROOT})
|
|
|
|
endif()
|
|
|
|
if(DEFINED ENV{BLAS_ROOT})
|
|
|
|
set(BLAS_ROOT_USER_DEFINED
|
|
|
|
${BLAS_ROOT_USER_DEFINED}
|
|
|
|
$ENV{BLAS_ROOT}
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2019-03-22 10:00:13 +00:00
|
|
|
find_library(BLAS_LIBRARIES
|
2022-04-22 10:11:06 +00:00
|
|
|
NAMES libblas.dylib libopenblas.dylib
|
2020-02-29 13:33:09 +00:00
|
|
|
PATHS
|
2022-04-22 10:11:06 +00:00
|
|
|
${BLAS_ROOT_USER_DEFINED}
|
|
|
|
${BLAS_ROOT_USER_DEFINED}/lapack
|
2020-02-29 13:33:09 +00:00
|
|
|
/opt/local/lib/lapack
|
2022-04-22 10:11:06 +00:00
|
|
|
/opt/local/lib/
|
2020-02-29 13:33:09 +00:00
|
|
|
/usr/local/opt/lapack/lib
|
2024-01-13 15:43:41 +00:00
|
|
|
/opt/homebrew/opt/lapack/lib
|
2020-02-29 13:33:09 +00:00
|
|
|
NO_DEFAULT_PATH
|
|
|
|
NO_SYSTEM_ENVIRONMENT_PATH
|
|
|
|
NO_CMAKE_ENVIRONMENT_PATH
|
|
|
|
NO_SYSTEM_ENVIRONMENT_PATH
|
|
|
|
NO_CMAKE_SYSTEM_PATH
|
2019-03-22 10:00:13 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
if(BLAS_LIBRARIES)
|
2020-02-29 13:33:09 +00:00
|
|
|
set(BLAS_FOUND TRUE)
|
2022-04-22 10:11:06 +00:00
|
|
|
message(STATUS "BLAS library found at ${BLAS_LIBRARIES}")
|
2019-03-22 10:00:13 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
|
|
find_library(LAPACK_LIBRARIES
|
2020-02-29 13:33:09 +00:00
|
|
|
liblapack.dylib
|
|
|
|
PATHS
|
|
|
|
${BLAS_ROOT_USER_DEFINED}
|
2022-04-22 10:11:06 +00:00
|
|
|
${BLAS_ROOT_USER_DEFINED}/lapack
|
2020-02-29 13:33:09 +00:00
|
|
|
/opt/local/lib/lapack
|
|
|
|
/usr/local/opt/lapack/lib
|
2024-01-13 15:43:41 +00:00
|
|
|
/opt/homebrew/opt/lapack/lib
|
2020-02-29 13:33:09 +00:00
|
|
|
NO_DEFAULT_PATH
|
|
|
|
NO_SYSTEM_ENVIRONMENT_PATH
|
|
|
|
NO_CMAKE_ENVIRONMENT_PATH
|
|
|
|
NO_SYSTEM_ENVIRONMENT_PATH
|
|
|
|
NO_CMAKE_SYSTEM_PATH
|
2019-03-22 10:00:13 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
if(LAPACK_LIBRARIES)
|
2020-02-29 13:33:09 +00:00
|
|
|
set(LAPACK_FOUND TRUE)
|
2022-04-22 10:11:06 +00:00
|
|
|
message(STATUS "LAPACK library found at ${LAPACK_LIBRARIES}")
|
2019-03-22 10:00:13 +00:00
|
|
|
endif()
|