1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-11-09 03:20:01 +00:00
gnss-sdr/cmake/Modules/AvoidAccelerate.cmake

59 lines
1.3 KiB
CMake
Raw Normal View History

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
#
# This file is part of GNSS-SDR.
#
# SPDX-License-Identifier: GPL-3.0-or-later
# Avoid using the BLAS and LAPACK implementations that comes with the Accelerate
# framework, which causes a bug when the BeiDou constellation is enabled
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()
find_library(BLAS_LIBRARIES
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
)
if(BLAS_LIBRARIES)
set(BLAS_FOUND TRUE)
endif()
find_library(LAPACK_LIBRARIES
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
)
if(LAPACK_LIBRARIES)
set(LAPACK_FOUND TRUE)
endif()