1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-09-18 02:09:48 +00:00

Merge branch 'next' of https://github.com/gnss-sdr/gnss-sdr into next

This commit is contained in:
Carles Fernandez 2019-03-22 13:55:38 +01:00
commit bc83ad1280
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
5 changed files with 105 additions and 25 deletions

View File

@ -408,8 +408,8 @@ set(GNSSSDR_MATIO_MIN_VERSION "1.5.3")
# Versions to download and build (but not installed) if not found
################################################################################
set(GNSSSDR_GFLAGS_LOCAL_VERSION "2.2.2")
set(GNSSSDR_GLOG_LOCAL_VERSION "0.3.5")
set(GNSSSDR_ARMADILLO_LOCAL_VERSION "9.200.x")
set(GNSSSDR_GLOG_LOCAL_VERSION "0.4.0")
set(GNSSSDR_ARMADILLO_LOCAL_VERSION "9.300.x")
set(GNSSSDR_GTEST_LOCAL_VERSION "1.8.1")
set(GNSSSDR_GNSS_SIM_LOCAL_VERSION "master")
set(GNSSSDR_GPSTK_LOCAL_VERSION "2.10.6")
@ -1331,14 +1331,30 @@ endif()
# Check that BLAS (Basic Linear Algebra Subprograms) is found in the system
# See http://www.netlib.org/blas/
################################################################################
find_library(BLAS blas)
if(NOT BLAS)
if(OS_IS_MACOSX)
# Avoid using the implementation that comes with the Accelerate framework
include(AvoidAccelerate)
else()
find_package(BLAS)
set_package_properties(BLAS PROPERTIES
URL "http://www.netlib.org/blas/"
DESCRIPTION "Basic Linear Algebra Subprograms"
PURPOSE "Used for matrix algebra computations."
TYPE REQUIRED
)
endif()
if(NOT BLAS_FOUND)
message(" The BLAS library has not been found.")
message(" You can try to install it by typing:")
if(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat")
message(" sudo yum install blas-devel")
if(OS_IS_MACOSX)
message(" 'sudo port install lapack' if you are using Macports, or")
message(" 'brew install lapack' if you are using Homebrew.")
else()
message(" sudo apt-get install libblas-dev")
if(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat")
message(" sudo yum install blas-devel")
else()
message(" sudo apt-get install libblas-dev")
endif()
endif()
message(FATAL_ERROR "BLAS is required to build gnss-sdr")
endif()
@ -1349,8 +1365,16 @@ endif()
# Check that LAPACK (Linear Algebra PACKage) is found in the system
# See http://www.netlib.org/lapack/
################################################################################
find_library(LAPACK lapack)
if(NOT LAPACK)
if(NOT OS_IS_MACOSX)
find_package(LAPACK)
set_package_properties(LAPACK PROPERTIES
URL "http://www.netlib.org/lapack/"
DESCRIPTION "Linear Algebra PACKage"
PURPOSE "Used for matrix algebra computations."
TYPE REQUIRED
)
endif()
if(NOT LAPACK_FOUND)
message(" The LAPACK library has not been found.")
message(" You can try to install it by typing:")
if(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat")
@ -1457,7 +1481,7 @@ if(NOT ARMADILLO_FOUND OR ENABLE_OWN_ARMADILLO)
if(NOT GFORTRAN)
set(GFORTRAN "")
endif()
set(ARMADILLO_LIBRARIES ${BLAS} ${LAPACK} ${GFORTRAN} ${binary_dir}/${CMAKE_FIND_LIBRARY_PREFIXES}armadillo${CMAKE_STATIC_LIBRARY_SUFFIX})
set(ARMADILLO_LIBRARIES ${BLAS_LIBRARIES} ${LAPACK_LIBRARIES} ${GFORTRAN} ${binary_dir}/${CMAKE_FIND_LIBRARY_PREFIXES}armadillo${CMAKE_STATIC_LIBRARY_SUFFIX})
set(LOCAL_ARMADILLO true CACHE STRING "Armadillo downloaded and built automatically" FORCE)
set(ARMADILLO_VERSION_STRING ${armadillo_RELEASE})
file(MAKE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/armadillo/armadillo-${armadillo_RELEASE}/include)

View File

@ -190,9 +190,9 @@ $ sudo apt-get install libblas-dev liblapack-dev # For Debian/Ubuntu/Linux
$ sudo yum install lapack-devel blas-devel # For Fedora/CentOS/RHEL
$ sudo zypper install lapack-devel blas-devel # For OpenSUSE
$ sudo pacman -S blas lapack # For Arch Linux
$ wget https://sourceforge.net/projects/arma/files/armadillo-9.200.7.tar.xz
$ tar xvfz armadillo-9.200.7.tar.xz
$ cd armadillo-9.200.7
$ wget https://sourceforge.net/projects/arma/files/armadillo-9.300.2.tar.xz
$ tar xvfz armadillo-9.300.2.tar.xz
$ cd armadillo-9.300.2
$ cmake .
$ make
$ sudo make install
@ -219,9 +219,10 @@ $ sudo ldconfig
#### Install [Glog](https://github.com/google/glog "Glog's Homepage"), a library that implements application-level logging:
~~~~~~
$ wget https://github.com/google/glog/archive/v0.3.5.tar.gz
$ tar xvfz v0.3.5.tar.gz
$ cd glog-0.3.5
$ wget https://github.com/google/glog/archive/v0.4.0.tar.gz
$ tar xvfz v0.4.0.tar.gz
$ cd glog-0.4.0
$ ./autogen.sh
$ ./configure
$ make
$ sudo make install
@ -545,6 +546,7 @@ $ sudo port selfupdate
$ sudo port upgrade outdated
$ sudo port install doxygen +docs
$ sudo port install gnuradio
$ sudo port install lapack
$ sudo port install armadillo
$ sudo port install gnutls
$ sudo port install google-glog +gflags
@ -586,7 +588,9 @@ Install the required dependencies:
~~~~~~
$ brew install cmake
$ brew install hdf5 arpack superlu armadillo
$ brew install hdf5
$ brew install lapack
$ brew install arpack superlu armadillo
$ brew install glog gflags
$ brew install gnuradio
$ brew install libmatio

View File

@ -0,0 +1,58 @@
# Copyright (C) 2011-2019 (see AUTHORS file for a list of contributors)
#
# This file is part of GNSS-SDR.
#
# GNSS-SDR is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GNSS-SDR is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
# Avoid using the BLAS and LAPACK implementations that comes with the Accelerate
# framework, which causes a bug when the BeiDou constellation is enabled
find_library(BLAS_LIBRARIES
libblas.dylib
PATHS
/opt/local/lib/lapack
/usr/local/opt/lapack/lib
/usr/local/lib
${BLAS_ROOT}/lib
$ENV{BLAS_ROOT}/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
/opt/local/lib/lapack
/usr/local/opt/lapack/lib
/usr/local/lib
${BLAS_ROOT}/lib
$ENV{BLAS_ROOT}/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()

View File

@ -70,14 +70,10 @@ target_link_libraries(algorithms_libs_rtklib
core_system_parameters
Gflags::gflags
Glog::glog
${LAPACK_LIBRARIES}
${BLAS_LIBRARIES}
)
if(OS_IS_MACOSX)
target_link_libraries(algorithms_libs_rtklib PRIVATE "-framework Accelerate")
else()
target_link_libraries(algorithms_libs_rtklib PRIVATE ${LAPACK} ${BLAS})
endif()
set_property(TARGET algorithms_libs_rtklib
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>

View File

@ -215,9 +215,7 @@ const int NSATQZS = 0;
const int NSYSQZS = 0;
#endif
#ifndef __APPLE__
#define ENABDS
#endif
#ifdef ENABDS
const int MINPRNBDS = 1; //!< min satellite sat number of BeiDou
const int MAXPRNBDS = 37; //!< max satellite sat number of BeiDou