2020-02-11 23:04:29 +00:00
|
|
|
# Copyright (C) 2011-2020 (see AUTHORS file for a list of contributors)
|
|
|
|
#
|
|
|
|
# GNSS-SDR is a software-defined Global Navigation Satellite Systems receiver
|
2019-03-22 10:00:13 +00:00
|
|
|
#
|
|
|
|
# This file is part of GNSS-SDR.
|
|
|
|
#
|
2020-02-08 00:20:02 +00:00
|
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
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
|
2020-02-29 13:33:09 +00:00
|
|
|
libblas.dylib
|
|
|
|
PATHS
|
|
|
|
/opt/local/lib/lapack
|
|
|
|
/usr/local/opt/lapack/lib
|
|
|
|
/usr/local/lib
|
|
|
|
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)
|
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}
|
|
|
|
/opt/local/lib/lapack
|
|
|
|
/usr/local/opt/lapack/lib
|
|
|
|
/usr/local/lib
|
|
|
|
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)
|
2019-03-22 10:00:13 +00:00
|
|
|
endif()
|