1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-14 20:20:35 +00:00

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

This commit is contained in:
Marc Majoral 2018-11-30 11:10:38 +01:00
commit bd90563925
133 changed files with 4780 additions and 4320 deletions

File diff suppressed because it is too large Load Diff

View File

@ -114,7 +114,7 @@ If you are using Arch Linux (with base-devel group installed):
~~~~~~
$ pacman -S cmake git boost boost-libs log4cpp libvolk gnuradio gnuradio-osmosdr \
blas lapack gflags google-glog openssl pugixml python2-mako python2-six \
blas lapack gflags google-glog openssl pugixml python-mako python-six \
libmatio libpcap gtest
~~~~~~

View File

@ -1,138 +0,0 @@
# CMAKE_PARSE_ARGUMENTS(<prefix> <options> <one_value_keywords> <multi_value_keywords> args...)
#
# CMAKE_PARSE_ARGUMENTS() is intended to be used in macros or functions for
# parsing the arguments given to that macro or function.
# It processes the arguments and defines a set of variables which hold the
# values of the respective options.
#
# The <options> argument contains all options for the respective macro,
# i.e. keywords which can be used when calling the macro without any value
# following, like e.g. the OPTIONAL keyword of the install() command.
#
# The <one_value_keywords> argument contains all keywords for this macro
# which are followed by one value, like e.g. DESTINATION keyword of the
# install() command.
#
# The <multi_value_keywords> argument contains all keywords for this macro
# which can be followed by more than one value, like e.g. the TARGETS or
# FILES keywords of the install() command.
#
# When done, CMAKE_PARSE_ARGUMENTS() will have defined for each of the
# keywords listed in <options>, <one_value_keywords> and
# <multi_value_keywords> a variable composed of the given <prefix>
# followed by "_" and the name of the respective keyword.
# These variables will then hold the respective value from the argument list.
# For the <options> keywords this will be TRUE or FALSE.
#
# All remaining arguments are collected in a variable
# <prefix>_UNPARSED_ARGUMENTS, this can be checked afterwards to see whether
# your macro was called with unrecognized parameters.
#
# As an example here a my_install() macro, which takes similar arguments as the
# real install() command:
#
# function(MY_INSTALL)
# set(options OPTIONAL FAST)
# set(oneValueArgs DESTINATION RENAME)
# set(multiValueArgs TARGETS CONFIGURATIONS)
# cmake_parse_arguments(MY_INSTALL "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
# ...
#
# Assume my_install() has been called like this:
# my_install(TARGETS foo bar DESTINATION bin OPTIONAL blub)
#
# After the cmake_parse_arguments() call the macro will have set the following
# variables:
# MY_INSTALL_OPTIONAL = TRUE
# MY_INSTALL_FAST = FALSE (this option was not used when calling my_install()
# MY_INSTALL_DESTINATION = "bin"
# MY_INSTALL_RENAME = "" (was not used)
# MY_INSTALL_TARGETS = "foo;bar"
# MY_INSTALL_CONFIGURATIONS = "" (was not used)
# MY_INSTALL_UNPARSED_ARGUMENTS = "blub" (no value expected after "OPTIONAL"
#
# You can the continue and process these variables.
#
# Keywords terminate lists of values, e.g. if directly after a one_value_keyword
# another recognized keyword follows, this is interpreted as the beginning of
# the new option.
# E.g. my_install(TARGETS foo DESTINATION OPTIONAL) would result in
# MY_INSTALL_DESTINATION set to "OPTIONAL", but MY_INSTALL_DESTINATION would
# be empty and MY_INSTALL_OPTIONAL would be set to TRUE therefor.
#=============================================================================
# Copyright 2010 Alexander Neundorf <neundorf@kde.org>
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
if(__CMAKE_PARSE_ARGUMENTS_INCLUDED)
return()
endif()
set(__CMAKE_PARSE_ARGUMENTS_INCLUDED TRUE)
function(CMAKE_PARSE_ARGUMENTS prefix _optionNames _singleArgNames _multiArgNames)
# first set all result variables to empty/FALSE
foreach(arg_name ${_singleArgNames} ${_multiArgNames})
set(${prefix}_${arg_name})
endforeach(arg_name)
foreach(option ${_optionNames})
set(${prefix}_${option} FALSE)
endforeach(option)
set(${prefix}_UNPARSED_ARGUMENTS)
set(insideValues FALSE)
set(currentArgName)
# now iterate over all arguments and fill the result variables
foreach(currentArg ${ARGN})
list(FIND _optionNames "${currentArg}" optionIndex) # ... then this marks the end of the arguments belonging to this keyword
list(FIND _singleArgNames "${currentArg}" singleArgIndex) # ... then this marks the end of the arguments belonging to this keyword
list(FIND _multiArgNames "${currentArg}" multiArgIndex) # ... then this marks the end of the arguments belonging to this keyword
if(${optionIndex} EQUAL -1 AND ${singleArgIndex} EQUAL -1 AND ${multiArgIndex} EQUAL -1)
if(insideValues)
if("${insideValues}" STREQUAL "SINGLE")
set(${prefix}_${currentArgName} ${currentArg})
set(insideValues FALSE)
elseif("${insideValues}" STREQUAL "MULTI")
list(APPEND ${prefix}_${currentArgName} ${currentArg})
endif()
else(insideValues)
list(APPEND ${prefix}_UNPARSED_ARGUMENTS ${currentArg})
endif(insideValues)
else()
if(NOT ${optionIndex} EQUAL -1)
set(${prefix}_${currentArg} TRUE)
set(insideValues FALSE)
elseif(NOT ${singleArgIndex} EQUAL -1)
set(currentArgName ${currentArg})
set(${prefix}_${currentArgName})
set(insideValues "SINGLE")
elseif(NOT ${multiArgIndex} EQUAL -1)
set(currentArgName ${currentArg})
set(${prefix}_${currentArgName})
set(insideValues "MULTI")
endif()
endif()
endforeach(currentArg)
# propagate the result variables to the caller:
foreach(arg_name ${_singleArgNames} ${_multiArgNames} ${_optionNames})
set(${prefix}_${arg_name} ${${prefix}_${arg_name}} PARENT_SCOPE)
endforeach(arg_name)
set(${prefix}_UNPARSED_ARGUMENTS ${${prefix}_UNPARSED_ARGUMENTS} PARENT_SCOPE)
endfunction(CMAKE_PARSE_ARGUMENTS _options _singleArgs _multiArgs)

View File

@ -0,0 +1,102 @@
# Copyright (C) 2011-2018 (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/>.
# - Try to find GFlags
#
# The following variables are optionally searched for defaults
# GFlags_ROOT_DIR: Base directory where all GFlags components are found
#
# The following are set after configuration is done:
# GFlags_FOUND
# GFlags_INCLUDE_DIRS
# GFlags_LIBS
# GFlags_LIBRARY_DIRS
if(APPLE)
find_path(GFlags_ROOT_DIR
libgflags.dylib
PATHS
/opt/local/lib
/usr/local/lib
)
else()
find_path(GFlags_ROOT_DIR
libgflags.so
HINTS
/usr/local/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/i386-linux-gnu
/usr/lib/arm-linux-gnueabihf
/usr/lib/arm-linux-gnueabi
/usr/lib/aarch64-linux-gnu
/usr/lib/mipsel-linux-gnu
/usr/lib/mips-linux-gnu
/usr/lib/mips64el-linux-gnuabi64
/usr/lib/powerpc-linux-gnu
/usr/lib/powerpc64-linux-gnu
/usr/lib/powerpc64le-linux-gnu
/usr/lib/powerpc-linux-gnuspe
/usr/lib/hppa-linux-gnu
/usr/lib/s390x-linux-gnu
/usr/lib/i386-gnu
/usr/lib/hppa-linux-gnu
/usr/lib/x86_64-kfreebsd-gnu
/usr/lib/i386-kfreebsd-gnu
/usr/lib/m68k-linux-gnu
/usr/lib/sh4-linux-gnu
/usr/lib/sparc64-linux-gnu
/usr/lib/x86_64-linux-gnux32
/usr/lib/alpha-linux-gnu
/usr/lib64
/usr/lib
)
endif()
if(GFlags_ROOT_DIR)
# We are testing only a couple of files in the include directories
find_path(GFlags_INCLUDE_DIRS
gflags/gflags.h
HINTS
/opt/local/include
/usr/local/include
/usr/include
${GFlags_ROOT_DIR}/src
)
# Find the libraries
set(GFlags_LIBRARY_DIRS ${GFlags_ROOT_DIR})
find_library(GFlags_lib gflags ${GFlags_LIBRARY_DIRS})
if(EXISTS ${GFlags_INCLUDE_DIRS}/gflags/gflags_gflags.h)
set(GFLAGS_GREATER_20 TRUE)
else()
set(GFLAGS_GREATER_20 FALSE)
endif()
# set up include and link directory
include_directories(${GFlags_INCLUDE_DIRS})
link_directories(${GFlags_LIBRARY_DIRS})
message(STATUS "gflags library found at ${GFlags_lib}")
set(GFlags_LIBS ${GFlags_lib})
set(GFlags_FOUND true)
mark_as_advanced(GFlags_INCLUDE_DIRS)
else()
message(STATUS "Cannot find gflags")
set(GFlags_FOUND false)
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GFLAGS DEFAULT_MSG GFlags_LIBS GFlags_INCLUDE_DIRS)

View File

@ -15,134 +15,134 @@
# You should have received a copy of the GNU General Public License
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
find_library(GFORTRAN NAMES gfortran
PATHS /usr/lib
/usr/lib64
/usr/local/lib
/usr/local/lib/i386
/usr/lib/gcc/x86_64-linux-gnu
/usr/lib/gcc/i686-linux-gnu
/usr/lib/gcc/i386-linux-gnu
/usr/lib/gcc/x86_64-linux-gnu/4.6 # Ubuntu 12.04
/usr/lib/gcc/i686-linux-gnu/4.6
/usr/lib/gcc/x86_64-linux-gnu/4.7
/usr/lib/gcc/i686-linux-gnu/4.7
/usr/lib/gcc/x86_64-linux-gnu/4.8
/usr/lib/gcc/i686-linux-gnu/4.8
/usr/lib/gcc/x86_64-linux-gnu/4.9
/usr/lib/gcc/i686-linux-gnu/4.9
/usr/lib/gcc/x86_64-redhat-linux/4.7.2 # Fedora 18
/usr/lib/gcc/i686-redhat-linux/4.7.2
/usr/lib/gcc/x86_64-redhat-linux/4.8.1 # Fedora 19
/usr/lib/gcc/x86_64-redhat-linux/4.8.3 # Fedora 20
/usr/lib/gcc/x86_64-redhat-linux/4.9.1 # Fedora 21
/usr/lib/gcc/i686-redhat-linux/4.8.1
/usr/lib/gcc/i686-redhat-linux/4.8.3
/usr/lib/gcc/i686-redhat-linux/4.9.1
/usr/lib/gcc/x86_64-redhat-linux/4.4.4 # CentOS 6
/usr/lib/gcc/i686-redhat-linux/4.4.4
/usr/lib/gcc/x86_64-redhat-linux/4.8.2
/usr/lib/gcc/i686-redhat-linux/4.8.2
/usr/lib/gcc/x86_64-redhat-linux/7
/usr/lib/gcc/i686-redhat-linux/7
/usr/lib/gcc/armv7hl-redhat-linux-gnueabi/7
/usr/lib/gcc/aarch64-redhat-linux/7
/usr/lib/gcc/i586-suse-linux/4.8 # OpenSUSE 13.1
/usr/lib/gcc/i586-suse-linux/4.9
/usr/lib/gcc/x86_64-suse-linux/4.8
/usr/lib/gcc/x86_64-suse-linux/4.9
/usr/lib/gcc/i486-linux-gnu # Debian 7
/usr/lib/gcc/i486-linux-gnu/4.4
/usr/lib/gcc/i486-linux-gnu/4.6
/usr/lib/gcc/i486-linux-gnu/4.7
/usr/lib/gcc/i486-linux-gnu/4.8
/usr/lib/gcc/i486-linux-gnu/4.9
/usr/lib/gcc/i586-linux-gnu/4.9
/usr/lib/gcc/arm-linux-gnueabihf/4.4 # Debian armhf
/usr/lib/gcc/arm-linux-gnueabihf/4.5
/usr/lib/gcc/arm-linux-gnueabihf/4.6
/usr/lib/gcc/arm-linux-gnueabihf/4.7
/usr/lib/gcc/arm-linux-gnueabihf/4.8
/usr/lib/gcc/arm-linux-gnueabihf/4.9
/usr/lib/gcc/aarch64-linux-gnu/4.9 # Debian arm64
/usr/lib/gcc/arm-linux-gnueabi/4.7 # Debian armel
/usr/lib/gcc/arm-linux-gnueabi/4.9
/usr/lib/gcc/x86_64-linux-gnu/5
/usr/lib/gcc/i686-linux-gnu/5
/usr/lib/gcc/arm-linux-gnueabi/5
/usr/lib/gcc/arm-linux-gnueabihf/5
/usr/lib/gcc/aarch64-linux-gnu/5
/usr/lib/gcc/x86_64-linux-gnu/6 # Ubuntu 16.10
/usr/lib/gcc/alpha-linux-gnu/6
/usr/lib/gcc/aarch64-linux-gnu/6
/usr/lib/gcc/arm-linux-gnueabi/6
/usr/lib/gcc/arm-linux-gnueabihf/6
/usr/lib/gcc/hppa-linux-gnu/6
/usr/lib/gcc/i686-gnu/6
/usr/lib/gcc/i686-linux-gnu/6
/usr/lib/gcc/x86_64-kfreebsd-gnu/6
/usr/lib/gcc/i686-kfreebsd-gnu/6
/usr/lib/gcc/m68k-linux-gnu/6
/usr/lib/gcc/mips-linux-gnu/6
/usr/lib/gcc/mips64el-linux-gnuabi64/6
/usr/lib/gcc/mipsel-linux-gnu/6
/usr/lib/gcc/powerpc-linux-gnu/6
/usr/lib/gcc/powerpc-linux-gnuspe/6
/usr/lib/gcc/powerpc64-linux-gnu/6
/usr/lib/gcc/powerpc64le-linux-gnu/6
/usr/lib/gcc/s390x-linux-gnu/6
/usr/lib/gcc/sparc64-linux-gnu/6
/usr/lib/gcc/x86_64-linux-gnux32/6
/usr/lib/gcc/sh4-linux-gnu/6
/usr/lib/gcc/x86_64-linux-gnu/7 # Debian 9 Buster
/usr/lib/gcc/alpha-linux-gnu/7
/usr/lib/gcc/aarch64-linux-gnu/7
/usr/lib/gcc/arm-linux-gnueabi/7
/usr/lib/gcc/arm-linux-gnueabihf/7
/usr/lib/gcc/hppa-linux-gnu/7
/usr/lib/gcc/i686-gnu/7
/usr/lib/gcc/i686-linux-gnu/7
/usr/lib/gcc/x86_64-kfreebsd-gnu/7
/usr/lib/gcc/i686-kfreebsd-gnu/7
/usr/lib/gcc/m68k-linux-gnu/7
/usr/lib/gcc/mips-linux-gnu/7
/usr/lib/gcc/mips64el-linux-gnuabi64/7
/usr/lib/gcc/mipsel-linux-gnu/7
/usr/lib/gcc/powerpc-linux-gnu/7
/usr/lib/gcc/powerpc-linux-gnuspe/7
/usr/lib/gcc/powerpc64-linux-gnu/7
/usr/lib/gcc/powerpc64le-linux-gnu/7
/usr/lib/gcc/s390x-linux-gnu/7
/usr/lib/gcc/sparc64-linux-gnu/7
/usr/lib/gcc/x86_64-linux-gnux32/7
/usr/lib/gcc/sh4-linux-gnu/7
/usr/lib/x86_64-linux-gnu # libgfortran4
/usr/lib/i386-linux-gnu
/usr/lib/arm-linux-gnueabi
/usr/lib/arm-linux-gnueabihf
/usr/lib/aarch64-linux-gnu
/usr/lib/i386-gnu
/usr/lib/x86_64-kfreebsd-gnu
/usr/lib/i386-kfreebsd-gnu
/usr/lib/mips-linux-gnu
/usr/lib/mips64el-linux-gnuabi64
/usr/lib/mipsel-linux-gnu
/usr/lib/powerpc-linux-gnu
/usr/lib/powerpc64-linux-gnu
/usr/lib/powerpc64le-linux-gnu
/usr/lib/s390x-linux-gnu
/usr/lib/sh4-linux-gnu
/usr/lib/sparc64-linux-gnu
/usr/lib/x86_64-linux-gnux32
/usr/lib/alpha-linux-gnu
/usr/lib/gcc/x86_64-linux-gnu/8 # libgfortran8
/usr/lib/gcc/aarch64-linux-gnu/8
/usr/lib/gcc/arm-linux-gnueabihf/8
/usr/lib/gcc/i686-linux-gnu/8
/usr/lib/gcc/powerpc64le-linux-gnu/8
/usr/lib/gcc/s390x-linux-gnu/8
/usr/lib/gcc/alpha-linux-gnu/8
)
find_library(GFORTRAN NAMES gfortran
PATHS /usr/lib
/usr/lib64
/usr/local/lib
/usr/local/lib/i386
/usr/lib/gcc/x86_64-linux-gnu
/usr/lib/gcc/i686-linux-gnu
/usr/lib/gcc/i386-linux-gnu
/usr/lib/gcc/x86_64-linux-gnu/4.6 # Ubuntu 12.04
/usr/lib/gcc/i686-linux-gnu/4.6
/usr/lib/gcc/x86_64-linux-gnu/4.7
/usr/lib/gcc/i686-linux-gnu/4.7
/usr/lib/gcc/x86_64-linux-gnu/4.8
/usr/lib/gcc/i686-linux-gnu/4.8
/usr/lib/gcc/x86_64-linux-gnu/4.9
/usr/lib/gcc/i686-linux-gnu/4.9
/usr/lib/gcc/x86_64-redhat-linux/4.7.2 # Fedora 18
/usr/lib/gcc/i686-redhat-linux/4.7.2
/usr/lib/gcc/x86_64-redhat-linux/4.8.1 # Fedora 19
/usr/lib/gcc/x86_64-redhat-linux/4.8.3 # Fedora 20
/usr/lib/gcc/x86_64-redhat-linux/4.9.1 # Fedora 21
/usr/lib/gcc/i686-redhat-linux/4.8.1
/usr/lib/gcc/i686-redhat-linux/4.8.3
/usr/lib/gcc/i686-redhat-linux/4.9.1
/usr/lib/gcc/x86_64-redhat-linux/4.4.4 # CentOS 6
/usr/lib/gcc/i686-redhat-linux/4.4.4
/usr/lib/gcc/x86_64-redhat-linux/4.8.2
/usr/lib/gcc/i686-redhat-linux/4.8.2
/usr/lib/gcc/x86_64-redhat-linux/7
/usr/lib/gcc/i686-redhat-linux/7
/usr/lib/gcc/armv7hl-redhat-linux-gnueabi/7
/usr/lib/gcc/aarch64-redhat-linux/7
/usr/lib/gcc/i586-suse-linux/4.8 # OpenSUSE 13.1
/usr/lib/gcc/i586-suse-linux/4.9
/usr/lib/gcc/x86_64-suse-linux/4.8
/usr/lib/gcc/x86_64-suse-linux/4.9
/usr/lib/gcc/i486-linux-gnu # Debian 7
/usr/lib/gcc/i486-linux-gnu/4.4
/usr/lib/gcc/i486-linux-gnu/4.6
/usr/lib/gcc/i486-linux-gnu/4.7
/usr/lib/gcc/i486-linux-gnu/4.8
/usr/lib/gcc/i486-linux-gnu/4.9
/usr/lib/gcc/i586-linux-gnu/4.9
/usr/lib/gcc/arm-linux-gnueabihf/4.4 # Debian armhf
/usr/lib/gcc/arm-linux-gnueabihf/4.5
/usr/lib/gcc/arm-linux-gnueabihf/4.6
/usr/lib/gcc/arm-linux-gnueabihf/4.7
/usr/lib/gcc/arm-linux-gnueabihf/4.8
/usr/lib/gcc/arm-linux-gnueabihf/4.9
/usr/lib/gcc/aarch64-linux-gnu/4.9 # Debian arm64
/usr/lib/gcc/arm-linux-gnueabi/4.7 # Debian armel
/usr/lib/gcc/arm-linux-gnueabi/4.9
/usr/lib/gcc/x86_64-linux-gnu/5
/usr/lib/gcc/i686-linux-gnu/5
/usr/lib/gcc/arm-linux-gnueabi/5
/usr/lib/gcc/arm-linux-gnueabihf/5
/usr/lib/gcc/aarch64-linux-gnu/5
/usr/lib/gcc/x86_64-linux-gnu/6 # Ubuntu 16.10
/usr/lib/gcc/alpha-linux-gnu/6
/usr/lib/gcc/aarch64-linux-gnu/6
/usr/lib/gcc/arm-linux-gnueabi/6
/usr/lib/gcc/arm-linux-gnueabihf/6
/usr/lib/gcc/hppa-linux-gnu/6
/usr/lib/gcc/i686-gnu/6
/usr/lib/gcc/i686-linux-gnu/6
/usr/lib/gcc/x86_64-kfreebsd-gnu/6
/usr/lib/gcc/i686-kfreebsd-gnu/6
/usr/lib/gcc/m68k-linux-gnu/6
/usr/lib/gcc/mips-linux-gnu/6
/usr/lib/gcc/mips64el-linux-gnuabi64/6
/usr/lib/gcc/mipsel-linux-gnu/6
/usr/lib/gcc/powerpc-linux-gnu/6
/usr/lib/gcc/powerpc-linux-gnuspe/6
/usr/lib/gcc/powerpc64-linux-gnu/6
/usr/lib/gcc/powerpc64le-linux-gnu/6
/usr/lib/gcc/s390x-linux-gnu/6
/usr/lib/gcc/sparc64-linux-gnu/6
/usr/lib/gcc/x86_64-linux-gnux32/6
/usr/lib/gcc/sh4-linux-gnu/6
/usr/lib/gcc/x86_64-linux-gnu/7 # Debian 9 Buster
/usr/lib/gcc/alpha-linux-gnu/7
/usr/lib/gcc/aarch64-linux-gnu/7
/usr/lib/gcc/arm-linux-gnueabi/7
/usr/lib/gcc/arm-linux-gnueabihf/7
/usr/lib/gcc/hppa-linux-gnu/7
/usr/lib/gcc/i686-gnu/7
/usr/lib/gcc/i686-linux-gnu/7
/usr/lib/gcc/x86_64-kfreebsd-gnu/7
/usr/lib/gcc/i686-kfreebsd-gnu/7
/usr/lib/gcc/m68k-linux-gnu/7
/usr/lib/gcc/mips-linux-gnu/7
/usr/lib/gcc/mips64el-linux-gnuabi64/7
/usr/lib/gcc/mipsel-linux-gnu/7
/usr/lib/gcc/powerpc-linux-gnu/7
/usr/lib/gcc/powerpc-linux-gnuspe/7
/usr/lib/gcc/powerpc64-linux-gnu/7
/usr/lib/gcc/powerpc64le-linux-gnu/7
/usr/lib/gcc/s390x-linux-gnu/7
/usr/lib/gcc/sparc64-linux-gnu/7
/usr/lib/gcc/x86_64-linux-gnux32/7
/usr/lib/gcc/sh4-linux-gnu/7
/usr/lib/x86_64-linux-gnu # libgfortran4
/usr/lib/i386-linux-gnu
/usr/lib/arm-linux-gnueabi
/usr/lib/arm-linux-gnueabihf
/usr/lib/aarch64-linux-gnu
/usr/lib/i386-gnu
/usr/lib/x86_64-kfreebsd-gnu
/usr/lib/i386-kfreebsd-gnu
/usr/lib/mips-linux-gnu
/usr/lib/mips64el-linux-gnuabi64
/usr/lib/mipsel-linux-gnu
/usr/lib/powerpc-linux-gnu
/usr/lib/powerpc64-linux-gnu
/usr/lib/powerpc64le-linux-gnu
/usr/lib/s390x-linux-gnu
/usr/lib/sh4-linux-gnu
/usr/lib/sparc64-linux-gnu
/usr/lib/x86_64-linux-gnux32
/usr/lib/alpha-linux-gnu
/usr/lib/gcc/x86_64-linux-gnu/8 # libgfortran8
/usr/lib/gcc/aarch64-linux-gnu/8
/usr/lib/gcc/arm-linux-gnueabihf/8
/usr/lib/gcc/i686-linux-gnu/8
/usr/lib/gcc/powerpc64le-linux-gnu/8
/usr/lib/gcc/s390x-linux-gnu/8
/usr/lib/gcc/alpha-linux-gnu/8
)
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GFORTRAN DEFAULT_MSG GFORTRAN)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GFORTRAN DEFAULT_MSG GFORTRAN)

View File

@ -1,102 +0,0 @@
# Copyright (C) 2011-2018 (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/>.
# - Try to find GFlags
#
# The following variables are optionally searched for defaults
# GFlags_ROOT_DIR: Base directory where all GFlags components are found
#
# The following are set after configuration is done:
# GFlags_FOUND
# GFlags_INCLUDE_DIRS
# GFlags_LIBS
# GFlags_LIBRARY_DIRS
cmake_minimum_required(VERSION 2.6)
if(APPLE)
FIND_PATH(GFlags_ROOT_DIR
libgflags.dylib
PATHS
/opt/local/lib
/usr/local/lib
)
else(APPLE)
FIND_PATH(GFlags_ROOT_DIR
libgflags.so
HINTS
/usr/local/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/i386-linux-gnu
/usr/lib/arm-linux-gnueabihf
/usr/lib/arm-linux-gnueabi
/usr/lib/aarch64-linux-gnu
/usr/lib/mipsel-linux-gnu
/usr/lib/mips-linux-gnu
/usr/lib/mips64el-linux-gnuabi64
/usr/lib/powerpc-linux-gnu
/usr/lib/powerpc64-linux-gnu
/usr/lib/powerpc64le-linux-gnu
/usr/lib/powerpc-linux-gnuspe
/usr/lib/hppa-linux-gnu
/usr/lib/s390x-linux-gnu
/usr/lib/i386-gnu
/usr/lib/hppa-linux-gnu
/usr/lib/x86_64-kfreebsd-gnu
/usr/lib/i386-kfreebsd-gnu
/usr/lib/m68k-linux-gnu
/usr/lib/sh4-linux-gnu
/usr/lib/sparc64-linux-gnu
/usr/lib/x86_64-linux-gnux32
/usr/lib/alpha-linux-gnu
/usr/lib64
/usr/lib
)
endif(APPLE)
IF(GFlags_ROOT_DIR)
# We are testing only a couple of files in the include directories
FIND_PATH(GFlags_INCLUDE_DIRS
gflags/gflags.h
HINTS
/opt/local/include
/usr/local/include
/usr/include
${GFlags_ROOT_DIR}/src
)
# Find the libraries
SET(GFlags_LIBRARY_DIRS ${GFlags_ROOT_DIR})
FIND_LIBRARY(GFlags_lib gflags ${GFlags_LIBRARY_DIRS})
if(EXISTS ${GFlags_INCLUDE_DIRS}/gflags/gflags_gflags.h)
set(GFLAGS_GREATER_20 TRUE)
else(EXISTS ${GFlags_INCLUDE_DIRS}/gflags/gflags_gflags.h)
set(GFLAGS_GREATER_20 FALSE)
endif(EXISTS ${GFlags_INCLUDE_DIRS}/gflags/gflags_gflags.h)
# set up include and link directory
include_directories(${GFlags_INCLUDE_DIRS})
link_directories(${GFlags_LIBRARY_DIRS})
message(STATUS "gflags library found at ${GFlags_lib}")
SET(GFlags_LIBS ${GFlags_lib})
SET(GFlags_FOUND true)
MARK_AS_ADVANCED(GFlags_INCLUDE_DIRS)
ELSE(GFlags_ROOT_DIR)
MESSAGE(STATUS "Cannot find gflags")
SET(GFlags_FOUND false)
ENDIF(GFlags_ROOT_DIR)

View File

@ -28,20 +28,20 @@
# GLOG_ROOT - Can be set to Glog install path or Windows build path
#
if (NOT DEFINED GLOG_ROOT)
set (GLOG_ROOT /usr /usr/local)
endif (NOT DEFINED GLOG_ROOT)
if(NOT DEFINED GLOG_ROOT)
set(GLOG_ROOT /usr /usr/local)
endif()
if(MSVC)
set(LIB_PATHS ${GLOG_ROOT} ${GLOG_ROOT}/Release)
else(MSVC)
set (LIB_PATHS ${GLOG_ROOT} ${GLOG_ROOT}/lib)
endif(MSVC)
set(LIB_PATHS ${GLOG_ROOT} ${GLOG_ROOT}/Release)
else()
set(LIB_PATHS ${GLOG_ROOT} ${GLOG_ROOT}/lib)
endif()
macro(_FIND_GLOG_LIBRARIES _var)
find_library(${_var}
NAMES ${ARGN}
PATHS ${LIB_PATHS}
find_library(${_var}
NAMES ${ARGN}
PATHS ${LIB_PATHS}
/usr/local/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/i386-linux-gnu
@ -70,46 +70,46 @@ macro(_FIND_GLOG_LIBRARIES _var)
/usr/lib
PATH_SUFFIXES lib
)
mark_as_advanced(${_var})
mark_as_advanced(${_var})
endmacro()
macro(_GLOG_APPEND_LIBRARIES _list _release)
set(_debug ${_release}_DEBUG)
if(${_debug})
set(${_list} ${${_list}} optimized ${${_release}} debug ${${_debug}})
set(${_list} ${${_list}} optimized ${${_release}} debug ${${_debug}})
else()
set(${_list} ${${_list}} ${${_release}})
set(${_list} ${${_list}} ${${_release}})
endif()
endmacro()
if(MSVC)
find_path(GLOG_INCLUDE_DIR NAMES raw_logging.h
PATHS
${GLOG_ROOT}/src/windows
${GLOG_ROOT}/src/windows/glog
)
else(MSVC)
# Linux/OS X builds
find_path(GLOG_INCLUDE_DIR NAMES raw_logging.h
PATHS
${GLOG_ROOT}/include/glog
/usr/include/glog
/opt/local/include/glog # default location in Macports
)
endif(MSVC)
find_path(GLOG_INCLUDE_DIR NAMES raw_logging.h
PATHS
${GLOG_ROOT}/src/windows
${GLOG_ROOT}/src/windows/glog
)
else()
# Linux/OS X builds
find_path(GLOG_INCLUDE_DIR NAMES raw_logging.h
PATHS
${GLOG_ROOT}/include/glog
/usr/include/glog
/opt/local/include/glog # default location in Macports
)
endif()
# Find the libraries
if(MSVC)
_FIND_GLOG_LIBRARIES(GLOG_LIBRARIES libglog.lib)
else(MSVC)
# Linux/OS X builds
if(UNIX)
_FIND_GLOG_LIBRARIES(GLOG_LIBRARIES libglog.so)
endif(UNIX)
if(APPLE)
_FIND_GLOG_LIBRARIES(GLOG_LIBRARIES libglog.dylib)
endif(APPLE)
endif(MSVC)
_find_glog_libraries(GLOG_LIBRARIES libglog.lib)
else()
# Linux/OS X builds
if(UNIX)
_find_glog_libraries(GLOG_LIBRARIES libglog.so)
endif()
if(APPLE)
_find_glog_libraries(GLOG_LIBRARIES libglog.dylib)
endif()
endif()
if(GLOG_FOUND)
message(STATUS "glog library found at ${GLOG_LIBRARIES}")
@ -117,21 +117,20 @@ endif()
# handle the QUIETLY and REQUIRED arguments and set GLOG_FOUND to TRUE if
# all listed variables are TRUE
include("${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Glog DEFAULT_MSG
GLOG_LIBRARIES)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GLOG DEFAULT_MSG GLOG_LIBRARIES)
if(MSVC)
string(REGEX REPLACE "/glog$" "" VAR_WITHOUT ${GLOG_INCLUDE_DIR})
string(REGEX REPLACE "/windows$" "" VAR_WITHOUT ${VAR_WITHOUT})
set(GLOG_INCLUDE_DIRS ${GLOG_INCLUDE_DIRS} "${VAR_WITHOUT}")
string(REGEX REPLACE "/libglog.lib" "" GLOG_LIBRARIES_DIR ${GLOG_LIBRARIES})
else(MSVC)
# Linux/OS X builds
set(GLOG_INCLUDE_DIRS ${GLOG_INCLUDE_DIR})
string(REGEX REPLACE "/libglog.so" "" GLOG_LIBRARIES_DIR ${GLOG_LIBRARIES})
endif(MSVC)
string(REGEX REPLACE "/glog$" "" VAR_WITHOUT ${GLOG_INCLUDE_DIR})
string(REGEX REPLACE "/windows$" "" VAR_WITHOUT ${VAR_WITHOUT})
set(GLOG_INCLUDE_DIRS ${GLOG_INCLUDE_DIRS} "${VAR_WITHOUT}")
string(REGEX REPLACE "/libglog.lib" "" GLOG_LIBRARIES_DIR ${GLOG_LIBRARIES})
else()
# Linux/OS X builds
set(GLOG_INCLUDE_DIRS ${GLOG_INCLUDE_DIR})
string(REGEX REPLACE "/libglog.so" "" GLOG_LIBRARIES_DIR ${GLOG_LIBRARIES})
endif()
if(GLOG_FOUND)
# _GLOG_APPEND_LIBRARIES(GLOG GLOG_LIBRARIES)
# _GLOG_APPEND_LIBRARIES(GLOG GLOG_LIBRARIES)
endif()

View File

@ -15,14 +15,13 @@
# You should have received a copy of the GNU General Public License
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
find_program(SW_GENERATOR_BIN gnss_sim
PATHS /usr/bin
/usr/local/bin
/opt/local/bin
${CMAKE_INSTALL_PREFIX}/bin
PATH_SUFFIXES bin )
PATHS /usr/bin
/usr/local/bin
/opt/local/bin
${CMAKE_INSTALL_PREFIX}/bin
PATH_SUFFIXES bin)
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GNSS-SIMULATOR DEFAULT_MSG SW_GENERATOR_BIN)
MARK_AS_ADVANCED(SW_GENERATOR_BIN)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GNSSSIMULATOR DEFAULT_MSG SW_GENERATOR_BIN)
mark_as_advanced(SW_GENERATOR_BIN)

View File

@ -19,15 +19,14 @@
# Find GNU Radio
########################################################################
INCLUDE(FindPkgConfig)
INCLUDE(FindPackageHandleStandardArgs)
include(FindPkgConfig)
include(FindPackageHandleStandardArgs)
# if GR_REQUIRED_COMPONENTS is not defined, it will be set to the following list
if(NOT GR_REQUIRED_COMPONENTS)
set(GR_REQUIRED_COMPONENTS RUNTIME ANALOG BLOCKS DIGITAL FFT FILTER PMT FEC TRELLIS UHD)
endif()
# Allows us to use all .cmake files in this directory
list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_CURRENT_LIST_DIR})
@ -35,18 +34,17 @@ list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_CURRENT_LIST_DIR})
set(GNURADIO_ALL_LIBRARIES "")
set(GNURADIO_ALL_INCLUDE_DIRS "")
MACRO(LIST_CONTAINS var value)
SET(${var})
FOREACH(value2 ${ARGN})
IF (${value} STREQUAL ${value2})
SET(${var} TRUE)
ENDIF(${value} STREQUAL ${value2})
ENDFOREACH(value2)
ENDMACRO(LIST_CONTAINS)
macro(LIST_CONTAINS var value)
set(${var})
foreach(value2 ${ARGN})
if(${value} STREQUAL ${value2})
set(${var} TRUE)
endif()
endforeach()
endmacro()
function(GR_MODULE EXTVAR PCNAME INCFILE LIBFILE)
LIST_CONTAINS(REQUIRED_MODULE ${EXTVAR} ${GR_REQUIRED_COMPONENTS})
list_contains(REQUIRED_MODULE ${EXTVAR} ${GR_REQUIRED_COMPONENTS})
if(NOT REQUIRED_MODULE)
#message("Ignoring GNU Radio Module ${EXTVAR}")
return()
@ -55,7 +53,7 @@ function(GR_MODULE EXTVAR PCNAME INCFILE LIBFILE)
message(STATUS "Checking for GNU Radio Module: ${EXTVAR}")
# check for .pc hints
PKG_CHECK_MODULES(PC_GNURADIO_${EXTVAR} ${PCNAME})
pkg_check_modules(PC_GNURADIO_${EXTVAR} ${PCNAME})
if(NOT PC_GNURADIO_${EXTVAR}_FOUND)
set(PC_GNURADIO_${EXTVAR}_LIBRARIES ${LIBFILE})
@ -67,7 +65,7 @@ function(GR_MODULE EXTVAR PCNAME INCFILE LIBFILE)
set(PC_LIBDIR ${PC_GNURADIO_${EXTVAR}_LIBDIR})
# look for include files
FIND_PATH(
find_path(
${INCVAR_NAME}
NAMES ${INCFILE}
HINTS $ENV{GNURADIO_RUNTIME_DIR}/include
@ -81,7 +79,7 @@ function(GR_MODULE EXTVAR PCNAME INCFILE LIBFILE)
# look for libs
foreach(libname ${PC_GNURADIO_${EXTVAR}_LIBRARIES})
FIND_LIBRARY(
find_library(
${LIBVAR_NAME}_${libname}
NAMES ${libname} ${libname}-${PC_GNURADIO_RUNTIME_VERSION}
HINTS $ENV{GNURADIO_RUNTIME_DIR}/lib
@ -118,8 +116,8 @@ function(GR_MODULE EXTVAR PCNAME INCFILE LIBFILE)
/usr/lib
${GNURADIO_INSTALL_PREFIX}/lib
)
list(APPEND ${LIBVAR_NAME} ${${LIBVAR_NAME}_${libname}})
endforeach(libname)
list(APPEND ${LIBVAR_NAME} ${${LIBVAR_NAME}_${libname}})
endforeach()
set(${LIBVAR_NAME} ${${LIBVAR_NAME}} PARENT_SCOPE)
@ -131,43 +129,42 @@ function(GR_MODULE EXTVAR PCNAME INCFILE LIBFILE)
set(GNURADIO_ALL_INCLUDE_DIRS ${GNURADIO_ALL_INCLUDE_DIRS} ${GNURADIO_${EXTVAR}_INCLUDE_DIRS} PARENT_SCOPE)
set(GNURADIO_ALL_LIBRARIES ${GNURADIO_ALL_LIBRARIES} ${GNURADIO_${EXTVAR}_LIBRARIES} PARENT_SCOPE)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GNURADIO_${EXTVAR} DEFAULT_MSG GNURADIO_${EXTVAR}_LIBRARIES GNURADIO_${EXTVAR}_INCLUDE_DIRS)
find_package_handle_standard_args(GNURADIO_${EXTVAR} DEFAULT_MSG GNURADIO_${EXTVAR}_LIBRARIES GNURADIO_${EXTVAR}_INCLUDE_DIRS)
message(STATUS "GNURADIO_${EXTVAR}_FOUND = ${GNURADIO_${EXTVAR}_FOUND}")
set(GNURADIO_${EXTVAR}_FOUND ${GNURADIO_${EXTVAR}_FOUND} PARENT_SCOPE)
# generate an error if the module is missing
if(NOT GNURADIO_${EXTVAR}_FOUND)
message(STATUS "Required GNU Radio Component: ${EXTVAR} missing!")
message(STATUS "Required GNU Radio Component: ${EXTVAR} missing!")
endif()
MARK_AS_ADVANCED(GNURADIO_${EXTVAR}_LIBRARIES GNURADIO_${EXTVAR}_INCLUDE_DIRS)
mark_as_advanced(GNURADIO_${EXTVAR}_LIBRARIES GNURADIO_${EXTVAR}_INCLUDE_DIRS)
endfunction()
GR_MODULE(RUNTIME gnuradio-runtime gnuradio/top_block.h gnuradio-runtime)
GR_MODULE(ANALOG gnuradio-analog gnuradio/analog/api.h gnuradio-analog)
GR_MODULE(AUDIO gnuradio-audio gnuradio/audio/api.h gnuradio-audio)
GR_MODULE(BLOCKS gnuradio-blocks gnuradio/blocks/api.h gnuradio-blocks)
GR_MODULE(CHANNELS gnuradio-channels gnuradio/channels/api.h gnuradio-channels)
GR_MODULE(DIGITAL gnuradio-digital gnuradio/digital/api.h gnuradio-digital)
GR_MODULE(FCD gnuradio-fcd gnuradio/fcd_api.h gnuradio-fcd)
GR_MODULE(FEC gnuradio-fec gnuradio/fec/api.h gnuradio-fec)
GR_MODULE(FFT gnuradio-fft gnuradio/fft/api.h gnuradio-fft)
GR_MODULE(FILTER gnuradio-filter gnuradio/filter/api.h gnuradio-filter)
GR_MODULE(NOAA gnuradio-noaa gnuradio/noaa/api.h gnuradio-noaa)
GR_MODULE(PAGER gnuradio-pager gnuradio/pager/api.h gnuradio-pager)
GR_MODULE(QTGUI gnuradio-qtgui gnuradio/qtgui/api.h gnuradio-qtgui)
GR_MODULE(TRELLIS gnuradio-trellis gnuradio/trellis/api.h gnuradio-trellis)
GR_MODULE(UHD gnuradio-uhd gnuradio/uhd/api.h gnuradio-uhd)
GR_MODULE(VOCODER gnuradio-vocoder gnuradio/vocoder/api.h gnuradio-vocoder)
GR_MODULE(WAVELET gnuradio-wavelet gnuradio/wavelet/api.h gnuradio-wavelet)
GR_MODULE(WXGUI gnuradio-wxgui gnuradio/wxgui/api.h gnuradio-wxgui)
GR_MODULE(PMT gnuradio-runtime pmt/pmt.h gnuradio-pmt)
gr_module(RUNTIME gnuradio-runtime gnuradio/top_block.h gnuradio-runtime)
gr_module(ANALOG gnuradio-analog gnuradio/analog/api.h gnuradio-analog)
gr_module(AUDIO gnuradio-audio gnuradio/audio/api.h gnuradio-audio)
gr_module(BLOCKS gnuradio-blocks gnuradio/blocks/api.h gnuradio-blocks)
gr_module(CHANNELS gnuradio-channels gnuradio/channels/api.h gnuradio-channels)
gr_module(DIGITAL gnuradio-digital gnuradio/digital/api.h gnuradio-digital)
gr_module(FCD gnuradio-fcd gnuradio/fcd_api.h gnuradio-fcd)
gr_module(FEC gnuradio-fec gnuradio/fec/api.h gnuradio-fec)
gr_module(FFT gnuradio-fft gnuradio/fft/api.h gnuradio-fft)
gr_module(FILTER gnuradio-filter gnuradio/filter/api.h gnuradio-filter)
gr_module(NOAA gnuradio-noaa gnuradio/noaa/api.h gnuradio-noaa)
gr_module(PAGER gnuradio-pager gnuradio/pager/api.h gnuradio-pager)
gr_module(QTGUI gnuradio-qtgui gnuradio/qtgui/api.h gnuradio-qtgui)
gr_module(TRELLIS gnuradio-trellis gnuradio/trellis/api.h gnuradio-trellis)
gr_module(UHD gnuradio-uhd gnuradio/uhd/api.h gnuradio-uhd)
gr_module(VOCODER gnuradio-vocoder gnuradio/vocoder/api.h gnuradio-vocoder)
gr_module(WAVELET gnuradio-wavelet gnuradio/wavelet/api.h gnuradio-wavelet)
gr_module(WXGUI gnuradio-wxgui gnuradio/wxgui/api.h gnuradio-wxgui)
gr_module(PMT gnuradio-runtime pmt/pmt.h gnuradio-pmt)
list(REMOVE_DUPLICATES GNURADIO_ALL_INCLUDE_DIRS)
list(REMOVE_DUPLICATES GNURADIO_ALL_LIBRARIES)
# Trick to find out that GNU Radio is >= 3.7.4 if pkgconfig is not present
# Trick to find out that GNU Radio is >= 3.7.4 if pkgconfig is not present
if(NOT PC_GNURADIO_RUNTIME_VERSION)
find_file(GNURADIO_VERSION_GREATER_THAN_373
NAMES gnuradio/blocks/tsb_vector_sink_f.h
@ -178,20 +175,20 @@ if(NOT PC_GNURADIO_RUNTIME_VERSION)
/usr/include
${GNURADIO_INSTALL_PREFIX}/include
)
if(GNURADIO_VERSION_GREATER_THAN_373)
set(PC_GNURADIO_RUNTIME_VERSION "3.7.4+")
endif(GNURADIO_VERSION_GREATER_THAN_373)
if(GNURADIO_VERSION_GREATER_THAN_373)
set(PC_GNURADIO_RUNTIME_VERSION "3.7.4+")
endif()
find_file(GNURADIO_VERSION_GREATER_THAN_38
NAMES gnuradio/filter/mmse_resampler_cc.h
HINTS $ENV{GNURADIO_RUNTIME_DIR}/include
${CMAKE_INSTALL_PREFIX}/include
${GNURADIO_INSTALL_PREFIX}/include
PATHS /usr/local/include
/usr/include
${GNURADIO_INSTALL_PREFIX}/include
)
if(GNURADIO_VERSION_GREATER_THAN_38)
set(PC_GNURADIO_RUNTIME_VERSION "3.8.0+")
endif(GNURADIO_VERSION_GREATER_THAN_38)
endif(NOT PC_GNURADIO_RUNTIME_VERSION)
find_file(GNURADIO_VERSION_GREATER_THAN_38
NAMES gnuradio/filter/mmse_resampler_cc.h
HINTS $ENV{GNURADIO_RUNTIME_DIR}/include
${CMAKE_INSTALL_PREFIX}/include
${GNURADIO_INSTALL_PREFIX}/include
PATHS /usr/local/include
/usr/include
${GNURADIO_INSTALL_PREFIX}/include
)
if(GNURADIO_VERSION_GREATER_THAN_38)
set(PC_GNURADIO_RUNTIME_VERSION "3.8.0+")
endif()
endif()

View File

@ -19,7 +19,7 @@
#
# Usage of this module as follows:
#
# find_package(Gperftools)
# find_package(GPERFTOOLS)
#
# Variables used by this module, they can change the default behaviour and need
# to be set before calling find_package:
@ -54,7 +54,7 @@ set(GPERFTOOLS_LIBRARIES ${GPERFTOOLS_TCMALLOC_AND_PROFILER})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
Gperftools
GPERFTOOLS
DEFAULT_MSG
GPERFTOOLS_LIBRARIES
GPERFTOOLS_INCLUDE_DIR
@ -66,4 +66,4 @@ mark_as_advanced(
GPERFTOOLS_PROFILER
GPERFTOOLS_TCMALLOC_AND_PROFILER
GPERFTOOLS_LIBRARIES
GPERFTOOLS_INCLUDE_DIR)
GPERFTOOLS_INCLUDE_DIR)

View File

@ -19,29 +19,22 @@
# Find the native gpstk includes and library
# This module defines
# GPSTK_INCLUDE_DIR, where to find Rinex3ObsBase.hpp, etc.
# GPSTK_LIBRARIES, libraries to link against to use GPSTK.
# GPSTK_FOUND, If false, do not try to use GPSTK.
# also defined, but not for general use are
# GPSTK_LIBRARY, where to find the GPSTK library.
FIND_PATH(GPSTK_INCLUDE_DIR gpstk/Rinex3ObsBase.hpp
HINTS /usr/include
/usr/local/include
/opt/local/include )
find_path(GPSTK_INCLUDE_DIR gpstk/Rinex3ObsBase.hpp
HINTS /usr/include
/usr/local/include
/opt/local/include)
SET(GPSTK_NAMES ${GPSTK_NAMES} gpstk libgpstk)
FIND_LIBRARY(GPSTK_LIBRARY NAMES ${GPSTK_NAMES}
HINTS /usr/lib
/usr/local/lib
/opt/local/lib )
set(GPSTK_NAMES ${GPSTK_NAMES} gpstk libgpstk)
find_library(GPSTK_LIBRARY NAMES ${GPSTK_NAMES}
HINTS /usr/lib
/usr/local/lib
/opt/local/lib)
# handle the QUIETLY and REQUIRED arguments and set GPSTK_FOUND to TRUE if
# handle the QUIETLY and REQUIRED arguments and set GPSTK_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GPSTK DEFAULT_MSG GPSTK_LIBRARY GPSTK_INCLUDE_DIR)
IF(GPSTK_FOUND)
SET( GPSTK_LIBRARIES ${GPSTK_LIBRARY} )
ENDIF(GPSTK_FOUND)
MARK_AS_ADVANCED(GPSTK_INCLUDE_DIR GPSTK_LIBRARY)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GPSTK DEFAULT_MSG GPSTK_LIBRARY GPSTK_INCLUDE_DIR)
mark_as_advanced(GPSTK_INCLUDE_DIR GPSTK_LIBRARY GPSTK_INCLUDE_DIR)

View File

@ -19,20 +19,20 @@
# Find GR-DBFCTTC Module
########################################################################
INCLUDE(FindPkgConfig)
PKG_CHECK_MODULES(PC_GR_DBFCTTC gr-dbfcttc)
include(FindPkgConfig)
pkg_check_modules(PC_GR_DBFCTTC gr-dbfcttc)
FIND_PATH(
find_path(
GR_DBFCTTC_INCLUDE_DIRS
NAMES dbfcttc/api.h
HINTS $ENV{GR_DBFCTTC_DIR}/include
${PC_GR_DBFCTTC_INCLUDEDIR}
PATHS ${CMAKE_INSTALL_PREFIX}/include
/usr/include
/usr/include
/usr/local/include
)
FIND_LIBRARY(
find_library(
GR_DBFCTTC_LIBRARIES
NAMES gnuradio-dbfcttc
HINTS $ENV{GR_DBFCTTC_DIR}/lib
@ -45,6 +45,6 @@ FIND_LIBRARY(
/usr/local/lib64
)
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GR_DBFCTTC DEFAULT_MSG GR_DBFCTTC_LIBRARIES GR_DBFCTTC_INCLUDE_DIRS)
MARK_AS_ADVANCED(GR_DBFCTTC_LIBRARIES GR_DBFCTTC_INCLUDE_DIRS)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GRDBFCTTC DEFAULT_MSG GR_DBFCTTC_LIBRARIES GR_DBFCTTC_INCLUDE_DIRS)
mark_as_advanced(GR_DBFCTTC_LIBRARIES GR_DBFCTTC_INCLUDE_DIRS)

View File

@ -19,10 +19,10 @@
# Find GR-GN3S Module
########################################################################
INCLUDE(FindPkgConfig)
PKG_CHECK_MODULES(PC_GR_GN3S gr-gn3s)
include(FindPkgConfig)
pkg_check_modules(PC_GR_GN3S gr-gn3s)
FIND_PATH(
find_path(
GR_GN3S_INCLUDE_DIRS
NAMES gn3s/gn3s_api.h
HINTS $ENV{GR_GN3S_DIR}/include
@ -32,7 +32,7 @@ FIND_PATH(
/usr/include
)
FIND_LIBRARY(
find_library(
GR_GN3S_LIBRARIES
NAMES gr-gn3s
HINTS $ENV{GR_GN3S_DIR}/lib
@ -45,6 +45,6 @@ FIND_LIBRARY(
/usr/lib64
)
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GR_GN3S DEFAULT_MSG GR_GN3S_LIBRARIES GR_GN3S_INCLUDE_DIRS)
MARK_AS_ADVANCED(GR_GN3S_LIBRARIES GR_GN3S_INCLUDE_DIRS)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GRGN3S DEFAULT_MSG GR_GN3S_LIBRARIES GR_GN3S_INCLUDE_DIRS)
mark_as_advanced(GR_GN3S_LIBRARIES GR_GN3S_INCLUDE_DIRS)

View File

@ -15,10 +15,10 @@
# You should have received a copy of the GNU General Public License
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
INCLUDE(FindPkgConfig)
PKG_CHECK_MODULES(PC_IIO gnuradio-iio)
include(FindPkgConfig)
pkg_check_modules(PC_IIO gnuradio-iio)
FIND_PATH(
find_path(
IIO_INCLUDE_DIRS
NAMES gnuradio/iio/api.h
HINTS $ENV{IIO_DIR}/include
@ -28,7 +28,7 @@ FIND_PATH(
/usr/include
)
FIND_LIBRARY(
find_library(
IIO_LIBRARIES
NAMES gnuradio-iio
HINTS $ENV{IIO_DIR}/lib
@ -63,6 +63,6 @@ FIND_LIBRARY(
/usr/lib/sh4-linux-gnu
)
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(IIO DEFAULT_MSG IIO_LIBRARIES IIO_INCLUDE_DIRS)
MARK_AS_ADVANCED(IIO_LIBRARIES IIO_INCLUDE_DIRS)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GRIIO DEFAULT_MSG IIO_LIBRARIES IIO_INCLUDE_DIRS)
mark_as_advanced(IIO_LIBRARIES IIO_INCLUDE_DIRS)

View File

@ -19,7 +19,7 @@
#
# Usage of this module as follows:
#
# find_package(GrOsmoSDR)
# find_package(GROSMOSDR)
#
# Variables used by this module, they can change the default behaviour and need
# to be set before calling find_package:
@ -34,20 +34,19 @@
# GROSMOSDR_LIBRARIES The gr-osmosdr libraries (gnuradio-osmosdr)
# GROSMOSDR_INCLUDE_DIR The location of gr-osmosdr headers
if(NOT GROSMOSDR_FOUND)
pkg_check_modules (GROSMOSDR_PKG gnuradio-osmosdr)
find_path(GROSMOSDR_INCLUDE_DIR
NAMES osmosdr/source.h
osmosdr/api.h
PATHS
${GROSMOSDR_PKG_INCLUDE_DIRS}
/usr/include
/usr/local/include
)
pkg_check_modules(GROSMOSDR_PKG gnuradio-osmosdr)
find_path(GROSMOSDR_INCLUDE_DIR
NAMES osmosdr/source.h
osmosdr/api.h
PATHS
${GROSMOSDR_PKG_INCLUDE_DIRS}
/usr/include
/usr/local/include
)
find_library(GROSMOSDR_LIBRARIES
NAMES gnuradio-osmosdr
PATHS
find_library(GROSMOSDR_LIBRARIES
NAMES gnuradio-osmosdr
PATHS
${GROSMOSDR_PKG_LIBRARY_DIRS}
/usr/lib
/usr/local/lib
@ -75,16 +74,8 @@ if(NOT GROSMOSDR_FOUND)
/usr/lib/x86_64-linux-gnux32
/usr/lib/alpha-linux-gnu
/usr/lib64
)
)
if(GROSMOSDR_INCLUDE_DIR AND GROSMOSDR_LIBRARIES)
set(GROSMOSDR_FOUND TRUE CACHE INTERNAL "gnuradio-osmosdr found")
message(STATUS "Found gnuradio-osmosdr: ${GROSMOSDR_INCLUDE_DIR}, ${GROSMOSDR_LIBRARIES}")
else(GROSMOSDR_INCLUDE_DIR AND GROSMOSDR_LIBRARIES)
set(GROSMOSDR_FOUND FALSE CACHE INTERNAL "gnuradio-osmosdr found")
message(STATUS "gnuradio-osmosdr not found.")
endif(GROSMOSDR_INCLUDE_DIR AND GROSMOSDR_LIBRARIES)
mark_as_advanced(GROSMOSDR_INCLUDE_DIR GROSMOSDR_LIBRARIES)
endif(NOT GROSMOSDR_FOUND)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GROSMOSDR DEFAULT_MSG GROSMOSDR_LIBRARIES GROSMOSDR_INCLUDE_DIR)
mark_as_advanced(GROSMOSDR_LIBRARIES GROSMOSDR_INCLUDE_DIR)

View File

@ -15,10 +15,10 @@
# You should have received a copy of the GNU General Public License
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
INCLUDE(FindPkgConfig)
PKG_CHECK_MODULES(PC_LIBIIO libiio)
include(FindPkgConfig)
pkg_check_modules(PC_LIBIIO libiio)
FIND_PATH(
find_path(
LIBIIO_INCLUDE_DIRS
NAMES iio.h
HINTS $ENV{LIBIIO_DIR}/include
@ -29,7 +29,7 @@ FIND_PATH(
/opt/local/include
)
FIND_LIBRARY(
find_library(
LIBIIO_LIBRARIES
NAMES iio libiio.so.0
HINTS $ENV{LIBIIO_DIR}/lib
@ -65,6 +65,6 @@ FIND_LIBRARY(
/Library/Frameworks/iio.framework/
)
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBIIO DEFAULT_MSG LIBIIO_LIBRARIES LIBIIO_INCLUDE_DIRS)
MARK_AS_ADVANCED(LIBIIO_LIBRARIES LIBIIO_INCLUDE_DIRS)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LIBIIO DEFAULT_MSG LIBIIO_LIBRARIES LIBIIO_INCLUDE_DIRS)
mark_as_advanced(LIBIIO_LIBRARIES LIBIIO_INCLUDE_DIRS)

View File

@ -19,27 +19,25 @@
#
# Usage of this module as follows:
#
# find_package(LibOsmoSDR)
# find_package(LIBOSMOSDR)
#
#
# Variables defined by this module:
#
# LIBOSMOSDR_FOUND System has libosmosdr libs/headers
# LIBOSMOSDR_LIBRARIES The libosmosdr libraries
# LIBOSMOSDR_LIBRARIES The libosmosdr libraries
# LIBOSMOSDR_INCLUDE_DIR The location of libosmosdr headers
pkg_check_modules(LIBOSMOSDR_PKG libosmosdr)
find_path(LIBOSMOSDR_INCLUDE_DIR NAMES osmosdr.h
PATHS
${LIBOSMOSDR_PKG_INCLUDE_DIRS}
/usr/include
/usr/local/include
)
if(NOT LIBOSMOSDR_FOUND)
pkg_check_modules (LIBOSMOSDR_PKG libosmosdr)
find_path(LIBOSMOSDR_INCLUDE_DIR NAMES osmosdr.h
PATHS
${LIBOSMOSDR_PKG_INCLUDE_DIRS}
/usr/include
/usr/local/include
)
find_library(LIBOSMOSDR_LIBRARIES NAMES osmosdr
PATHS
find_library(LIBOSMOSDR_LIBRARIES NAMES osmosdr
PATHS
${LIBOSMOSDR_PKG_LIBRARY_DIRS}
/usr/lib
/usr/local/lib
@ -69,14 +67,6 @@ if(NOT LIBOSMOSDR_FOUND)
/usr/lib64
)
if(LIBOSMOSDR_INCLUDE_DIR AND LIBOSMOSDR_LIBRARIES)
set(LIBOSMOSDR_FOUND TRUE CACHE INTERNAL "libosmosdr found")
message(STATUS "Found libosmosdr: ${LIBOSMOSDR_INCLUDE_DIR}, ${LIBOSMOSDR_LIBRARIES}")
else(LIBOSMOSDR_INCLUDE_DIR AND LIBOSMOSDR_LIBRARIES)
set(LIBOSMOSDR_FOUND FALSE CACHE INTERNAL "libosmosdr found")
message(STATUS "libosmosdr not found.")
endif(LIBOSMOSDR_INCLUDE_DIR AND LIBOSMOSDR_LIBRARIES)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LIBOSMOSDR DEFAULT_MSG LIBOSMOSDR_INCLUDE_DIR LIBOSMOSDR_LIBRARIES)
mark_as_advanced(LIBOSMOSDR_INCLUDE_DIR LIBOSMOSDR_LIBRARIES)
endif(NOT LIBOSMOSDR_FOUND)

View File

@ -23,10 +23,10 @@
# LOG4CPP_FOUND - True if LOG4CPP found.
if (LOG4CPP_INCLUDE_DIR)
if(LOG4CPP_INCLUDE_DIR)
# Already in cache, be silent
set(LOG4CPP_FIND_QUIETLY TRUE)
endif ()
endif()
find_path(LOG4CPP_INCLUDE_DIR log4cpp/Category.hh
/opt/local/include
@ -70,26 +70,17 @@ find_library(LOG4CPP_LIBRARY
/opt/local/lib
)
if (LOG4CPP_INCLUDE_DIR AND LOG4CPP_LIBRARY)
if(LOG4CPP_INCLUDE_DIR AND LOG4CPP_LIBRARY)
set(LOG4CPP_FOUND TRUE)
set(LOG4CPP_LIBRARIES ${LOG4CPP_LIBRARY} CACHE INTERNAL "" FORCE)
set(LOG4CPP_INCLUDE_DIRS ${LOG4CPP_INCLUDE_DIR} CACHE INTERNAL "" FORCE)
else ()
else()
set(LOG4CPP_FOUND FALSE CACHE INTERNAL "" FORCE)
set(LOG4CPP_LIBRARY "" CACHE INTERNAL "" FORCE)
set(LOG4CPP_LIBRARIES "" CACHE INTERNAL "" FORCE)
set(LOG4CPP_INCLUDE_DIR "" CACHE INTERNAL "" FORCE)
set(LOG4CPP_INCLUDE_DIRS "" CACHE INTERNAL "" FORCE)
endif ()
endif()
if (LOG4CPP_FOUND)
if (NOT LOG4CPP_FIND_QUIETLY)
message(STATUS "Found LOG4CPP: ${LOG4CPP_LIBRARIES}")
endif ()
else ()
if (LOG4CPP_FIND_REQUIRED)
message(STATUS "Looked for LOG4CPP libraries named ${LOG4CPPS_NAMES}.")
message(FATAL_ERROR "Could NOT find LOG4CPP library")
endif ()
endif ()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LOG4CPP DEFAULT_MSG LOG4CPP_INCLUDE_DIRS LOG4CPP_LIBRARIES)

View File

@ -21,30 +21,30 @@
#
# Once done this will define:
#
# MATIO_FOUND - True if MATIO found.
# MATIO_LIBRARIES - MATIO libraries.
# MATIO_FOUND - True if MATIO found.
# MATIO_LIBRARIES - MATIO libraries.
# MATIO_INCLUDE_DIRS - where to find matio.h, etc..
# MATIO_VERSION_STRING - version number as a string (e.g.: "1.3.4")
#
#
#=============================================================================
# Copyright 2015 Avtech Scientific <http://avtechscientific.com>
#
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
#
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
#
# * Neither the names of Kitware, Inc., the Insight Software Consortium,
# nor the names of their contributors may be used to endorse or promote
# products derived from this software without specific prior written
# permission.
#
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
@ -66,52 +66,50 @@ find_path(MATIO_INCLUDE_DIR NAMES matio.h DOC "The MATIO include directory")
find_library(MATIO_LIBRARY NAMES matio DOC "The MATIO library")
if(MATIO_INCLUDE_DIR)
# ---------------------------------------------------
# Extract version information from MATIO
# ---------------------------------------------------
# ---------------------------------------------------
# Extract version information from MATIO
# ---------------------------------------------------
# If the file is missing, set all values to 0
set(MATIO_MAJOR_VERSION 0)
set(MATIO_MINOR_VERSION 0)
set(MATIO_RELEASE_LEVEL 0)
# If the file is missing, set all values to 0
set(MATIO_MAJOR_VERSION 0)
set(MATIO_MINOR_VERSION 0)
set(MATIO_RELEASE_LEVEL 0)
# new versions of MATIO have `matio_pubconf.h`
if(EXISTS ${MATIO_INCLUDE_DIR}/matio_pubconf.h)
set(MATIO_CONFIG_FILE "matio_pubconf.h")
else()
set(MATIO_CONFIG_FILE "matioConfig.h")
endif()
# new versions of MATIO have `matio_pubconf.h`
if(EXISTS ${MATIO_INCLUDE_DIR}/matio_pubconf.h)
set(MATIO_CONFIG_FILE "matio_pubconf.h")
else()
set(MATIO_CONFIG_FILE "matioConfig.h")
endif()
if(MATIO_CONFIG_FILE)
if(MATIO_CONFIG_FILE)
# Read and parse MATIO config header file for version number
file(STRINGS "${MATIO_INCLUDE_DIR}/${MATIO_CONFIG_FILE}" _matio_HEADER_CONTENTS REGEX "#define MATIO_((MAJOR|MINOR)_VERSION)|(RELEASE_LEVEL) ")
# Read and parse MATIO config header file for version number
file(STRINGS "${MATIO_INCLUDE_DIR}/${MATIO_CONFIG_FILE}" _matio_HEADER_CONTENTS REGEX "#define MATIO_((MAJOR|MINOR)_VERSION)|(RELEASE_LEVEL) ")
foreach(line ${_matio_HEADER_CONTENTS})
if(line MATCHES "#define ([A-Z_]+) ([0-9]+)")
set("${CMAKE_MATCH_1}" "${CMAKE_MATCH_2}")
endif()
endforeach()
foreach(line ${_matio_HEADER_CONTENTS})
if(line MATCHES "#define ([A-Z_]+) ([0-9]+)")
set("${CMAKE_MATCH_1}" "${CMAKE_MATCH_2}")
endif()
endforeach()
unset(_matio_HEADER_CONTENTS)
endif()
unset(_matio_HEADER_CONTENTS)
endif()
set(MATIO_VERSION_STRING "${MATIO_MAJOR_VERSION}.${MATIO_MINOR_VERSION}.${MATIO_RELEASE_LEVEL}")
endif ()
#==================
set(MATIO_VERSION_STRING "${MATIO_MAJOR_VERSION}.${MATIO_MINOR_VERSION}.${MATIO_RELEASE_LEVEL}")
endif()
mark_as_advanced(MATIO_INCLUDE_DIR MATIO_LIBRARY)
# handle the QUIETLY and REQUIRED arguments and set MATIO_FOUND to TRUE if
# handle the QUIETLY and REQUIRED arguments and set MATIO_FOUND to TRUE if
# all listed variables are TRUE
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(MATIO REQUIRED_VARS MATIO_LIBRARY MATIO_INCLUDE_DIR VERSION_VAR MATIO_VERSION_STRING)
find_package_handle_standard_args(MATIO REQUIRED_VARS MATIO_LIBRARY MATIO_INCLUDE_DIR VERSION_VAR MATIO_VERSION_STRING)
if(MATIO_FOUND)
set(MATIO_LIBRARIES ${MATIO_LIBRARY})
set(MATIO_INCLUDE_DIRS ${MATIO_INCLUDE_DIR})
else(MATIO_FOUND)
else()
set(MATIO_LIBRARIES)
set(MATIO_INCLUDE_DIRS)
endif(MATIO_FOUND)
endif()

View File

@ -17,26 +17,28 @@
# - Try to find OpenBLAS library (not headers!)
#
# The following environment variable is optionally searched
# The following environment variable is optionally searched
# OPENBLAS_HOME: Base directory where all OpenBlas components are found
SET(OPEN_BLAS_SEARCH_PATHS /lib/
/lib64/
/usr/lib
/usr/lib64
/usr/local/lib
/usr/local/lib64
/opt/OpenBLAS/lib
/opt/local/lib
/usr/lib/openblas-base
$ENV{OPENBLAS_HOME}/lib
set(OPEN_BLAS_SEARCH_PATHS /lib/
/lib64/
/usr/lib
/usr/lib64
/usr/local/lib
/usr/local/lib64
/opt/OpenBLAS/lib
/opt/local/lib
/usr/lib/openblas-base
$ENV{OPENBLAS_HOME}/lib
)
FIND_LIBRARY(OPENBLAS NAMES openblas PATHS ${OPEN_BLAS_SEARCH_PATHS})
IF (OPENBLAS)
SET(OPENBLAS_FOUND ON)
MESSAGE(STATUS "Found OpenBLAS")
ENDIF (OPENBLAS)
find_library(OPENBLAS NAMES openblas PATHS ${OPEN_BLAS_SEARCH_PATHS})
MARK_AS_ADVANCED(OPENBLAS)
if(OPENBLAS)
set(OPENBLAS_FOUND ON)
message(STATUS "Found OpenBLAS")
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(OPENBLAS DEFAULT_MSG OPENBLAS)
mark_as_advanced(OPENBLAS)

View File

@ -0,0 +1,110 @@
# Copyright (C) 2011-2018 (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/>.
#
# This file taken from FindOpenCL project @ http://gitorious.com/findopencl
#
# - Try to find OpenCL
# This module tries to find an OpenCL implementation on your system. It supports
# AMD / ATI, Apple and NVIDIA implementations, but shoudl work, too.
#
# Once done this will define
# OPENCL_FOUND - system has OpenCL
# OPENCL_INCLUDE_DIRS - the OpenCL include directory
# OPENCL_LIBRARIES - link these to use OpenCL
#
# WIN32 should work, but is untested
include(FindPackageHandleStandardArgs)
set(OPENCL_VERSION_STRING "0.1.0")
set(OPENCL_VERSION_MAJOR 0)
set(OPENCL_VERSION_MINOR 1)
set(OPENCL_VERSION_PATCH 0)
if(APPLE)
find_library(OPENCL_LIBRARIES OpenCL DOC "OpenCL lib for OSX")
find_path(OPENCL_INCLUDE_DIRS OpenCL/cl.h DOC "Include for OpenCL on OSX")
find_path(_OPENCL_CPP_INCLUDE_DIRS OpenCL/cl.hpp DOC "Include for OpenCL CPP bindings on OSX")
else()
if(WIN32)
find_path(OPENCL_INCLUDE_DIRS CL/cl.h)
find_path(_OPENCL_CPP_INCLUDE_DIRS CL/cl.hpp)
# The AMD SDK currently installs both x86 and x86_64 libraries
# This is only a hack to find out architecture
if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "AMD64")
set(OPENCL_LIB_DIR "$ENV{ATISTREAMSDKROOT}/lib/x86_64")
set(OPENCL_LIB_DIR "$ENV{ATIINTERNALSTREAMSDKROOT}/lib/x86_64")
else()
set(OPENCL_LIB_DIR "$ENV{ATISTREAMSDKROOT}/lib/x86")
set(OPENCL_LIB_DIR "$ENV{ATIINTERNALSTREAMSDKROOT}/lib/x86")
endif()
# find out if the user asked for a 64-bit build, and use the corresponding
# 64 or 32 bit NVIDIA library paths to the search:
string(REGEX MATCH "Win64" ISWIN64 ${CMAKE_GENERATOR})
if("${ISWIN64}" STREQUAL "Win64")
find_library(OPENCL_LIBRARIES OpenCL.lib ${OPENCL_LIB_DIR} $ENV{CUDA_LIB_PATH} $ENV{CUDA_PATH}/lib/x64)
else()
find_library(OPENCL_LIBRARIES OpenCL.lib ${OPENCL_LIB_DIR} $ENV{CUDA_LIB_PATH} $ENV{CUDA_PATH}/lib/Win32)
endif()
get_filename_component(_OPENCL_INC_CAND ${OPENCL_LIB_DIR}/../../include ABSOLUTE)
# On Win32 search relative to the library
find_path(OPENCL_INCLUDE_DIRS CL/cl.h PATHS "${_OPENCL_INC_CAND}" $ENV{CUDA_INC_PATH} $ENV{CUDA_PATH}/include)
find_path(_OPENCL_CPP_INCLUDE_DIRS CL/cl.hpp PATHS "${_OPENCL_INC_CAND}" $ENV{CUDA_INC_PATH} $ENV{CUDA_PATH}/include)
else()
# Unix style platforms
find_library(OPENCL_LIBRARIES OpenCL
ENV LD_LIBRARY_PATH
)
get_filename_component(OPENCL_LIB_DIR ${OPENCL_LIBRARIES} PATH)
get_filename_component(_OPENCL_INC_CAND ${OPENCL_LIB_DIR}/../../include ABSOLUTE)
# The AMD SDK currently does not place its headers
# in /usr/include, therefore also search relative
# to the library
find_path(OPENCL_INCLUDE_DIRS CL/cl.h PATHS ${_OPENCL_INC_CAND} "/usr/local/cuda/include")
find_path(_OPENCL_CPP_INCLUDE_DIRS CL/cl.hpp PATHS ${_OPENCL_INC_CAND} "/usr/local/cuda/include")
endif()
endif()
find_package_handle_standard_args(OPENCL DEFAULT_MSG OPENCL_LIBRARIES OPENCL_INCLUDE_DIRS)
if(_OPENCL_CPP_INCLUDE_DIRS)
set(OPENCL_HAS_CPP_BINDINGS TRUE)
list(APPEND OPENCL_INCLUDE_DIRS ${_OPENCL_CPP_INCLUDE_DIRS})
# This is often the same, so clean up
list(REMOVE_DUPLICATES OPENCL_INCLUDE_DIRS)
endif()
mark_as_advanced(
OPENCL_INCLUDE_DIRS
)
if(OPENCL_INCLUDE_DIRS AND OPENCL_LIBRARIES)
set( OPENCL_FOUND TRUE )
add_definitions( -DOPENCL=1 )
else()
set( OPENCL_FOUND FALSE )
add_definitions( -DOPENCL=0 )
endif()

View File

@ -15,52 +15,52 @@
# You should have received a copy of the GNU General Public License
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
FIND_PACKAGE(PkgConfig)
PKG_CHECK_MODULES(PC_ORC "orc-0.4 > 0.4.22")
find_package(PkgConfig)
pkg_check_modules(PC_ORC "orc-0.4 > 0.4.22")
FIND_PROGRAM(ORCC_EXECUTABLE orcc
HINTS ${PC_ORC_TOOLSDIR}
PATHS ${ORC_ROOT}/bin ${CMAKE_INSTALL_PREFIX}/bin)
find_program(ORCC_EXECUTABLE orcc
HINTS ${PC_ORC_TOOLSDIR}
PATHS ${ORC_ROOT}/bin ${CMAKE_INSTALL_PREFIX}/bin)
FIND_PATH(ORC_INCLUDE_DIR NAMES orc/orc.h
HINTS ${PC_ORC_INCLUDEDIR}
PATHS ${ORC_ROOT}/include/orc-0.4 ${CMAKE_INSTALL_PREFIX}/include/orc-0.4)
find_path(ORC_INCLUDE_DIR NAMES orc/orc.h
HINTS ${PC_ORC_INCLUDEDIR}
PATHS ${ORC_ROOT}/include/orc-0.4 ${CMAKE_INSTALL_PREFIX}/include/orc-0.4)
FIND_PATH(ORC_LIBRARY_DIR NAMES ${CMAKE_SHARED_LIBRARY_PREFIX}orc-0.4${CMAKE_SHARED_LIBRARY_SUFFIX}
HINTS ${PC_ORC_LIBDIR}
/usr/local/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/i386-linux-gnu
/usr/lib/arm-linux-gnueabihf
/usr/lib/arm-linux-gnueabi
/usr/lib/aarch64-linux-gnu
/usr/lib/mipsel-linux-gnu
/usr/lib/mips-linux-gnu
/usr/lib/mips64el-linux-gnuabi64
/usr/lib/powerpc-linux-gnu
/usr/lib/powerpc64-linux-gnu
/usr/lib/powerpc64le-linux-gnu
/usr/lib/hppa-linux-gnu
/usr/lib/s390x-linux-gnu
/usr/lib64
/usr/lib
PATHS ${ORC_ROOT}/lib${LIB_SUFFIX} ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX})
find_path(ORC_LIBRARY_DIR NAMES ${CMAKE_SHARED_LIBRARY_PREFIX}orc-0.4${CMAKE_SHARED_LIBRARY_SUFFIX}
HINTS ${PC_ORC_LIBDIR}
/usr/local/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/i386-linux-gnu
/usr/lib/arm-linux-gnueabihf
/usr/lib/arm-linux-gnueabi
/usr/lib/aarch64-linux-gnu
/usr/lib/mipsel-linux-gnu
/usr/lib/mips-linux-gnu
/usr/lib/mips64el-linux-gnuabi64
/usr/lib/powerpc-linux-gnu
/usr/lib/powerpc64-linux-gnu
/usr/lib/powerpc64le-linux-gnu
/usr/lib/hppa-linux-gnu
/usr/lib/s390x-linux-gnu
/usr/lib64
/usr/lib
PATHS ${ORC_ROOT}/lib${LIB_SUFFIX} ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX})
FIND_LIBRARY(ORC_LIB orc-0.4
HINTS ${PC_ORC_LIBRARY_DIRS}
PATHS ${ORC_ROOT}/lib${LIB_SUFFIX} ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX})
find_library(ORC_LIB orc-0.4
HINTS ${PC_ORC_LIBRARY_DIRS}
PATHS ${ORC_ROOT}/lib${LIB_SUFFIX} ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX})
LIST(APPEND ORC_LIBRARY
${ORC_LIB}
list(APPEND ORC_LIBRARY
${ORC_LIB}
)
SET(ORC_INCLUDE_DIRS ${ORC_INCLUDE_DIR})
SET(ORC_LIBRARIES ${ORC_LIBRARY})
SET(ORC_LIBRARY_DIRS ${ORC_LIBRARY_DIR})
set(ORC_INCLUDE_DIRS ${ORC_INCLUDE_DIR})
set(ORC_LIBRARIES ${ORC_LIBRARY})
set(ORC_LIBRARY_DIRS ${ORC_LIBRARY_DIR})
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ORC "orc files" ORC_LIBRARY ORC_INCLUDE_DIR ORCC_EXECUTABLE)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(ORC "orc files" ORC_LIBRARY ORC_INCLUDE_DIR ORCC_EXECUTABLE)
mark_as_advanced(ORC_INCLUDE_DIR ORC_LIBRARY ORCC_EXECUTABLE)
mark_as_advanced(ORC_INCLUDE_DIR ORC_LIBRARY ORCC_EXECUTABLE)

View File

@ -1,116 +0,0 @@
# Copyright (C) 2011-2018 (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/>.
#
# This file taken from FindOpenCL project @ http://gitorious.com/findopencl
#
# - Try to find OpenCL
# This module tries to find an OpenCL implementation on your system. It supports
# AMD / ATI, Apple and NVIDIA implementations, but shoudl work, too.
#
# Once done this will define
# OPENCL_FOUND - system has OpenCL
# OPENCL_INCLUDE_DIRS - the OpenCL include directory
# OPENCL_LIBRARIES - link these to use OpenCL
#
# WIN32 should work, but is untested
FIND_PACKAGE( PackageHandleStandardArgs )
SET (OPENCL_VERSION_STRING "0.1.0")
SET (OPENCL_VERSION_MAJOR 0)
SET (OPENCL_VERSION_MINOR 1)
SET (OPENCL_VERSION_PATCH 0)
IF (APPLE)
FIND_LIBRARY(OPENCL_LIBRARIES OpenCL DOC "OpenCL lib for OSX")
FIND_PATH(OPENCL_INCLUDE_DIRS OpenCL/cl.h DOC "Include for OpenCL on OSX")
FIND_PATH(_OPENCL_CPP_INCLUDE_DIRS OpenCL/cl.hpp DOC "Include for OpenCL CPP bindings on OSX")
ELSE (APPLE)
IF (WIN32)
FIND_PATH(OPENCL_INCLUDE_DIRS CL/cl.h)
FIND_PATH(_OPENCL_CPP_INCLUDE_DIRS CL/cl.hpp)
# The AMD SDK currently installs both x86 and x86_64 libraries
# This is only a hack to find out architecture
IF( ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "AMD64" )
SET(OPENCL_LIB_DIR "$ENV{ATISTREAMSDKROOT}/lib/x86_64")
SET(OPENCL_LIB_DIR "$ENV{ATIINTERNALSTREAMSDKROOT}/lib/x86_64")
ELSE (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "AMD64")
SET(OPENCL_LIB_DIR "$ENV{ATISTREAMSDKROOT}/lib/x86")
SET(OPENCL_LIB_DIR "$ENV{ATIINTERNALSTREAMSDKROOT}/lib/x86")
ENDIF( ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "AMD64" )
# find out if the user asked for a 64-bit build, and use the corresponding
# 64 or 32 bit NVIDIA library paths to the search:
STRING(REGEX MATCH "Win64" ISWIN64 ${CMAKE_GENERATOR})
IF("${ISWIN64}" STREQUAL "Win64")
FIND_LIBRARY(OPENCL_LIBRARIES OpenCL.lib ${OPENCL_LIB_DIR} $ENV{CUDA_LIB_PATH} $ENV{CUDA_PATH}/lib/x64)
ELSE("${ISWIN64}" STREQUAL "Win64")
FIND_LIBRARY(OPENCL_LIBRARIES OpenCL.lib ${OPENCL_LIB_DIR} $ENV{CUDA_LIB_PATH} $ENV{CUDA_PATH}/lib/Win32)
ENDIF("${ISWIN64}" STREQUAL "Win64")
GET_FILENAME_COMPONENT(_OPENCL_INC_CAND ${OPENCL_LIB_DIR}/../../include ABSOLUTE)
# On Win32 search relative to the library
FIND_PATH(OPENCL_INCLUDE_DIRS CL/cl.h PATHS "${_OPENCL_INC_CAND}" $ENV{CUDA_INC_PATH} $ENV{CUDA_PATH}/include)
FIND_PATH(_OPENCL_CPP_INCLUDE_DIRS CL/cl.hpp PATHS "${_OPENCL_INC_CAND}" $ENV{CUDA_INC_PATH} $ENV{CUDA_PATH}/include)
ELSE (WIN32)
# Unix style platforms
FIND_LIBRARY(OPENCL_LIBRARIES OpenCL
ENV LD_LIBRARY_PATH
)
GET_FILENAME_COMPONENT(OPENCL_LIB_DIR ${OPENCL_LIBRARIES} PATH)
GET_FILENAME_COMPONENT(_OPENCL_INC_CAND ${OPENCL_LIB_DIR}/../../include ABSOLUTE)
# The AMD SDK currently does not place its headers
# in /usr/include, therefore also search relative
# to the library
FIND_PATH(OPENCL_INCLUDE_DIRS CL/cl.h PATHS ${_OPENCL_INC_CAND} "/usr/local/cuda/include")
FIND_PATH(_OPENCL_CPP_INCLUDE_DIRS CL/cl.hpp PATHS ${_OPENCL_INC_CAND} "/usr/local/cuda/include")
ENDIF (WIN32)
ENDIF (APPLE)
FIND_PACKAGE_HANDLE_STANDARD_ARGS( OpenCL DEFAULT_MSG OPENCL_LIBRARIES OPENCL_INCLUDE_DIRS )
IF( _OPENCL_CPP_INCLUDE_DIRS )
SET( OPENCL_HAS_CPP_BINDINGS TRUE )
LIST( APPEND OPENCL_INCLUDE_DIRS ${_OPENCL_CPP_INCLUDE_DIRS} )
# This is often the same, so clean up
LIST( REMOVE_DUPLICATES OPENCL_INCLUDE_DIRS )
ENDIF( _OPENCL_CPP_INCLUDE_DIRS )
MARK_AS_ADVANCED(
OPENCL_INCLUDE_DIRS
)
IF( OPENCL_INCLUDE_DIRS AND OPENCL_LIBRARIES )
SET( OPENCL_FOUND TRUE )
add_definitions( -DOPENCL=1 )
ELSE( OPENCL_INCLUDE_DIRS AND OPENCL_LIBRARIES )
SET( OPENCL_FOUND FALSE )
add_definitions( -DOPENCL=0 )
ENDIF( OPENCL_INCLUDE_DIRS AND OPENCL_LIBRARIES )

View File

@ -37,16 +37,16 @@
# Find the PCAP includes and library
# http://www.tcpdump.org/
#
# The environment variable PCAPDIR allows to specficy where to find
# The environment variable PCAPDIR allows to specficy where to find
# libpcap in non standard location.
#
#
# PCAP_INCLUDE_DIRS - where to find pcap.h, etc.
# PCAP_LIBRARIES - List of libraries when using pcap.
# PCAP_FOUND - True if pcap found.
IF(EXISTS $ENV{PCAPDIR})
FIND_PATH(PCAP_INCLUDE_DIR
if(EXISTS $ENV{PCAPDIR})
find_path(PCAP_INCLUDE_DIR
NAMES
pcap/pcap.h
pcap.h
@ -54,68 +54,60 @@ IF(EXISTS $ENV{PCAPDIR})
$ENV{PCAPDIR}
NO_DEFAULT_PATH
)
FIND_LIBRARY(PCAP_LIBRARY
NAMES
find_library(PCAP_LIBRARY
NAMES
pcap
PATHS
$ENV{PCAPDIR}
NO_DEFAULT_PATH
)
ELSE(EXISTS $ENV{PCAPDIR})
FIND_PATH(PCAP_INCLUDE_DIR
else()
find_path(PCAP_INCLUDE_DIR
NAMES
pcap/pcap.h
pcap.h
)
FIND_LIBRARY(PCAP_LIBRARY
NAMES
find_library(PCAP_LIBRARY
NAMES
pcap
)
ENDIF(EXISTS $ENV{PCAPDIR})
endif()
SET(PCAP_INCLUDE_DIRS ${PCAP_INCLUDE_DIR})
SET(PCAP_LIBRARIES ${PCAP_LIBRARY})
set(PCAP_INCLUDE_DIRS ${PCAP_INCLUDE_DIR})
set(PCAP_LIBRARIES ${PCAP_LIBRARY})
IF(PCAP_INCLUDE_DIRS)
MESSAGE(STATUS "Pcap include dirs set to ${PCAP_INCLUDE_DIRS}")
ELSE(PCAP_INCLUDE_DIRS)
MESSAGE(FATAL " Pcap include dirs cannot be found")
ENDIF(PCAP_INCLUDE_DIRS)
if(PCAP_INCLUDE_DIRS)
message(STATUS "Pcap include dirs set to ${PCAP_INCLUDE_DIRS}")
else()
message(FATAL " Pcap include dirs cannot be found")
endif()
IF(PCAP_LIBRARIES)
MESSAGE(STATUS "Pcap library set to ${PCAP_LIBRARIES}")
ELSE(PCAP_LIBRARIES)
MESSAGE(FATAL "Pcap library cannot be found")
ENDIF(PCAP_LIBRARIES)
if(PCAP_LIBRARIES)
message(STATUS "Pcap library set to ${PCAP_LIBRARIES}")
else()
message(FATAL "Pcap library cannot be found")
endif()
#Functions
INCLUDE(CheckFunctionExists)
SET(CMAKE_REQUIRED_INCLUDES ${PCAP_INCLUDE_DIRS})
SET(CMAKE_REQUIRED_LIBRARIES ${PCAP_LIBRARIES})
CHECK_FUNCTION_EXISTS("pcap_breakloop" HAVE_PCAP_BREAKLOOP)
CHECK_FUNCTION_EXISTS("pcap_datalink_name_to_val" HAVE_PCAP_DATALINK_NAME_TO_VAL)
CHECK_FUNCTION_EXISTS("pcap_datalink_val_to_name" HAVE_PCAP_DATALINK_VAL_TO_NAME)
CHECK_FUNCTION_EXISTS("pcap_findalldevs" HAVE_PCAP_FINDALLDEVS)
CHECK_FUNCTION_EXISTS("pcap_freecode" HAVE_PCAP_FREECODE)
CHECK_FUNCTION_EXISTS("pcap_get_selectable_fd" HAVE_PCAP_GET_SELECTABLE_FD)
CHECK_FUNCTION_EXISTS("pcap_lib_version" HAVE_PCAP_LIB_VERSION)
CHECK_FUNCTION_EXISTS("pcap_list_datalinks" HAVE_PCAP_LIST_DATALINKS)
CHECK_FUNCTION_EXISTS("pcap_open_dead" HAVE_PCAP_OPEN_DEAD)
CHECK_FUNCTION_EXISTS("pcap_set_datalink" HAVE_PCAP_SET_DATALINK)
include(CheckFunctionExists)
set(CMAKE_REQUIRED_INCLUDES ${PCAP_INCLUDE_DIRS})
set(CMAKE_REQUIRED_LIBRARIES ${PCAP_LIBRARIES})
check_function_exists("pcap_breakloop" HAVE_PCAP_BREAKLOOP)
check_function_exists("pcap_datalink_name_to_val" HAVE_PCAP_DATALINK_NAME_TO_VAL)
check_function_exists("pcap_datalink_val_to_name" HAVE_PCAP_DATALINK_VAL_TO_NAME)
check_function_exists("pcap_findalldevs" HAVE_PCAP_FINDALLDEVS)
check_function_exists("pcap_freecode" HAVE_PCAP_FREECODE)
check_function_exists("pcap_get_selectable_fd" HAVE_PCAP_GET_SELECTABLE_FD)
check_function_exists("pcap_lib_version" HAVE_PCAP_LIB_VERSION)
check_function_exists("pcap_list_datalinks" HAVE_PCAP_LIST_DATALINKS)
check_function_exists("pcap_open_dead" HAVE_PCAP_OPEN_DEAD)
check_function_exists("pcap_set_datalink" HAVE_PCAP_SET_DATALINK)
#Is pcap found ?
IF(PCAP_INCLUDE_DIRS AND PCAP_LIBRARIES)
SET( PCAP_FOUND true )
ENDIF(PCAP_INCLUDE_DIRS AND PCAP_LIBRARIES)
MARK_AS_ADVANCED(
mark_as_advanced(
PCAP_LIBRARIES
PCAP_INCLUDE_DIRS
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(PCAP DEFAULT_MSG PCAP_INCLUDE_DIRS PCAP_LIBRARIES)

View File

@ -0,0 +1,67 @@
# Copyright (C) 2011-2018 (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/>.
# Find the pugixml XML parsing library.
#
# Sets the usual variables expected for find_package scripts:
#
# PUGIXML_INCLUDE_DIR - header location
# PUGIXML_LIBRARIES - library to link against
# PUGIXML_FOUND - true if pugixml was found.
find_path(PUGIXML_INCLUDE_DIR
NAMES pugixml.hpp
PATHS ${PUGIXML_HOME}/include
/usr/include
/usr/local/include
/opt/local/include)
find_library(PUGIXML_LIBRARY
NAMES pugixml
PATHS ${PUGIXML_HOME}/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/aarch64-linux-gnu
/usr/lib/arm-linux-gnueabi
/usr/lib/arm-linux-gnueabihf
/usr/lib/i386-linux-gnu
/usr/lib/mips-linux-gnu
/usr/lib/mips64el-linux-gnuabi64
/usr/lib/mipsel-linux-gnu
/usr/lib/powerpc64le-linux-gnu
/usr/lib/s390x-linux-gnu
/usr/local/lib
/opt/local/lib
/usr/lib
/usr/lib64
/usr/local/lib64)
# Support the REQUIRED and QUIET arguments, and set PUGIXML_FOUND if found.
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(PUGIXML DEFAULT_MSG PUGIXML_LIBRARY
PUGIXML_INCLUDE_DIR)
if(PUGIXML_FOUND)
set(PUGIXML_LIBRARIES ${PUGIXML_LIBRARY})
if(NOT PUGIXML_FIND_QUIETLY)
message(STATUS "PugiXML include = ${PUGIXML_INCLUDE_DIR}")
message(STATUS "PugiXML library = ${PUGIXML_LIBRARY}")
endif()
else()
message(STATUS "PugiXML not found.")
endif()
mark_as_advanced(PUGIXML_LIBRARY PUGIXML_INCLUDE_DIR)

View File

@ -1,69 +0,0 @@
# Copyright (C) 2011-2018 (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/>.
# Find the pugixml XML parsing library.
#
# Sets the usual variables expected for find_package scripts:
#
# PUGIXML_INCLUDE_DIR - header location
# PUGIXML_LIBRARIES - library to link against
# PUGIXML_FOUND - true if pugixml was found.
find_path (PUGIXML_INCLUDE_DIR
NAMES pugixml.hpp
PATHS ${PUGIXML_HOME}/include
/usr/include
/usr/local/include
/opt/local/include)
find_library (PUGIXML_LIBRARY
NAMES pugixml
PATHS ${PUGIXML_HOME}/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/aarch64-linux-gnu
/usr/lib/arm-linux-gnueabi
/usr/lib/arm-linux-gnueabihf
/usr/lib/i386-linux-gnu
/usr/lib/mips-linux-gnu
/usr/lib/mips64el-linux-gnuabi64
/usr/lib/mipsel-linux-gnu
/usr/lib/powerpc64le-linux-gnu
/usr/lib/s390x-linux-gnu
/usr/local/lib
/opt/local/lib
/usr/lib
/usr/lib64
/usr/local/lib64 )
# Support the REQUIRED and QUIET arguments, and set PUGIXML_FOUND if found.
include (FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS (PugiXML DEFAULT_MSG PUGIXML_LIBRARY
PUGIXML_INCLUDE_DIR)
if (PUGIXML_FOUND)
set (PUGIXML_LIBRARIES ${PUGIXML_LIBRARY})
if (NOT PugiXML_FIND_QUIETLY)
message (STATUS "PugiXML include = ${PUGIXML_INCLUDE_DIR}")
message (STATUS "PugiXML library = ${PUGIXML_LIBRARY}")
endif (NOT PugiXML_FIND_QUIETLY)
else (PUGIXML_FOUND)
message (STATUS "PugiXML not found.")
endif(PUGIXML_FOUND)
mark_as_advanced (PUGIXML_LIBRARY PUGIXML_INCLUDE_DIR)

View File

@ -15,10 +15,10 @@
# You should have received a copy of the GNU General Public License
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
INCLUDE(FindPkgConfig)
PKG_CHECK_MODULES(PC_TELEORBIT teleorbit)
include(FindPkgConfig)
pkg_check_modules(PC_TELEORBIT teleorbit)
FIND_PATH(
find_path(
TELEORBIT_INCLUDE_DIRS
NAMES teleorbit/api.h
HINTS $ENV{TELEORBIT_DIR}/include
@ -28,7 +28,7 @@ FIND_PATH(
/usr/include
)
FIND_LIBRARY(
find_library(
TELEORBIT_LIBRARIES
NAMES gnuradio-teleorbit
HINTS $ENV{TELEORBIT_DIR}/lib
@ -41,6 +41,6 @@ FIND_LIBRARY(
/usr/lib64
)
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(TELEORBIT DEFAULT_MSG TELEORBIT_LIBRARIES TELEORBIT_INCLUDE_DIRS)
MARK_AS_ADVANCED(TELEORBIT_LIBRARIES TELEORBIT_INCLUDE_DIRS)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(TELEORBIT DEFAULT_MSG TELEORBIT_LIBRARIES TELEORBIT_INCLUDE_DIRS)
mark_as_advanced(TELEORBIT_LIBRARIES TELEORBIT_INCLUDE_DIRS)

View File

@ -19,10 +19,10 @@
# Find the library for the USRP Hardware Driver
########################################################################
INCLUDE(FindPkgConfig)
PKG_CHECK_MODULES(PC_UHD uhd)
include(FindPkgConfig)
pkg_check_modules(PC_UHD uhd)
FIND_PATH(
find_path(
UHD_INCLUDE_DIRS
NAMES uhd/config.hpp
HINTS $ENV{UHD_DIR}/include
@ -32,7 +32,7 @@ FIND_PATH(
${GNURADIO_INSTALL_PREFIX}/include
)
FIND_LIBRARY(
find_library(
UHD_LIBRARIES
NAMES uhd
HINTS $ENV{UHD_DIR}/lib
@ -66,6 +66,6 @@ FIND_LIBRARY(
${GNURADIO_INSTALL_PREFIX}/lib
)
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(UHD DEFAULT_MSG UHD_LIBRARIES UHD_INCLUDE_DIRS)
MARK_AS_ADVANCED(UHD_LIBRARIES UHD_INCLUDE_DIRS)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(UHD DEFAULT_MSG UHD_LIBRARIES UHD_INCLUDE_DIRS)
mark_as_advanced(UHD_LIBRARIES UHD_INCLUDE_DIRS)

View File

@ -19,10 +19,10 @@
# Find VOLK (Vector-Optimized Library of Kernels)
########################################################################
INCLUDE(FindPkgConfig)
PKG_CHECK_MODULES(PC_VOLK volk)
include(FindPkgConfig)
pkg_check_modules(PC_VOLK volk)
FIND_PATH(
find_path(
VOLK_INCLUDE_DIRS
NAMES volk/volk.h
HINTS $ENV{VOLK_DIR}/include
@ -32,7 +32,7 @@ FIND_PATH(
${CMAKE_INSTALL_PREFIX}/include
)
FIND_LIBRARY(
find_library(
VOLK_LIBRARIES
NAMES volk
HINTS $ENV{VOLK_DIR}/lib
@ -67,7 +67,6 @@ FIND_LIBRARY(
${CMAKE_INSTALL_PREFIX}/lib
)
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(VOLK DEFAULT_MSG VOLK_LIBRARIES VOLK_INCLUDE_DIRS)
MARK_AS_ADVANCED(VOLK_LIBRARIES VOLK_INCLUDE_DIRS VOLK_VERSION)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(VOLK DEFAULT_MSG VOLK_LIBRARIES VOLK_INCLUDE_DIRS)
mark_as_advanced(VOLK_LIBRARIES VOLK_INCLUDE_DIRS VOLK_VERSION)

View File

@ -19,10 +19,10 @@
# Find VOLK (Vector-Optimized Library of Kernels) GNSS-SDR library
########################################################################
INCLUDE(FindPkgConfig)
PKG_CHECK_MODULES(PC_VOLK_GNSSSDR volk_gnsssdr)
include(FindPkgConfig)
pkg_check_modules(PC_VOLK_GNSSSDR volk_gnsssdr)
FIND_PATH(
find_path(
VOLK_GNSSSDR_INCLUDE_DIRS
NAMES volk_gnsssdr/volk_gnsssdr.h
HINTS $ENV{VOLK_GNSSSDR_DIR}/include
@ -32,7 +32,7 @@ FIND_PATH(
${GNURADIO_INSTALL_PREFIX}/include
)
FIND_LIBRARY(
find_library(
VOLK_GNSSSDR_LIBRARIES
NAMES volk_gnsssdr
HINTS $ENV{VOLK_GNSSSDR_DIR}/lib
@ -44,6 +44,6 @@ FIND_LIBRARY(
${GNURADIO_INSTALL_PREFIX}/lib
)
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(VOLK_GNSSSDR DEFAULT_MSG VOLK_GNSSSDR_LIBRARIES VOLK_GNSSSDR_INCLUDE_DIRS)
MARK_AS_ADVANCED(VOLK_GNSSSDR_LIBRARIES VOLK_GNSSSDR_INCLUDE_DIRS)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(VOLKGNSSSDR DEFAULT_MSG VOLK_GNSSSDR_LIBRARIES VOLK_GNSSSDR_INCLUDE_DIRS)
mark_as_advanced(VOLK_GNSSSDR_LIBRARIES VOLK_GNSSSDR_INCLUDE_DIRS)

View File

@ -56,11 +56,11 @@ function(GNSSSDR_CHECK_BUILD_TYPE settype)
string(TOUPPER ${btype} _btype)
if(${_settype} STREQUAL ${_btype})
return() # found it; exit cleanly
endif(${_settype} STREQUAL ${_btype})
endforeach(btype)
endif()
endforeach()
# Build type not found; error out
message(FATAL_ERROR "Build type '${settype}' not valid, must be one of: ${AVAIL_BUILDTYPES}")
endfunction(GNSSSDR_CHECK_BUILD_TYPE)
endfunction()
########################################################################
@ -86,12 +86,12 @@ if(NOT WIN32)
"-W" CACHE STRING
"Flags used by the shared lib linker during Coverage builds." FORCE)
MARK_AS_ADVANCED(
mark_as_advanced(
CMAKE_CXX_FLAGS_COVERAGE
CMAKE_C_FLAGS_COVERAGE
CMAKE_EXE_LINKER_FLAGS_COVERAGE
CMAKE_SHARED_LINKER_FLAGS_COVERAGE)
endif(NOT WIN32)
endif()
########################################################################
@ -117,12 +117,12 @@ if(NOT WIN32)
"-W" CACHE STRING
"Flags used by the shared lib linker during NoOptWithASM builds." FORCE)
MARK_AS_ADVANCED(
mark_as_advanced(
CMAKE_CXX_FLAGS_NOOPTWITHASM
CMAKE_C_FLAGS_NOOPTWITHASM
CMAKE_EXE_LINKER_FLAGS_NOOPTWITHASM
CMAKE_SHARED_LINKER_FLAGS_NOOPTWITHASM)
endif(NOT WIN32)
endif()
@ -150,12 +150,12 @@ if(NOT WIN32)
"-W" CACHE STRING
"Flags used by the shared lib linker during O2WithASM builds." FORCE)
MARK_AS_ADVANCED(
mark_as_advanced(
CMAKE_CXX_FLAGS_O2WITHASM
CMAKE_C_FLAGS_O2WITHASM
CMAKE_EXE_LINKER_FLAGS_O2WITHASM
CMAKE_SHARED_LINKER_FLAGS_O2WITHASM)
endif(NOT WIN32)
endif()
########################################################################
@ -182,12 +182,12 @@ if(NOT WIN32)
"-W" CACHE STRING
"Flags used by the shared lib linker during O3WithASM builds." FORCE)
MARK_AS_ADVANCED(
mark_as_advanced(
CMAKE_CXX_FLAGS_O3WITHASM
CMAKE_C_FLAGS_O3WITHASM
CMAKE_EXE_LINKER_FLAGS_O3WITHASM
CMAKE_SHARED_LINKER_FLAGS_O3WITHASM)
endif(NOT WIN32)
endif()
########################################################################
@ -211,9 +211,9 @@ if(NOT WIN32)
"-W" CACHE STRING
"Flags used by the shared lib linker during Address Sanitized builds." FORCE)
MARK_AS_ADVANCED(
mark_as_advanced(
CMAKE_CXX_FLAGS_ASAN
CMAKE_C_FLAGS_ASAN
CMAKE_EXE_LINKER_FLAGS_ASAN
CMAKE_SHARED_LINKER_ASAN)
endif(NOT WIN32)
endif()

View File

@ -36,10 +36,10 @@ macro(GNSSSDR_PYTHON_CHECK_MODULE_RAW desc python_code have)
message(STATUS "Python checking for ${desc} - not found")
set(${have} FALSE)
endif()
endmacro(GNSSSDR_PYTHON_CHECK_MODULE_RAW)
endmacro()
macro(GNSSSDR_PYTHON_CHECK_MODULE desc mod cmd have)
GNSSSDR_PYTHON_CHECK_MODULE_RAW(
gnsssdr_python_check_module_raw(
"${desc}" "
#########################################
try:
@ -49,7 +49,7 @@ except (ImportError, AssertionError): exit(-1)
except: pass
#########################################"
"${have}")
endmacro(GNSSSDR_PYTHON_CHECK_MODULE)
endmacro()
########################################################################
@ -64,58 +64,56 @@ if(CMAKE_VERSION VERSION_LESS 3.12)
string(FIND "${PYTHON_EXECUTABLE}" "python3" IS_PYTHON3)
if(IS_PYTHON3 EQUAL -1)
find_package(PythonInterp ${GNSSSDR_PYTHON_MIN_VERSION} REQUIRED)
else(IS_PYTHON3 EQUAL -1)
else()
find_package(PythonInterp ${GNSSSDR_PYTHON3_MIN_VERSION} REQUIRED)
endif(IS_PYTHON3 EQUAL -1)
GNSSSDR_PYTHON_CHECK_MODULE("python >= ${GNSSSDR_PYTHON_MIN_VERSION}" sys "sys.version.split()[0] >= '${GNSSSDR_PYTHON_MIN_VERSION}'" PYTHON_MIN_VER_FOUND)
GNSSSDR_PYTHON_CHECK_MODULE("mako >= ${GNSSSDR_MAKO_MIN_VERSION}" mako "mako.__version__ >= '${GNSSSDR_MAKO_MIN_VERSION}'" MAKO_FOUND)
GNSSSDR_PYTHON_CHECK_MODULE("six - python 2 and 3 compatibility library" six "True" SIX_FOUND)
else(PYTHON_EXECUTABLE)
endif()
gnsssdr_python_check_module("python >= ${GNSSSDR_PYTHON_MIN_VERSION}" sys "sys.version.split()[0] >= '${GNSSSDR_PYTHON_MIN_VERSION}'" PYTHON_MIN_VER_FOUND)
gnsssdr_python_check_module("mako >= ${GNSSSDR_MAKO_MIN_VERSION}" mako "mako.__version__ >= '${GNSSSDR_MAKO_MIN_VERSION}'" MAKO_FOUND)
gnsssdr_python_check_module("six - python 2 and 3 compatibility library" six "True" SIX_FOUND)
else()
message(STATUS "PYTHON_EXECUTABLE not set - trying by default python2")
message(STATUS "Use -DPYTHON_EXECUTABLE=/path/to/python3 to build for python3.")
find_package(PythonInterp ${GNSSSDR_PYTHON_MIN_VERSION})
if(NOT PYTHONINTERP_FOUND)
message(STATUS "python2 not found - trying with python3")
find_package(PythonInterp ${GNSSSDR_PYTHON3_MIN_VERSION} REQUIRED)
endif(NOT PYTHONINTERP_FOUND)
GNSSSDR_PYTHON_CHECK_MODULE("python >= ${GNSSSDR_PYTHON_MIN_VERSION}" sys "sys.version.split()[0] >= '${GNSSSDR_PYTHON_MIN_VERSION}'" PYTHON_MIN_VER_FOUND)
GNSSSDR_PYTHON_CHECK_MODULE("mako >= ${GNSSSDR_MAKO_MIN_VERSION}" mako "mako.__version__ >= '${GNSSSDR_MAKO_MIN_VERSION}'" MAKO_FOUND)
GNSSSDR_PYTHON_CHECK_MODULE("six - python 2 and 3 compatibility library" six "True" SIX_FOUND)
endif(PYTHON_EXECUTABLE)
endif()
gnsssdr_python_check_module("python >= ${GNSSSDR_PYTHON_MIN_VERSION}" sys "sys.version.split()[0] >= '${GNSSSDR_PYTHON_MIN_VERSION}'" PYTHON_MIN_VER_FOUND)
gnsssdr_python_check_module("mako >= ${GNSSSDR_MAKO_MIN_VERSION}" mako "mako.__version__ >= '${GNSSSDR_MAKO_MIN_VERSION}'" MAKO_FOUND)
gnsssdr_python_check_module("six - python 2 and 3 compatibility library" six "True" SIX_FOUND)
endif()
find_package(PythonLibs ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} EXACT)
else(CMAKE_VERSION VERSION_LESS 3.12)
find_package (Python3 COMPONENTS Interpreter)
else()
find_package(Python3 COMPONENTS Interpreter)
if(Python3_FOUND)
set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE})
set(PYTHON_VERSION_MAJOR ${Python3_VERSION_MAJOR})
GNSSSDR_PYTHON_CHECK_MODULE("python >= ${GNSSSDR_PYTHON_MIN_VERSION}" sys "sys.version.split()[0] >= '${GNSSSDR_PYTHON_MIN_VERSION}'" PYTHON_MIN_VER_FOUND)
GNSSSDR_PYTHON_CHECK_MODULE("mako >= ${GNSSSDR_MAKO_MIN_VERSION}" mako "mako.__version__ >= '${GNSSSDR_MAKO_MIN_VERSION}'" MAKO_FOUND)
GNSSSDR_PYTHON_CHECK_MODULE("six - python 2 and 3 compatibility library" six "True" SIX_FOUND)
endif(Python3_FOUND)
gnsssdr_python_check_module("python >= ${GNSSSDR_PYTHON_MIN_VERSION}" sys "sys.version.split()[0] >= '${GNSSSDR_PYTHON_MIN_VERSION}'" PYTHON_MIN_VER_FOUND)
gnsssdr_python_check_module("mako >= ${GNSSSDR_MAKO_MIN_VERSION}" mako "mako.__version__ >= '${GNSSSDR_MAKO_MIN_VERSION}'" MAKO_FOUND)
gnsssdr_python_check_module("six - python 2 and 3 compatibility library" six "True" SIX_FOUND)
endif()
if(NOT Python3_FOUND OR NOT MAKO_FOUND OR NOT SIX_FOUND)
find_package(Python2 COMPONENTS Interpreter)
if(Python2_FOUND)
set(PYTHON_EXECUTABLE ${Python2_EXECUTABLE})
set(PYTHON_VERSION_MAJOR ${Python2_VERSION_MAJOR})
GNSSSDR_PYTHON_CHECK_MODULE("python >= ${GNSSSDR_PYTHON_MIN_VERSION}" sys "sys.version.split()[0] >= '${GNSSSDR_PYTHON_MIN_VERSION}'" PYTHON_MIN_VER_FOUND)
GNSSSDR_PYTHON_CHECK_MODULE("mako >= ${GNSSSDR_MAKO_MIN_VERSION}" mako "mako.__version__ >= '${GNSSSDR_MAKO_MIN_VERSION}'" MAKO_FOUND)
GNSSSDR_PYTHON_CHECK_MODULE("six - python 2 and 3 compatibility library" six "True" SIX_FOUND)
endif(Python2_FOUND)
endif(NOT Python3_FOUND OR NOT MAKO_FOUND OR NOT SIX_FOUND)
endif(CMAKE_VERSION VERSION_LESS 3.12)
gnsssdr_python_check_module("python >= ${GNSSSDR_PYTHON_MIN_VERSION}" sys "sys.version.split()[0] >= '${GNSSSDR_PYTHON_MIN_VERSION}'" PYTHON_MIN_VER_FOUND)
gnsssdr_python_check_module("mako >= ${GNSSSDR_MAKO_MIN_VERSION}" mako "mako.__version__ >= '${GNSSSDR_MAKO_MIN_VERSION}'" MAKO_FOUND)
gnsssdr_python_check_module("six - python 2 and 3 compatibility library" six "True" SIX_FOUND)
endif()
endif()
endif()
if(${PYTHON_VERSION_MAJOR} VERSION_EQUAL 3)
set(PYTHON3 TRUE)
endif(${PYTHON_VERSION_MAJOR} VERSION_EQUAL 3)
endif()
if(CMAKE_CROSSCOMPILING)
set(QA_PYTHON_EXECUTABLE "/usr/bin/python")
else(CMAKE_CROSSCOMPILING)
else()
set(QA_PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE})
endif(CMAKE_CROSSCOMPILING)
endif()
#make the path to the executable appear in the cmake gui
# make the path to the executable appear in the cmake gui
set(PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE} CACHE FILEPATH "python interpreter")
set(QA_PYTHON_EXECUTABLE ${QA_PYTHON_EXECUTABLE} CACHE FILEPATH "python interpreter for QA tests")

View File

@ -16,14 +16,14 @@
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
##############################################################################
# check if the compiler defines the architecture as ARM and set the
# check if the compiler defines the architecture as ARM and set the
# version, if found.
#
# - Anthony Arnold
##############################################################################
if (__TEST_FOR_ARM_INCLUDED)
return ()
if(__TEST_FOR_ARM_INCLUDED)
return()
endif()
set(__TEST_FOR_ARM_INCLUDED TRUE)
@ -31,27 +31,27 @@ set(__TEST_FOR_ARM_INCLUDED TRUE)
# output variable if found.
function(check_arm_version ppdef input_string version output_var)
string(REGEX MATCH "${ppdef}" _VERSION_MATCH "${input_string}")
if (NOT _VERSION_MATCH STREQUAL "")
if(NOT _VERSION_MATCH STREQUAL "")
set(${output_var} "${version}" PARENT_SCOPE)
endif(NOT _VERSION_MATCH STREQUAL "")
endif()
endfunction()
message(STATUS "Checking for ARM")
set (IS_ARM NO)
set (ARM_VERSION "")
set(IS_ARM NO)
set(ARM_VERSION "")
if (CMAKE_COMPILER_IS_GNUCXX)
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
execute_process(COMMAND echo "int main(){}"
COMMAND ${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1} -dM -E -
OUTPUT_VARIABLE TEST_FOR_ARM_RESULTS)
string(REGEX MATCH "__arm" ARM_FOUND "${TEST_FOR_ARM_RESULTS}")
if(ARM_FOUND STREQUAL "")
string(REGEX MATCH "__aarch64" ARM_FOUND "${TEST_FOR_ARM_RESULTS}")
endif(ARM_FOUND STREQUAL "")
string(REGEX MATCH "__aarch64" ARM_FOUND "${TEST_FOR_ARM_RESULTS}")
endif()
if (NOT ARM_FOUND STREQUAL "")
if(NOT ARM_FOUND STREQUAL "")
set(IS_ARM YES)
message(STATUS "ARM system detected")
@ -83,22 +83,21 @@ if (CMAKE_COMPILER_IS_GNUCXX)
check_arm_version("__ARM_ARCH_8A" ${TEST_FOR_ARM_RESULTS} "armv8-a" ARM_VERSION)
# anything else just define as arm
if (ARM_VERSION STREQUAL "")
if(ARM_VERSION STREQUAL "")
message(STATUS "Couldn't detect ARM version. Setting to 'arm'")
set(ARM_VERSION "arm")
else (ARM_VERSION STREQUAL "")
else()
message(STATUS "ARM version ${ARM_VERSION} detected")
endif (ARM_VERSION STREQUAL "")
else (NOT ARM_FOUND STREQUAL "")
message(STATUS "System is not ARM")
endif(NOT ARM_FOUND STREQUAL "")
endif()
else()
message(STATUS "System is not ARM")
endif()
else (CMAKE_COMPILE_IS_GNUCXX)
else()
# TODO: Other compilers
message(STATUS "Not detecting ARM on non-GNUCXX compiler. Defaulting to false")
message(STATUS "If you are compiling for ARM, set IS_ARM=ON manually")
endif(CMAKE_COMPILER_IS_GNUCXX)
endif()
set(IS_ARM ${IS_ARM} CACHE BOOL "Compiling for ARM")
set(ARM_VERSION ${ARM_VERSION} CACHE STRING "ARM version")

View File

@ -22,21 +22,20 @@
# - Anthony Arnold
###############################################################################
function (test_for_sse h_file result_var name)
if (NOT DEFINED ${result_var})
function(test_for_sse h_file result_var name)
if(NOT DEFINED ${result_var})
execute_process(COMMAND echo "#include <${h_file}>"
COMMAND ${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1} -c -x c++ -
RESULT_VARIABLE COMPILE_RESULT
OUTPUT_QUIET ERROR_QUIET)
COMMAND ${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1} -c -x c++ -
RESULT_VARIABLE COMPILE_RESULT
OUTPUT_QUIET ERROR_QUIET)
set(detected 0)
if (COMPILE_RESULT EQUAL 0)
if(COMPILE_RESULT EQUAL 0)
message(STATUS "Detected ${name}")
set(detected 1)
endif(COMPILE_RESULT EQUAL 0)
endif()
set(${result_var} ${detected} CACHE INTERNAL "${name} Available")
endif (NOT DEFINED ${result_var})
endfunction(test_for_sse)
endif()
endfunction()
message(STATUS "Testing for SIMD extensions")

View File

@ -16,6 +16,7 @@ Next release will have several improvements in different dimensions, addition of
- Redesign of the time counter for enhanced continuity.
- Improved flow graph in multisystem configurations: the receiver does not get stalled anymore if no signal is found from the first system.
- Improved acquisition and tracking sensitivity.
- Added mechanisms for Assisted GNSS, thus shortening the Time-To-First-Fix. Provision of data via XML files or via SUPL v1.0. Documented at https://gnss-sdr.org/docs/sp-blocks/global-parameters/
- Other minor bug fixes.
@ -27,6 +28,7 @@ Next release will have several improvements in different dimensions, addition of
- New volk_gnsssdr kernels: volk_gnsssdr_16i_xn_resampler_16i_xn.h, volk_gnsssdr_16ic_16i_rotator_dot_prod_16ic_xn.h, volk_gnsssdr_32f_xn_resampler_32f_xn.h, volk_gnsssdr_32fc_32f_rotator_dot_prod_32fc_xn.h
- Some AVX2 implementations added to the volk_gnsssdr library.
- Improvement in C++ usage: Use of const container calls when result is immediately converted to a const iterator. Using these members removes an implicit conversion from iterator to const_iterator.
- Output printers can be shut down, with some savings in memory and storage requirements.
- A number of code optimizations here and there.
@ -34,7 +36,8 @@ Next release will have several improvements in different dimensions, addition of
- A number of new parameters have been exposed to the configuration system.
- Possibility to choose Pilot or Data component for tracking of GPS L5 and Galileo E5a signals.
- Enabled extended coherent integration times.
- Enabled extended coherent integration times for signal tracking.
- Configurable coherent and/or non-coherent signal acquisition.
- Some configuration parameters can now be overridden by commandline flags for easier use in scripts.
@ -48,11 +51,15 @@ Next release will have several improvements in different dimensions, addition of
- Added five more signal sources: "Fmcomms2_Signal_Source" (requires gr-iio), "Plutosdr_Signal Source" (requires gr-iio), "Spir_GSS6450_File_Signal_Source", "Labsat_Signal_Source" and "Custom_UDP_Signal_Source" (requires libpcap). Documented in https://gnss-sdr.org/docs/sp-blocks/signal-source/
- Improved support for BladeRF, HackRF and RTL-SDR front-ends.
- Added tools for the interaction with front-ends based on the AD9361 chipset.
- Intermediate results are now saved in .mat binary format, readable from Matlab/Octave and from Python via h5py.
- Intermediate results are now saved in MAT-file format (.mat), readable from Matlab/Octave and from Python via h5py.
- Added the GPX output format.
- Fixed a bug in the format of NMEA sentences when latitude or longitude minutes were >10.
- Improvements in the generation of KML files.
- Improvements in the NMEA output. The receiver can produce GPGGA, GPRMC, GPGSA, GPGSV, GAGSA and GAGSV sentences.
- Improvements in the RTCM server stability.
- Improvements in the correctness of generated RINEX files.
- The receiver can read and make use of Galileo almanac XML files published by the European GNSS Service Centre at https://www.gsc-europa.eu/system-status/almanac-data
- Own-defined XML schemas for navigation data published at https://github.com/gnss-sdr/gnss-sdr/tree/next/docs/xml-schemas
- Added program rinex2assist to convert RINEX navigation files into XML files usable for Assisted GNSS. Only available building from source. See https://github.com/gnss-sdr/gnss-sdr/tree/next/src/utils/rinex2assist
### Improvements in Maintainability:
@ -64,6 +71,8 @@ Next release will have several improvements in different dimensions, addition of
- Improvement in C++ usage: The override special identifier is now used when overriding a virtual function. This helps the compiler to check for type changes in the base class, making the detection of errors easier.
- Improvement in C++ usage: A number of unused includes have been removed. Order of includes set to: local (in-source) headers, then library headers, then system headers. This helps to detect missing includes.
- Improvement in C++ usage: Enhanced const correctness. Misuses of those variables are detected by the compiler.
- Applied some style rules to CMake scripts.
- Minimal versions of dependencies identified and detected.
### Improvements in Portability:
@ -76,15 +85,16 @@ Next release will have several improvements in different dimensions, addition of
- The Ninja build system can be used in replacement of make.
- The volk_gnsssdr library can be built using Python 2.7 or Python 3.6.
- The volk_gnsssdr library is now ready for AArch64 NEON instructions.
- Ready for GNU Radio 3.8 C++ API (as per current next branch of GNU Radio upstream repository).
- Ready for GNU Radio 3.8 C++ API (as per current master branch of GNU Radio upstream repository).
- Improved detection of required and optional dependencies in many GNU/Linux distributions and processor architectures.
- Improvement in C++ usage: The <ctime> library has been replaced by the more modern and portable <chrono>.
- Improvement in C++ usage: The <ctime> library has been replaced by the more modern and portable <chrono> (except for the interaction with RTKLIB).
- Improvement in C++ usage: The <stdio.h> library has been replaced by the more modern and portable <fstream> for file handling.
- Improvement in C++ usage: C++ libraries preferred over C libraries (e.g., <cctype> instead of <ctype.h>, <cmath> instead of <math.h>).
- Fixes required by Debian packaging.
- Fixes required by Macports packaging.
- A downside in portability: BLAS and LAPACK libraries are now required even in ARM devices.
- A downside in portability: the matio library >= 1.5.3 is a new required dependency. If not found, it is downloaded and built automatically at building time, but this requires libtool, automake and hdf5 already installed in the system.
- A downside in portability: the PugiXML library is a new required dependency. If not found, it is downloaded and built automatically at building time.
### Improvements in Reliability:
@ -93,6 +103,7 @@ Next release will have several improvements in different dimensions, addition of
- Improved flow graph stabiliy.
- Introduction of high-integrity C++ practices into the source code and included in the coding style guide. See https://gnss-sdr.org/coding-style/
- Fixed a number of defects detected by Coverity Scan.
- Improvement of QA code and addition of a number of new tests. Documented at https://gnss-sdr.org/docs/tutorials/testing-software-receiver-2/
- Improvement in C++ usage: rand() function replaced by <random> library.
- Improvement in C++ usage: strlen and strncpy have been replaced by safer C++ counterparts.
- Improvement in C++ usage: Some destructors have been fixed, avoiding segmentation faults when exiting the program.
@ -122,9 +133,10 @@ Next release will have several improvements in different dimensions, addition of
- All Observables block implementations have been merged into a single implementation for all kinds of GNSS signals, making it easier to configure.
- All PVT block implementations have been merged into a single implementation for all kinds of GNSS signals, making it easier to configure.
- Misleading parameter name GNSS-SDR.internal_fs_hz has been replaced by GNSS-SDR.internal_fs_sps. The old parameter name is still read. If found, a warning is provided to the user.
- Updated and improved documentation of processing blocks at https://gnss-sdr.org/docs/sp-blocks/
- Misleading parameter name GNSS-SDR.internal_fs_hz has been replaced by GNSS-SDR.internal_fs_sps. The old parameter name is still read. If found, a warning is provided to the user. The old name will be removed in future releases.
- Updated and improved online documentation of processing blocks at https://gnss-sdr.org/docs/sp-blocks/
- Improved documentation of required dependency packages in several GNU/Linux distributions.
- Dump and output files can now be stored anywhere.
- Parameter names with the same role have been harmonized within different block implementations.
- Added a changelog, a code of conduct, a contributing guide and a pull-request template in the source tree.
- Added colors to the commandline user interface.

View File

@ -12,14 +12,14 @@ GPS L1 C/A
- [iono_model.xsd](./iono_model.xsd) - GPS NAV message ionospheric model parameters.
- [utc_model.xsd](./utc_model.xsd) - GPS NAV message UTC model parameters.
- [gps_almanac_map.xsd](./gps_almanac_map.xsd) - GPS NAV message almanac.
GPS L2C and L5
--------------
- [cnav_ephemeris_map.xsd](./cnav_ephemeris_map.xsd) - GPS CNAV message ephemeris parameters.
Galileo
-------
@ -31,4 +31,5 @@ Galileo
-------
Please check https://gnss-sdr.org/docs/sp-blocks/global-parameters/ for more information about the usage of XML files in GNSS-SDR.
You could find useful the utility program [rinex2assist](https://github.com/gnss-sdr/gnss-sdr/tree/next/src/utils/rinex2assist) for the generation of compatible XML files from recent, publicly available RINEX navigation data files.

View File

@ -1,4 +1,4 @@
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="boost_serialization">
<xs:complexType>
<xs:sequence>
@ -16,6 +16,7 @@
<xs:sequence>
<xs:element type="xs:byte" name="i_satellite_PRN"/>
<xs:element type="xs:float" name="M0_1"/>
<xs:element type="xs:float" name="delta_n_3"/>
<xs:element type="xs:float" name="e_1"/>
<xs:element type="xs:float" name="A_1"/>
<xs:element type="xs:float" name="OMEGA_0_2"/>
@ -34,6 +35,22 @@
<xs:element type="xs:float" name="af0_4"/>
<xs:element type="xs:float" name="af1_4"/>
<xs:element type="xs:float" name="af2_4"/>
<xs:element type="xs:float" name="WN_5"/>
<xs:element type="xs:float" name="TOW_5"/>
<xs:element type="xs:float" name="Galileo_satClkDrift"/>
<xs:element type="xs:float" name="Galileo_dtr"/>
<xs:element type="xs:byte" name="flag_all_ephemeris"/>
<xs:element type="xs:byte" name="IOD_ephemeris"/>
<xs:element type="xs:byte" name="IOD_nav_1"/>
<xs:element type="xs:float" name="SISA_3"/>
<xs:element type="xs:byte" name="E5a_HS"/>
<xs:element type="xs:float" name="E5b_HS_5"/>
<xs:element type="xs:float" name="E1B_HS_5"/>
<xs:element type="xs:byte" name="E5a_DVS"/>
<xs:element type="xs:float" name="E5b_DVS_5"/>
<xs:element type="xs:float" name="E1B_DVS_5"/>
<xs:element type="xs:float" name="BGD_E1E5a_5"/>
<xs:element type="xs:float" name="BGD_E1E5b_5"/>
</xs:sequence>
<xs:attribute type="xs:byte" name="class_id" use="optional"/>
<xs:attribute type="xs:byte" name="tracking_level" use="optional"/>

View File

@ -21,5 +21,5 @@ add_subdirectory(core)
add_subdirectory(main)
if(ENABLE_UNIT_TESTING OR ENABLE_SYSTEM_TESTING)
add_subdirectory(tests)
endif(ENABLE_UNIT_TESTING OR ENABLE_SYSTEM_TESTING)
endif()
add_subdirectory(utils)

View File

@ -18,33 +18,39 @@
if(Boost_VERSION LESS 105800)
add_definitions(-DOLD_BOOST=1)
endif(Boost_VERSION LESS 105800)
add_definitions(-DOLD_BOOST=1)
endif()
set(PVT_ADAPTER_SOURCES
rtklib_pvt.cc
rtklib_pvt.cc
)
set(PVT_ADAPTER_HEADERS
rtklib_pvt.h
rtklib_pvt.h
)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/PVT/gnuradio_blocks
${CMAKE_SOURCE_DIR}/src/algorithms/PVT/libs
${CMAKE_SOURCE_DIR}/src/algorithms/libs/rtklib
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${ARMADILLO_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/PVT/gnuradio_blocks
${CMAKE_SOURCE_DIR}/src/algorithms/PVT/libs
${CMAKE_SOURCE_DIR}/src/algorithms/libs/rtklib
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${ARMADILLO_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
)
add_library(pvt_adapters ${PVT_ADAPTER_SOURCES} ${PVT_ADAPTER_HEADERS})
source_group(Headers FILES ${PVT_ADAPTER_HEADERS})
target_link_libraries(pvt_adapters pvt_gr_blocks ${ARMADILLO_LIBRARIES} ${GNURADIO_RUNTIME_LIBRARIES})
target_link_libraries(pvt_adapters
pvt_gr_blocks
${ARMADILLO_LIBRARIES}
${GNURADIO_RUNTIME_LIBRARIES}
)

View File

@ -95,8 +95,6 @@ public:
private:
rtklib_pvt_cc_sptr pvt_;
rtk_t rtk;
bool dump_;
std::string dump_filename_;
std::string role_;
unsigned int in_streams_;
unsigned int out_streams_;

View File

@ -18,30 +18,30 @@
if(Boost_VERSION LESS 105800)
add_definitions(-DOLD_BOOST=1)
endif(Boost_VERSION LESS 105800)
add_definitions(-DOLD_BOOST=1)
endif()
set(PVT_GR_BLOCKS_SOURCES
rtklib_pvt_cc.cc
rtklib_pvt_cc.cc
)
set(PVT_GR_BLOCKS_HEADERS
rtklib_pvt_cc.h
rtklib_pvt_cc.h
)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/PVT/libs
${CMAKE_SOURCE_DIR}/src/algorithms/libs/rtklib
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${ARMADILLO_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/PVT/libs
${CMAKE_SOURCE_DIR}/src/algorithms/libs/rtklib
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${ARMADILLO_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
)
add_library(pvt_gr_blocks ${PVT_GR_BLOCKS_SOURCES} ${PVT_GR_BLOCKS_HEADERS})

View File

@ -16,50 +16,49 @@
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
#
add_definitions( -DGNSS_SDR_VERSION="${VERSION}" )
add_definitions(-DGNSS_SDR_VERSION="${VERSION}")
set(PVT_LIB_SOURCES
pvt_solution.cc
ls_pvt.cc
hybrid_ls_pvt.cc
kml_printer.cc
gpx_printer.cc
rinex_printer.cc
nmea_printer.cc
rtcm_printer.cc
geojson_printer.cc
rtklib_solver.cc
pvt_conf.cc
set(PVT_LIB_SOURCES
pvt_solution.cc
ls_pvt.cc
hybrid_ls_pvt.cc
kml_printer.cc
gpx_printer.cc
rinex_printer.cc
nmea_printer.cc
rtcm_printer.cc
geojson_printer.cc
rtklib_solver.cc
pvt_conf.cc
)
set(PVT_LIB_HEADERS
pvt_solution.h
ls_pvt.h
hybrid_ls_pvt.h
kml_printer.h
gpx_printer.h
rinex_printer.h
nmea_printer.h
rtcm_printer.h
geojson_printer.h
rtklib_solver.h
pvt_conf.h
set(PVT_LIB_HEADERS
pvt_solution.h
ls_pvt.h
hybrid_ls_pvt.h
kml_printer.h
gpx_printer.h
rinex_printer.h
nmea_printer.h
rtcm_printer.h
geojson_printer.h
rtklib_solver.h
pvt_conf.h
)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/PVT/adapters
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${CMAKE_SOURCE_DIR}/src/algorithms/libs/rtklib
${Boost_INCLUDE_DIRS}
${ARMADILLO_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${GLOG_INCLUDE_DIRS}
${MATIO_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/PVT/adapters
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${CMAKE_SOURCE_DIR}/src/algorithms/libs/rtklib
${Boost_INCLUDE_DIRS}
${ARMADILLO_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${GLOG_INCLUDE_DIRS}
${MATIO_INCLUDE_DIRS}
)
list(SORT PVT_LIB_HEADERS)
@ -69,17 +68,25 @@ add_library(pvt_lib ${PVT_LIB_SOURCES} ${PVT_LIB_HEADERS})
source_group(Headers FILES ${PVT_LIB_HEADERS})
if(MATIO_FOUND)
add_dependencies(pvt_lib glog-${glog_RELEASE} armadillo-${armadillo_RELEASE})
else(MATIO_FOUND)
add_dependencies(pvt_lib glog-${glog_RELEASE} armadillo-${armadillo_RELEASE} matio-${GNSSSDR_MATIO_LOCAL_VERSION})
endif(MATIO_FOUND)
add_dependencies(pvt_lib
glog-${glog_RELEASE}
armadillo-${armadillo_RELEASE}
)
else()
add_dependencies(pvt_lib
glog-${glog_RELEASE}
armadillo-${armadillo_RELEASE}
matio-${GNSSSDR_MATIO_LOCAL_VERSION}
)
endif()
target_link_libraries(
pvt_lib
pvt_lib
rtklib_lib
gnss_sdr_flags
${Boost_LIBRARIES}
${GLOG_LIBRARIES}
gnss_sp_libs
${Boost_LIBRARIES}
${GLOG_LIBRARIES}
${ARMADILLO_LIBRARIES}
${BLAS}
${LAPACK}

View File

@ -19,4 +19,3 @@
add_subdirectory(adapters)
add_subdirectory(gnuradio_blocks)
add_subdirectory(libs)

View File

@ -55,45 +55,60 @@ set(ACQ_ADAPTER_HEADERS
glonass_l2_ca_pcps_acquisition.h
)
if(ENABLE_FPGA)
set(ACQ_ADAPTER_SOURCES ${ACQ_ADAPTER_SOURCES} gps_l1_ca_pcps_acquisition_fpga.cc
gps_l2_m_pcps_acquisition_fpga.cc
galileo_e1_pcps_ambiguous_acquisition_fpga.cc
galileo_e5a_pcps_acquisition_fpga.cc
gps_l5i_pcps_acquisition_fpga.cc)
set(ACQ_ADAPTER_SOURCES ${ACQ_ADAPTER_SOURCES}
gps_l1_ca_pcps_acquisition_fpga.cc
gps_l2_m_pcps_acquisition_fpga.cc
galileo_e1_pcps_ambiguous_acquisition_fpga.cc
galileo_e5a_pcps_acquisition_fpga.cc
gps_l5i_pcps_acquisition_fpga.cc
)
set(ACQ_ADAPTER_HEADERS ${ACQ_ADAPTER_HEADERS}
gps_l1_ca_pcps_acquisition_fpga.h
gps_l2_m_pcps_acquisition_fpga.h
galileo_e1_pcps_ambiguous_acquisition_fpga.h
galileo_e5a_pcps_acquisition_fpga.h
gps_l5i_pcps_acquisition_fpga.h
)
endif()
set(ACQ_ADAPTER_HEADERS ${ACQ_ADAPTER_HEADERS} gps_l1_ca_pcps_acquisition_fpga.h
gps_l2_m_pcps_acquisition_fpga.h
galileo_e1_pcps_ambiguous_acquisition_fpga.h
galileo_e5a_pcps_acquisition_fpga.h
gps_l5i_pcps_acquisition_fpga.h)
endif(ENABLE_FPGA)
if(OPENCL_FOUND)
set(ACQ_ADAPTER_SOURCES ${ACQ_ADAPTER_SOURCES} gps_l1_ca_pcps_opencl_acquisition.cc)
set(ACQ_ADAPTER_HEADERS ${ACQ_ADAPTER_HEADERS} gps_l1_ca_pcps_opencl_acquisition.h)
endif(OPENCL_FOUND)
set(ACQ_ADAPTER_SOURCES
${ACQ_ADAPTER_SOURCES}
gps_l1_ca_pcps_opencl_acquisition.cc
)
set(ACQ_ADAPTER_HEADERS ${ACQ_ADAPTER_HEADERS}
gps_l1_ca_pcps_opencl_acquisition.h
)
endif()
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/acquisition/gnuradio_blocks
${CMAKE_SOURCE_DIR}/src/algorithms/acquisition/libs
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${Boost_INCLUDE_DIRS}
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${ARMADILLO_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${GNURADIO_BLOCKS_INCLUDE_DIRS}
${VOLK_GNSSSDR_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/acquisition/gnuradio_blocks
${CMAKE_SOURCE_DIR}/src/algorithms/acquisition/libs
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${Boost_INCLUDE_DIRS}
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${ARMADILLO_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${GNURADIO_BLOCKS_INCLUDE_DIRS}
${VOLK_GNSSSDR_INCLUDE_DIRS}
)
list(SORT ACQ_ADAPTER_HEADERS)
list(SORT ACQ_ADAPTER_SOURCES)
add_library(acq_adapters ${ACQ_ADAPTER_SOURCES} ${ACQ_ADAPTER_HEADERS})
source_group(Headers FILES ${ACQ_ADAPTER_HEADERS})
target_link_libraries(acq_adapters acquisition_lib gnss_sp_libs gnss_sdr_flags acq_gr_blocks ${Boost_LIBRARIES} ${GNURADIO_RUNTIME_LIBRARIES} ${GNURADIO_BLOCKS_LIBRARIES})
target_link_libraries(acq_adapters
acquisition_lib
gnss_sp_libs
gnss_sdr_flags
acq_gr_blocks
${Boost_LIBRARIES}
${GNURADIO_RUNTIME_LIBRARIES}
${GNURADIO_BLOCKS_LIBRARIES}
)

View File

@ -42,38 +42,37 @@ set(ACQ_GR_BLOCKS_HEADERS
if(ENABLE_FPGA)
set(ACQ_GR_BLOCKS_SOURCES ${ACQ_GR_BLOCKS_SOURCES} pcps_acquisition_fpga.cc)
set(ACQ_GR_BLOCKS_HEADERS ${ACQ_GR_BLOCKS_HEADERS} pcps_acquisition_fpga.h)
endif(ENABLE_FPGA)
endif()
if(OPENCL_FOUND)
set(ACQ_GR_BLOCKS_SOURCES ${ACQ_GR_BLOCKS_SOURCES} pcps_opencl_acquisition_cc.cc)
set(ACQ_GR_BLOCKS_HEADERS ${ACQ_GR_BLOCKS_HEADERS} pcps_opencl_acquisition_cc.h)
endif(OPENCL_FOUND)
endif()
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/acquisition/libs
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${Boost_INCLUDE_DIRS}
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${ARMADILLO_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${VOLK_GNSSSDR_INCLUDE_DIRS}
${MATIO_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/acquisition/libs
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${Boost_INCLUDE_DIRS}
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${ARMADILLO_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${VOLK_GNSSSDR_INCLUDE_DIRS}
${MATIO_INCLUDE_DIRS}
)
if(OPENCL_FOUND)
include_directories( ${OPENCL_INCLUDE_DIRS} )
include_directories(${OPENCL_INCLUDE_DIRS})
if(OS_IS_MACOSX)
set(OPT_LIBRARIES ${OPT_LIBRARIES} "-framework OpenCL")
else(OS_IS_MACOSX)
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${OPENCL_LIBRARIES})
endif(OS_IS_MACOSX)
endif(OPENCL_FOUND)
set(OPT_LIBRARIES ${OPT_LIBRARIES} "-framework OpenCL")
else()
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${OPENCL_LIBRARIES})
endif()
endif()
list(SORT ACQ_GR_BLOCKS_HEADERS)
list(SORT ACQ_GR_BLOCKS_SOURCES)
@ -81,11 +80,31 @@ add_library(acq_gr_blocks ${ACQ_GR_BLOCKS_SOURCES} ${ACQ_GR_BLOCKS_HEADERS})
source_group(Headers FILES ${ACQ_GR_BLOCKS_HEADERS})
if(ENABLE_FPGA)
target_link_libraries(acq_gr_blocks acquisition_lib gnss_sp_libs gnss_system_parameters ${GNURADIO_RUNTIME_LIBRARIES} ${GNURADIO_FFT_LIBRARIES} ${VOLK_LIBRARIES} ${VOLK_GNSSSDR_LIBRARIES} ${OPT_LIBRARIES} ${OPT_ACQUISITION_LIBRARIES})
else(ENABLE_FPGA)
target_link_libraries(acq_gr_blocks gnss_sp_libs gnss_system_parameters ${GNURADIO_RUNTIME_LIBRARIES} ${GNURADIO_FFT_LIBRARIES} ${VOLK_LIBRARIES} ${VOLK_GNSSSDR_LIBRARIES} ${OPT_LIBRARIES} ${OPT_ACQUISITION_LIBRARIES} ${MATIO_LIBRARIES})
endif(ENABLE_FPGA)
target_link_libraries(acq_gr_blocks
acquisition_lib
gnss_sp_libs
gnss_system_parameters
${GNURADIO_RUNTIME_LIBRARIES}
${GNURADIO_FFT_LIBRARIES}
${VOLK_LIBRARIES}
${VOLK_GNSSSDR_LIBRARIES}
${OPT_LIBRARIES}
${OPT_ACQUISITION_LIBRARIES}
)
else()
target_link_libraries(acq_gr_blocks
gnss_sp_libs
gnss_system_parameters
${GNURADIO_RUNTIME_LIBRARIES}
${GNURADIO_FFT_LIBRARIES}
${VOLK_LIBRARIES}
${VOLK_GNSSSDR_LIBRARIES}
${OPT_LIBRARIES}
${MATIO_LIBRARIES}
${OPT_ACQUISITION_LIBRARIES}
)
endif()
if(NOT VOLK_GNSSSDR_FOUND)
if(NOT VOLKGNSSSDR_FOUND)
add_dependencies(acq_gr_blocks volk_gnsssdr_module)
endif(NOT VOLK_GNSSSDR_FOUND)
endif()

View File

@ -17,20 +17,20 @@
#
if(ENABLE_FPGA)
set(ACQUISITION_LIB_SOURCES fpga_acquisition.cc )
set(ACQUISITION_LIB_HEADERS fpga_acquisition.h )
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${VOLK_INCLUDE_DIRS}
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${VOLK_GNSSSDR_INCLUDE_DIRS}
)
endif(ENABLE_FPGA)
set(ACQUISITION_LIB_SOURCES fpga_acquisition.cc)
set(ACQUISITION_LIB_HEADERS fpga_acquisition.h)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${VOLK_INCLUDE_DIRS}
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${VOLK_GNSSSDR_INCLUDE_DIRS}
)
endif()
set(ACQUISITION_LIB_HEADERS ${ACQUISITION_LIB_HEADERS} acq_conf.h)
set(ACQUISITION_LIB_SOURCES ${ACQUISITION_LIB_SOURCES} acq_conf.cc)
@ -38,11 +38,21 @@ set(ACQUISITION_LIB_SOURCES ${ACQUISITION_LIB_SOURCES} acq_conf.cc)
list(SORT ACQUISITION_LIB_HEADERS)
list(SORT ACQUISITION_LIB_SOURCES)
add_library(acquisition_lib ${ACQUISITION_LIB_SOURCES} ${ACQUISITION_LIB_HEADERS})
add_library(acquisition_lib
${ACQUISITION_LIB_SOURCES}
${ACQUISITION_LIB_HEADERS}
)
source_group(Headers FILES ${ACQUISITION_LIB_HEADERS})
target_link_libraries(acquisition_lib ${VOLK_LIBRARIES} ${VOLK_GNSSSDR_LIBRARIES} ${GNURADIO_RUNTIME_LIBRARIES})
if(VOLK_GNSSSDR_FOUND)
target_link_libraries(acquisition_lib
${VOLK_LIBRARIES}
${VOLK_GNSSSDR_LIBRARIES}
${GNURADIO_RUNTIME_LIBRARIES}
)
if(VOLKGNSSSDR_FOUND)
add_dependencies(acquisition_lib glog-${glog_RELEASE})
else(VOLK_GNSSSDR_FOUND)
else()
add_dependencies(acquisition_lib glog-${glog_RELEASE} volk_gnsssdr_module)
endif()

View File

@ -17,4 +17,4 @@
#
add_subdirectory(adapters)
add_subdirectory(libs)
add_subdirectory(libs)

View File

@ -20,18 +20,28 @@ set(CHANNEL_ADAPTER_SOURCES channel.cc)
set(CHANNEL_ADAPTER_HEADERS channel.h)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/channel/libs
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/channel/libs
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
)
add_library(channel_adapters
${CHANNEL_ADAPTER_SOURCES}
${CHANNEL_ADAPTER_HEADERS}
)
add_library(channel_adapters ${CHANNEL_ADAPTER_SOURCES} ${CHANNEL_ADAPTER_HEADERS})
source_group(Headers FILES ${CHANNEL_ADAPTER_HEADERS})
target_link_libraries(channel_adapters channel_fsm ${GNURADIO_RUNTIME_LIBRARIES} ${Boost_LIBRARIES} gnss_sdr_flags)
target_link_libraries(channel_adapters
channel_fsm
${GNURADIO_RUNTIME_LIBRARIES}
${Boost_LIBRARIES}
gnss_sdr_flags
)

View File

@ -16,26 +16,26 @@
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
#
set(CHANNEL_FSM_SOURCES
channel_fsm.cc
set(CHANNEL_FSM_SOURCES
channel_fsm.cc
channel_msg_receiver_cc.cc
)
set(CHANNEL_FSM_HEADERS
channel_fsm.h
)
set(CHANNEL_FSM_HEADERS
channel_fsm.h
channel_msg_receiver_cc.h
)
)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/channel/adapters
${Boost_INCLUDE_DIRS}
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/channel/adapters
${Boost_INCLUDE_DIRS}
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
)
list(SORT CHANNEL_FSM_HEADERS)
@ -46,4 +46,3 @@ source_group(Headers FILES ${CHANNEL_FSM_HEADERS})
add_dependencies(channel_fsm glog-${glog_RELEASE})
target_link_libraries(channel_fsm gnss_rx)

View File

@ -17,4 +17,3 @@
#
add_subdirectory(adapters)
#add_subdirectory(gnuradio_blocks)

View File

@ -17,26 +17,26 @@
#
set(COND_ADAPTER_SOURCES
signal_conditioner.cc
array_signal_conditioner.cc
set(COND_ADAPTER_SOURCES
signal_conditioner.cc
array_signal_conditioner.cc
)
set(COND_ADAPTER_HEADERS
signal_conditioner.h
array_signal_conditioner.h
set(COND_ADAPTER_HEADERS
signal_conditioner.h
array_signal_conditioner.h
)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/acquisition/gnuradio_blocks
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/acquisition/gnuradio_blocks
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
)
list(SORT COND_ADAPTER_HEADERS)
@ -44,4 +44,4 @@ list(SORT COND_ADAPTER_SOURCES)
add_library(conditioner_adapters ${COND_ADAPTER_SOURCES} ${COND_ADAPTER_HEADERS})
source_group(Headers FILES ${COND_ADAPTER_HEADERS})
add_dependencies(conditioner_adapters glog-${glog_RELEASE})
add_dependencies(conditioner_adapters glog-${glog_RELEASE})

View File

@ -19,4 +19,3 @@
add_subdirectory(adapters)
add_subdirectory(gnuradio_blocks)

View File

@ -17,40 +17,48 @@
#
set(DATATYPE_ADAPTER_SOURCES
set(DATATYPE_ADAPTER_SOURCES
byte_to_short.cc
ibyte_to_cbyte.cc
ibyte_to_complex.cc
ibyte_to_cshort.cc
ishort_to_cshort.cc
ishort_to_complex.cc
ishort_to_complex.cc
)
set(DATATYPE_ADAPTER_HEADERS
set(DATATYPE_ADAPTER_HEADERS
byte_to_short.h
ibyte_to_cbyte.h
ibyte_to_complex.h
ibyte_to_cshort.h
ishort_to_cshort.h
ishort_to_complex.h
)
ishort_to_complex.h
)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/algorithms/data_type_adapter/gnuradio_blocks
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${VOLK_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/algorithms/data_type_adapter/gnuradio_blocks
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${VOLK_INCLUDE_DIRS}
)
list(SORT DATATYPE_ADAPTER_HEADERS)
list(SORT DATATYPE_ADAPTER_SOURCES)
add_library(datatype_adapters ${DATATYPE_ADAPTER_SOURCES} ${DATATYPE_ADAPTER_HEADERS})
add_library(datatype_adapters
${DATATYPE_ADAPTER_SOURCES}
${DATATYPE_ADAPTER_HEADERS}
)
source_group(Headers FILES ${DATATYPE_ADAPTER_HEADERS})
add_dependencies(datatype_adapters glog-${glog_RELEASE})
target_link_libraries(datatype_adapters data_type_gr_blocks ${GNURADIO_RUNTIME_LIBRARIES} ${GNURADIO_BLOCKS_LIBRARIES})
target_link_libraries(datatype_adapters
data_type_gr_blocks
${GNURADIO_RUNTIME_LIBRARIES}
${GNURADIO_BLOCKS_LIBRARIES}
)

View File

@ -17,27 +17,35 @@
#
set(DATA_TYPE_GR_BLOCKS_SOURCES
interleaved_byte_to_complex_byte.cc
interleaved_short_to_complex_short.cc
interleaved_byte_to_complex_short.cc
set(DATA_TYPE_GR_BLOCKS_SOURCES
interleaved_byte_to_complex_byte.cc
interleaved_short_to_complex_short.cc
interleaved_byte_to_complex_short.cc
)
set(DATA_TYPE_GR_BLOCKS_HEADERS
interleaved_byte_to_complex_byte.h
interleaved_short_to_complex_short.h
interleaved_byte_to_complex_short.h
set(DATA_TYPE_GR_BLOCKS_HEADERS
interleaved_byte_to_complex_byte.h
interleaved_short_to_complex_short.h
interleaved_byte_to_complex_short.h
)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${VOLK_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${VOLK_INCLUDE_DIRS}
)
list(SORT DATA_TYPE_GR_BLOCKS_HEADERS)
list(SORT DATA_TYPE_GR_BLOCKS_SOURCES)
add_library(data_type_gr_blocks ${DATA_TYPE_GR_BLOCKS_SOURCES} ${DATA_TYPE_GR_BLOCKS_HEADERS})
add_library(data_type_gr_blocks
${DATA_TYPE_GR_BLOCKS_SOURCES}
${DATA_TYPE_GR_BLOCKS_HEADERS}
)
source_group(Headers FILES ${DATA_TYPE_GR_BLOCKS_HEADERS})
target_link_libraries(data_type_gr_blocks ${GNURADIO_RUNTIME_LIBRARIES} ${VOLK_LIBRARIES})
target_link_libraries(data_type_gr_blocks
${GNURADIO_RUNTIME_LIBRARIES}
${VOLK_LIBRARIES}
)

View File

@ -17,4 +17,4 @@
#
add_subdirectory(adapters)
add_subdirectory(gnuradio_blocks)
add_subdirectory(gnuradio_blocks)

View File

@ -16,44 +16,54 @@
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
#
set(INPUT_FILTER_ADAPTER_SOURCES
fir_filter.cc
freq_xlating_fir_filter.cc
beamformer_filter.cc
pulse_blanking_filter.cc
notch_filter.cc
notch_filter_lite.cc
set(INPUT_FILTER_ADAPTER_SOURCES
fir_filter.cc
freq_xlating_fir_filter.cc
beamformer_filter.cc
pulse_blanking_filter.cc
notch_filter.cc
notch_filter_lite.cc
)
set(INPUT_FILTER_ADAPTER_HEADERS
fir_filter.h
freq_xlating_fir_filter.h
beamformer_filter.h
pulse_blanking_filter.h
notch_filter.h
notch_filter_lite.h
set(INPUT_FILTER_ADAPTER_HEADERS
fir_filter.h
freq_xlating_fir_filter.h
beamformer_filter.h
pulse_blanking_filter.h
notch_filter.h
notch_filter_lite.h
)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/algorithms/input_filter/gnuradio_blocks
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${VOLK_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/algorithms/input_filter/gnuradio_blocks
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${VOLK_INCLUDE_DIRS}
)
if(${PC_GNURADIO_RUNTIME_VERSION} VERSION_GREATER "3.7.13.4" )
add_definitions( -DGR_GREATER_38=1 )
endif(${PC_GNURADIO_RUNTIME_VERSION} VERSION_GREATER "3.7.13.4" )
if(${PC_GNURADIO_RUNTIME_VERSION} VERSION_GREATER "3.7.13.4")
add_definitions(-DGR_GREATER_38=1)
endif()
list(SORT INPUT_FILTER_ADAPTER_HEADERS)
list(SORT INPUT_FILTER_ADAPTER_SOURCES)
add_library(input_filter_adapters ${INPUT_FILTER_ADAPTER_SOURCES} ${INPUT_FILTER_ADAPTER_HEADERS})
add_library(input_filter_adapters
${INPUT_FILTER_ADAPTER_SOURCES}
${INPUT_FILTER_ADAPTER_HEADERS}
)
source_group(Headers FILES ${INPUT_FILTER_ADAPTER_HEADERS})
add_dependencies(input_filter_adapters glog-${glog_RELEASE} gnss_sp_libs)
target_link_libraries(input_filter_adapters input_filter_gr_blocks ${GNURADIO_RUNTIME_LIBRARIES} ${GNURADIO_BLOCKS_LIBRARIES} ${GNURADIO_FILTER_LIBRARIES} gnss_sp_libs)
target_link_libraries(input_filter_adapters
input_filter_gr_blocks
${GNURADIO_RUNTIME_LIBRARIES}
${GNURADIO_BLOCKS_LIBRARIES}
${GNURADIO_FILTER_LIBRARIES}
gnss_sp_libs
)

View File

@ -18,38 +18,44 @@
set(INPUT_FILTER_GR_BLOCKS_SOURCES
beamformer.cc
pulse_blanking_cc.cc
notch_cc.cc
notch_lite_cc.cc
beamformer.cc
pulse_blanking_cc.cc
notch_cc.cc
notch_lite_cc.cc
)
set(INPUT_FILTER_GR_BLOCKS_HEADERS
beamformer.h
pulse_blanking_cc.h
notch_cc.h
notch_lite_cc.h
beamformer.h
pulse_blanking_cc.h
notch_cc.h
notch_lite_cc.h
)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${GNURADIO_BLOCKS_INCLUDE_DIRS}
${VOLK_GNSSSDR_INCLUDE_DIRS}
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${GNURADIO_BLOCKS_INCLUDE_DIRS}
${VOLK_GNSSSDR_INCLUDE_DIRS}
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
)
list(SORT INPUT_FILTER_GR_BLOCKS_HEADERS)
list(SORT INPUT_FILTER_GR_BLOCKS_SOURCES)
add_library(input_filter_gr_blocks ${INPUT_FILTER_GR_BLOCKS_SOURCES} ${INPUT_FILTER_GR_BLOCKS_HEADERS})
add_library(input_filter_gr_blocks
${INPUT_FILTER_GR_BLOCKS_SOURCES}
${INPUT_FILTER_GR_BLOCKS_HEADERS})
source_group(Headers FILES ${INPUT_FILTER_GR_BLOCKS_HEADERS})
target_link_libraries(input_filter_gr_blocks ${GNURADIO_FILTER_LIBRARIES} ${VOLK_GNSSSDR_LIBRARIES} ${LOG4CPP_LIBRARIES})
target_link_libraries(input_filter_gr_blocks
${GNURADIO_FILTER_LIBRARIES}
${VOLK_GNSSSDR_LIBRARIES}
${LOG4CPP_LIBRARIES})
if(NOT VOLK_GNSSSDR_FOUND)
if(NOT VOLKGNSSSDR_FOUND)
add_dependencies(input_filter_gr_blocks volk_gnsssdr_module glog-${glog_RELEASE})
else(NOT VOLK_GNSSSDR_FOUND)
else()
add_dependencies(input_filter_gr_blocks glog-${glog_RELEASE})
endif(NOT VOLK_GNSSSDR_FOUND)
endif()

View File

@ -19,81 +19,79 @@
add_subdirectory(rtklib)
set(GNSS_SPLIBS_SOURCES
gps_l2c_signal.cc
gps_l5_signal.cc
galileo_e1_signal_processing.cc
gnss_sdr_valve.cc
gnss_sdr_sample_counter.cc
gnss_signal_processing.cc
gps_sdr_signal_processing.cc
glonass_l1_signal_processing.cc
glonass_l2_signal_processing.cc
pass_through.cc
galileo_e5_signal_processing.cc
complex_byte_to_float_x2.cc
byte_x2_to_complex_byte.cc
cshort_to_float_x2.cc
short_x2_to_cshort.cc
complex_float_to_complex_byte.cc
conjugate_cc.cc
conjugate_sc.cc
conjugate_ic.cc
gnss_sdr_create_directory.cc
geofunctions.cc
gps_l2c_signal.cc
gps_l5_signal.cc
galileo_e1_signal_processing.cc
gnss_sdr_valve.cc
gnss_sdr_sample_counter.cc
gnss_signal_processing.cc
gps_sdr_signal_processing.cc
glonass_l1_signal_processing.cc
glonass_l2_signal_processing.cc
pass_through.cc
galileo_e5_signal_processing.cc
complex_byte_to_float_x2.cc
byte_x2_to_complex_byte.cc
cshort_to_float_x2.cc
short_x2_to_cshort.cc
complex_float_to_complex_byte.cc
conjugate_cc.cc
conjugate_sc.cc
conjugate_ic.cc
gnss_sdr_create_directory.cc
geofunctions.cc
)
set(GNSS_SPLIBS_HEADERS
gps_l2c_signal.h
gps_l5_signal.h
galileo_e1_signal_processing.h
gnss_sdr_valve.h
gnss_sdr_sample_counter.h
gnss_signal_processing.h
gps_sdr_signal_processing.h
glonass_l1_signal_processing.h
glonass_l2_signal_processing.h
pass_through.h
galileo_e5_signal_processing.h
complex_byte_to_float_x2.h
byte_x2_to_complex_byte.h
cshort_to_float_x2.h
short_x2_to_cshort.h
complex_float_to_complex_byte.h
conjugate_cc.h
conjugate_sc.h
conjugate_ic.h
gnss_sdr_create_directory.h
gnss_circular_deque.h
geofunctions.h
gps_l2c_signal.h
gps_l5_signal.h
galileo_e1_signal_processing.h
gnss_sdr_valve.h
gnss_sdr_sample_counter.h
gnss_signal_processing.h
gps_sdr_signal_processing.h
glonass_l1_signal_processing.h
glonass_l2_signal_processing.h
pass_through.h
galileo_e5_signal_processing.h
complex_byte_to_float_x2.h
byte_x2_to_complex_byte.h
cshort_to_float_x2.h
short_x2_to_cshort.h
complex_float_to_complex_byte.h
conjugate_cc.h
conjugate_sc.h
conjugate_ic.h
gnss_sdr_create_directory.h
gnss_circular_deque.h
geofunctions.h
)
if(ENABLE_FPGA)
set(GNSS_SPLIBS_SOURCES ${GNSS_SPLIBS_SOURCES}
set(GNSS_SPLIBS_SOURCES
${GNSS_SPLIBS_SOURCES}
gnss_sdr_time_counter.cc
gnss_sdr_fpga_sample_counter.cc
)
set(GNSS_SPLIBS_HEADERS ${GNSS_SPLIBS_HEADERS}
)
set(GNSS_SPLIBS_HEADERS
${GNSS_SPLIBS_HEADERS}
gnss_sdr_time_counter.h
gnss_sdr_fpga_sample_counter.h
)
endif(ENABLE_FPGA)
)
endif()
if(OPENCL_FOUND)
set(GNSS_SPLIBS_SOURCES ${GNSS_SPLIBS_SOURCES}
opencl/fft_execute.cc # Needs OpenCL
opencl/fft_setup.cc # Needs OpenCL
opencl/fft_kernelstring.cc # Needs OpenCL
opencl/fft_execute.cc # Needs OpenCL
opencl/fft_setup.cc # Needs OpenCL
opencl/fft_kernelstring.cc # Needs OpenCL
)
set(GNSS_SPLIBS_HEADERS ${GNSS_SPLIBS_HEADERS}
opencl/fft_execute.h # Needs OpenCL
opencl/fft_setup.h # Needs OpenCL
opencl/fft_kernelstring.h # Needs OpenCL
opencl/fft_execute.h # Needs OpenCL
opencl/fft_setup.h # Needs OpenCL
opencl/fft_kernelstring.h # Needs OpenCL
)
endif(OPENCL_FOUND)
endif()
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
@ -111,13 +109,13 @@ include_directories(
)
if(OPENCL_FOUND)
include_directories( ${OPENCL_INCLUDE_DIRS} )
include_directories(${OPENCL_INCLUDE_DIRS})
if(OS_IS_MACOSX)
set(OPT_LIBRARIES ${OPT_LIBRARIES} "-framework OpenCL")
else(OS_IS_MACOSX)
else()
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${OPENCL_LIBRARIES})
endif(OS_IS_MACOSX)
endif(OPENCL_FOUND)
endif()
endif()
add_definitions(-DGNSSSDR_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}")
@ -127,7 +125,8 @@ list(SORT GNSS_SPLIBS_SOURCES)
add_library(gnss_sp_libs ${GNSS_SPLIBS_SOURCES} ${GNSS_SPLIBS_HEADERS})
source_group(Headers FILES ${GNSS_SPLIBS_HEADERS})
target_link_libraries(gnss_sp_libs ${GNURADIO_RUNTIME_LIBRARIES}
target_link_libraries(gnss_sp_libs
${GNURADIO_RUNTIME_LIBRARIES}
${VOLK_LIBRARIES} ${ORC_LIBRARIES}
${VOLK_GNSSSDR_LIBRARIES} ${ORC_LIBRARIES}
${GFlags_LIBS}
@ -139,15 +138,16 @@ target_link_libraries(gnss_sp_libs ${GNURADIO_RUNTIME_LIBRARIES}
gnss_rx
)
if(NOT VOLK_GNSSSDR_FOUND)
add_dependencies(gnss_sp_libs volk_gnsssdr_module armadillo-${armadillo_RELEASE})
else(NOT VOLK_GNSSSDR_FOUND)
if(NOT VOLKGNSSSDR_FOUND)
add_dependencies(gnss_sp_libs volk_gnsssdr_module
armadillo-${armadillo_RELEASE})
else()
add_dependencies(gnss_sp_libs armadillo-${armadillo_RELEASE})
endif(NOT VOLK_GNSSSDR_FOUND)
endif()
if(${GFLAGS_GREATER_20})
add_definitions(-DGFLAGS_GREATER_2_0=1)
endif(${GFLAGS_GREATER_20})
endif()
add_library(gnss_sdr_flags gnss_sdr_flags.cc gnss_sdr_flags.h)
source_group(Headers FILES gnss_sdr_flags.h)

View File

@ -126,8 +126,8 @@ void galileo_e1_gen_float(float* _dest, int* _prn, char _Signal[3])
const float alpha = sqrt(10.0 / 11.0);
const float beta = sqrt(1.0 / 11.0);
int32_t sinboc_11[12 * 4092]; // _codeLength not accepted by Clang
int32_t sinboc_61[12 * 4092];
int32_t sinboc_11[12 * 4092] = {0}; // _codeLength not accepted by Clang
int32_t sinboc_61[12 * 4092] = {0};
galileo_e1_sinboc_11_gen_int(sinboc_11, _prn, _codeLength); //generate sinboc(1,1) 12 samples per chip
galileo_e1_sinboc_61_gen_int(sinboc_61, _prn, _codeLength); //generate sinboc(6,1) 12 samples per chip

View File

@ -131,12 +131,6 @@ void galileo_e5_a_code_gen_complex_sampled(std::complex<float>* _dest, char _Sig
{
_dest[(i + delay) % _samplesPerCode] = _code[i];
}
if (_fs != _codeFreqBasis)
{
free(_code);
}
else
{
delete[] _code;
}
delete[] _code;
}

View File

@ -40,13 +40,14 @@
gnss_sdr_valve::gnss_sdr_valve(size_t sizeof_stream_item,
unsigned long long nitems,
gr::msg_queue::sptr queue, bool stop_flowgraph) : gr::sync_block("valve",
gr::io_signature::make(1, 1, sizeof_stream_item),
gr::io_signature::make(1, 1, sizeof_stream_item)),
d_nitems(nitems),
d_ncopied_items(0),
d_queue(queue),
d_stop_flowgraph(stop_flowgraph)
gr::msg_queue::sptr queue,
bool stop_flowgraph) : gr::sync_block("valve",
gr::io_signature::make(1, 1, sizeof_stream_item),
gr::io_signature::make(1, 1, sizeof_stream_item)),
d_nitems(nitems),
d_ncopied_items(0),
d_queue(queue),
d_stop_flowgraph(stop_flowgraph)
{
d_open_valve = false;
}
@ -58,16 +59,20 @@ boost::shared_ptr<gr::block> gnss_sdr_make_valve(size_t sizeof_stream_item, unsi
return valve_;
}
boost::shared_ptr<gr::block> gnss_sdr_make_valve(size_t sizeof_stream_item, unsigned long long nitems, gr::msg_queue::sptr queue)
{
boost::shared_ptr<gnss_sdr_valve> valve_(new gnss_sdr_valve(sizeof_stream_item, nitems, queue, false));
boost::shared_ptr<gnss_sdr_valve> valve_(new gnss_sdr_valve(sizeof_stream_item, nitems, queue, true));
return valve_;
}
void gnss_sdr_valve::open_valve()
{
d_open_valve = true;
}
int gnss_sdr_valve::work(int noutput_items,
gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items)
@ -87,7 +92,7 @@ int gnss_sdr_valve::work(int noutput_items,
else
{
usleep(1000000);
return 0; //do not produce or consume
return 0; // do not produce or consume
}
}
unsigned long long n = std::min(d_nitems - d_ncopied_items, static_cast<long long unsigned int>(noutput_items));

View File

@ -41,10 +41,12 @@
boost::shared_ptr<gr::block> gnss_sdr_make_valve(size_t sizeof_stream_item,
unsigned long long nitems,
gr::msg_queue::sptr queue);
boost::shared_ptr<gr::block> gnss_sdr_make_valve(size_t sizeof_stream_item,
unsigned long long nitems,
gr::msg_queue::sptr queue,
bool stop_flowgraph);
/*!
* \brief Implementation of a GNU Radio block that sends a STOP message to the
* control queue right after a specific number of samples have passed through it.
@ -59,7 +61,6 @@ class gnss_sdr_valve : public gr::sync_block
gr::msg_queue::sptr queue,
bool stop_flowgraph);
unsigned long long d_nitems;
unsigned long long d_ncopied_items;
gr::msg_queue::sptr d_queue;

View File

@ -131,7 +131,7 @@ void gps_l1_ca_code_gen_float(float* _dest, int32_t _prn, uint32_t _chip_shift)
void gps_l1_ca_code_gen_complex(std::complex<float>* _dest, int32_t _prn, uint32_t _chip_shift)
{
const uint32_t _code_length = 1023;
int32_t ca_code_int[_code_length];
int32_t ca_code_int[_code_length] = {0};
gps_l1_ca_code_gen_int(ca_code_int, _prn, _chip_shift);

View File

@ -16,60 +16,59 @@
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
#
add_definitions( -DGNSS_SDR_VERSION="${VERSION}" )
add_definitions(-DGNSS_SDR_VERSION="${VERSION}")
set(RTKLIB_LIB_SOURCES
rtklib_rtkcmn.cc
rtklib_ephemeris.cc
rtklib_preceph.cc
rtklib_sbas.cc
rtklib_ionex.cc
rtklib_pntpos.cc
rtklib_ppp.cc
rtklib_tides.cc
rtklib_lambda.cc
rtklib_rtkpos.cc
rtklib_conversions.cc
rtklib_stream.cc
rtklib_rtksvr.cc
rtklib_solution.cc
rtklib_rtcm.cc
rtklib_rtcm2.cc
rtklib_rtcm3.cc
rtklib_rtkcmn.cc
rtklib_ephemeris.cc
rtklib_preceph.cc
rtklib_sbas.cc
rtklib_ionex.cc
rtklib_pntpos.cc
rtklib_ppp.cc
rtklib_tides.cc
rtklib_lambda.cc
rtklib_rtkpos.cc
rtklib_conversions.cc
rtklib_stream.cc
rtklib_rtksvr.cc
rtklib_solution.cc
rtklib_rtcm.cc
rtklib_rtcm2.cc
rtklib_rtcm3.cc
)
set(RTKLIB_LIB_HEADERS
rtklib_rtkcmn.h
rtklib_ephemeris.h
rtklib_preceph.h
rtklib_sbas.h
rtklib_ionex.h
rtklib_pntpos.h
rtklib_ppp.h
rtklib_tides.h
rtklib_lambda.h
rtklib_rtkpos.h
rtklib_conversions.h
rtklib_stream.h
rtklib_rtksvr.h
rtklib_solution.h
rtklib_rtcm.h
rtklib_rtcm2.h
rtklib_rtcm3.h
rtklib.h
rtklib_rtkcmn.h
rtklib_ephemeris.h
rtklib_preceph.h
rtklib_sbas.h
rtklib_ionex.h
rtklib_pntpos.h
rtklib_ppp.h
rtklib_tides.h
rtklib_lambda.h
rtklib_rtkpos.h
rtklib_conversions.h
rtklib_stream.h
rtklib_rtksvr.h
rtklib_solution.h
rtklib_rtcm.h
rtklib_rtcm2.h
rtklib_rtcm3.h
rtklib.h
)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${Boost_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${GLOG_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${Boost_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${GLOG_INCLUDE_DIRS}
)
list(SORT RTKLIB_LIB_HEADERS)
list(SORT RTKLIB_LIB_SOURCES)
@ -79,7 +78,7 @@ add_dependencies(rtklib_lib glog-${glog_RELEASE})
if(OS_IS_MACOSX)
set(MAC_LIBRARIES "-framework Accelerate")
endif(OS_IS_MACOSX)
endif()
target_link_libraries(
rtklib_lib

View File

@ -302,44 +302,48 @@ alm_t alm_to_rtklib(const Gps_Almanac& gps_alm)
rtklib_alm.svh = gps_alm.i_SV_health;
rtklib_alm.svconf = gps_alm.i_AS_status;
rtklib_alm.week = gps_alm.i_WNa;
rtklib_alm.toa = gpst2time(gps_alm.i_WNa, gps_alm.i_Toa);
gtime_t toa;
toa.time = gps_alm.i_Toa;
rtklib_alm.toa = toa;
rtklib_alm.A = gps_alm.d_sqrt_A * gps_alm.d_sqrt_A;
rtklib_alm.e = gps_alm.d_e_eccentricity;
rtklib_alm.i0 = gps_alm.d_Delta_i + 0.3;
rtklib_alm.OMG0 = gps_alm.d_OMEGA0;
rtklib_alm.OMGd = gps_alm.d_OMEGA_DOT;
rtklib_alm.omg = gps_alm.d_OMEGA;
rtklib_alm.M0 = gps_alm.d_M_0;
rtklib_alm.i0 = (gps_alm.d_Delta_i + 0.3) * PI;
rtklib_alm.OMG0 = gps_alm.d_OMEGA0 * PI;
rtklib_alm.OMGd = gps_alm.d_OMEGA_DOT * PI;
rtklib_alm.omg = gps_alm.d_OMEGA * PI;
rtklib_alm.M0 = gps_alm.d_M_0 * PI;
rtklib_alm.f0 = gps_alm.d_A_f0;
rtklib_alm.f1 = gps_alm.d_A_f1;
rtklib_alm.toas = gps_alm.i_Toa;
return rtklib_alm;
}
alm_t alm_to_rtklib(const Galileo_Almanac& gal_alm)
{
alm_t rtklib_alm;
rtklib_alm = {0, 0, 0, 0, {0, 0}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
rtklib_alm.sat = gal_alm.i_satellite_PRN;
rtklib_alm.sat = gal_alm.i_satellite_PRN + NSATGPS + NSATGLO;
rtklib_alm.svh = gal_alm.E1B_HS;
rtklib_alm.svconf = gal_alm.E1B_HS;
rtklib_alm.week = gal_alm.i_WNa;
rtklib_alm.toa = gpst2time(gal_alm.i_WNa, gal_alm.i_Toa);
gtime_t toa;
toa.time = gal_alm.i_Toa;
rtklib_alm.toa = toa;
rtklib_alm.A = 5440.588203494 + gal_alm.d_Delta_sqrt_A;
rtklib_alm.A = rtklib_alm.A * rtklib_alm.A;
rtklib_alm.e = gal_alm.d_e_eccentricity;
rtklib_alm.i0 = gal_alm.d_Delta_i + 0.31111;
rtklib_alm.OMG0 = gal_alm.d_OMEGA0;
rtklib_alm.OMGd = gal_alm.d_OMEGA_DOT;
rtklib_alm.omg = gal_alm.d_OMEGA;
rtklib_alm.M0 = gal_alm.d_M_0;
rtklib_alm.i0 = (gal_alm.d_Delta_i + 56.0 / 180.0) * PI;
rtklib_alm.OMG0 = gal_alm.d_OMEGA0 * PI;
rtklib_alm.OMGd = gal_alm.d_OMEGA_DOT * PI;
rtklib_alm.omg = gal_alm.d_OMEGA * PI;
rtklib_alm.M0 = gal_alm.d_M_0 * PI;
rtklib_alm.f0 = gal_alm.d_A_f0;
rtklib_alm.f1 = gal_alm.d_A_f1;
rtklib_alm.toas = gal_alm.i_Toa;
return rtklib_alm;
}

View File

@ -44,37 +44,37 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
# retrieve the compiler's version from it
string(REGEX MATCH "clang version [0-9.]+" CLANG_OTHER_VERSION ${_err})
string(REGEX MATCH "[0-9.]+" CLANG_VERSION ${CLANG_OTHER_VERSION})
else("${IS_APPLE}" STREQUAL "")
else()
set(MIN_VERSION ${GNSSSDR_APPLECLANG_MIN_VERSION})
set(APPLE_STR "Apple ")
# retrieve the compiler's version from it
string(REGEX MATCH "(clang-[0-9.]+)" CLANG_APPLE_VERSION ${_err})
string(REGEX MATCH "[0-9.]+" CLANG_VERSION ${CLANG_APPLE_VERSION})
endif("${IS_APPLE}" STREQUAL "")
endif()
if(${CLANG_VERSION} VERSION_LESS "${MIN_VERSION}")
message(WARNING "\nThe compiler selected to build VOLK-GNSSSDR (${APPLE_STR}Clang version ${CLANG_VERSION} : ${CMAKE_CXX_COMPILER}) is older than that officially supported (${MIN_VERSION} minimum). This build may or not work. We highly recommend using Apple Clang version ${APPLECLANG_MIN_VERSION} or more recent, or Clang version ${CLANG_MIN_VERSION} or more recent.")
endif(${CLANG_VERSION} VERSION_LESS "${MIN_VERSION}")
else(${_res} STREQUAL "0")
endif()
else()
message(WARNING "\nCannot determine the version of the compiler selected to build VOLK-GNSSSDR (${APPLE_STR}Clang : ${CMAKE_CXX_COMPILER}). This build may or not work. We highly recommend using Apple Clang version ${APPLECLANG_MIN_VERSION} or more recent, or Clang version ${CLANG_MIN_VERSION} or more recent.")
endif(${_res} STREQUAL "0")
endif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
endif()
endif()
# Enable C++17 support in GCC >= 8.0.0
# Enable C++14 support in 8.0.0 > GCC >= 6.1.1
# Fallback to C++11 when using GCC < 6.1.1
if(CMAKE_COMPILER_IS_GNUCXX AND NOT WIN32)
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32)
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.1.1")
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -std=c++11")
else(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.1.1")
else()
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "8.0.0")
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -std=c++14")
else(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "8.0.0")
else()
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -std=c++17")
endif(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "8.0.0")
endif(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.1.1")
endif()
endif()
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -Wall -Wextra") #Add warning flags: For "-Wall" see http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
endif(CMAKE_COMPILER_IS_GNUCXX AND NOT WIN32)
endif()
# Enable C++17 support in Clang >= 6.0.0
# Enable C++14 support in 6.0.0 > Clang >= 3.5.0 or AppleClang >= 600
@ -84,28 +84,28 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
# See https://trac.macports.org/wiki/XcodeVersionInfo for Apple Clang version equivalences
if(CLANG_VERSION VERSION_LESS "600")
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -std=c++11")
else(CLANG_VERSION VERSION_LESS "600")
else()
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -std=c++14")
endif(CLANG_VERSION VERSION_LESS "600")
else(CMAKE_SYSTEM_NAME MATCHES "Darwin")
endif()
else()
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.5.0")
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -std=c++11")
else(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.5.0")
else()
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.0.0")
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -std=c++14")
else(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.0.0")
else()
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -std=c++17")
endif(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.0.0")
endif(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.5.0")
endif(CMAKE_SYSTEM_NAME MATCHES "Darwin")
endif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
endif()
endif()
endif()
endif()
if(NOT (CMAKE_COMPILER_IS_GNUCXX AND NOT WIN32) AND NOT (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
if(NOT ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32) AND NOT (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
if(NOT (CMAKE_VERSION VERSION_LESS "3.1"))
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 11)
endif(NOT (CMAKE_VERSION VERSION_LESS "3.1"))
endif(NOT (CMAKE_COMPILER_IS_GNUCXX AND NOT WIN32) AND NOT (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
endif()
endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MY_CXX_FLAGS} -Wall")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
@ -113,9 +113,9 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
if(CMAKE_VERSION VERSION_GREATER "3.0")
cmake_policy(SET CMP0042 NEW)
if(CMAKE_VERSION VERSION_GREATER "3.9")
cmake_policy(SET CMP0068 NEW)
endif(CMAKE_VERSION VERSION_GREATER "3.9")
endif(CMAKE_VERSION VERSION_GREATER "3.0")
cmake_policy(SET CMP0068 NEW)
endif()
endif()
option(ENABLE_STRIP "Create a stripped volk_gnsssdr_profile binary (without shared libraries)" OFF)
@ -129,7 +129,7 @@ if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release")
message(STATUS "Build type not specified: defaulting to release.")
endif()
VOLK_CHECK_BUILD_TYPE(${CMAKE_BUILD_TYPE})
volk_check_build_type(${CMAKE_BUILD_TYPE})
set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "")
message(STATUS "Build type set to ${CMAKE_BUILD_TYPE}.")
@ -144,14 +144,14 @@ include(VolkVersion) #setup version info
########################################################################
# Environment setup
########################################################################
IF(NOT DEFINED BOOST_ROOT AND NOT DEFINED ENV{BOOST_ROOT})
SET(BOOST_ROOT ${CMAKE_INSTALL_PREFIX})
ENDIF()
if(NOT DEFINED BOOST_ROOT AND NOT DEFINED ENV{BOOST_ROOT})
set(BOOST_ROOT ${CMAKE_INSTALL_PREFIX})
endif()
IF(NOT DEFINED CROSSCOMPILE_MULTILIB)
SET(CROSSCOMPILE_MULTILIB "")
ENDIF()
SET(CROSSCOMPILE_MULTILIB ${CROSSCOMPILE_MULTILIB} CACHE STRING "Define \"true\" if you have and want to use multiple C development libs installed for cross compile")
if(NOT DEFINED CROSSCOMPILE_MULTILIB)
set(CROSSCOMPILE_MULTILIB "")
endif()
set(CROSSCOMPILE_MULTILIB ${CROSSCOMPILE_MULTILIB} CACHE STRING "Define \"true\" if you have and want to use multiple C development libs installed for cross compile")
if(MSVC)
add_definitions(-D_USE_MATH_DEFINES) #enables math constants on all supported versions of MSVC
@ -160,16 +160,16 @@ if(MSVC)
add_compile_options(/wd4752)
add_compile_options(/wo4273)
add_compile_options(/wo4838)
endif(MSVC)
endif()
# allow 'large' files in 32 bit builds
if(UNIX)
add_definitions( -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64
-D_LARGE_FILES
-D_FORTIFY_SOURCE=2
)
endif(UNIX)
add_definitions(-D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64
-D_LARGE_FILES
-D_FORTIFY_SOURCE=2
)
endif()
########################################################################
@ -178,9 +178,9 @@ endif(UNIX)
# Python
include(VolkPython) #sets PYTHON_EXECUTABLE and PYTHON_DASH_B
VOLK_PYTHON_CHECK_MODULE("python >= 2.7" sys "sys.version.split()[0] >= '2.7'" PYTHON_MIN_VER_FOUND)
VOLK_PYTHON_CHECK_MODULE("mako >= 0.4.2" mako "mako.__version__ >= '0.4.2'" MAKO_FOUND)
VOLK_PYTHON_CHECK_MODULE("six - python 2 and 3 compatibility library" six "True" SIX_FOUND)
volk_python_check_module("python >= 2.7" sys "sys.version.split()[0] >= '2.7'" PYTHON_MIN_VER_FOUND)
volk_python_check_module("mako >= 0.4.2" mako "mako.__version__ >= '0.4.2'" MAKO_FOUND)
volk_python_check_module("six - python 2 and 3 compatibility library" six "True" SIX_FOUND)
if(NOT PYTHON_MIN_VER_FOUND)
@ -199,16 +199,16 @@ endif()
# Boost
if(MSVC)
if (NOT DEFINED BOOST_ALL_DYN_LINK)
if(NOT DEFINED BOOST_ALL_DYN_LINK)
set(BOOST_ALL_DYN_LINK TRUE)
endif()
set(BOOST_ALL_DYN_LINK "${BOOST_ALL_DYN_LINK}" CACHE BOOL "boost enable dynamic linking")
if(BOOST_ALL_DYN_LINK)
add_definitions(-DBOOST_ALL_DYN_LINK) #setup boost auto-linking in msvc
else(BOOST_ALL_DYN_LINK)
else()
unset(BOOST_REQUIRED_COMPONENTS) #empty components list for static link
endif(BOOST_ALL_DYN_LINK)
endif(MSVC)
endif()
endif()
include(VolkBoost)
@ -220,9 +220,9 @@ endif()
option(ENABLE_ORC "Enable Orc" True)
if(ENABLE_ORC)
find_package(ORC)
else(ENABLE_ORC)
else()
message(STATUS "Disabling use of ORC")
endif(ENABLE_ORC)
endif()
########################################################################
@ -240,7 +240,7 @@ if(DOXYGEN_FOUND)
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
COMMENT "Generating documentation with Doxygen" VERBATIM
)
endif(DOXYGEN_FOUND)
endif()
########################################################################
@ -255,7 +255,8 @@ set(includedir "\${prefix}/include")
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/volk_gnsssdr.pc.in
${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr.pc
@ONLY)
@ONLY
)
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr.pc
@ -304,17 +305,17 @@ if(APPLE)
set(CMAKE_INSTALL_NAME_DIR
${CMAKE_INSTALL_PREFIX}/${VOLK_LIBRARY_DIR} CACHE
PATH "Library Install Name Destination Directory" FORCE)
endif(NOT CMAKE_INSTALL_NAME_DIR)
endif()
if(NOT CMAKE_INSTALL_RPATH)
set(CMAKE_INSTALL_RPATH
${CMAKE_INSTALL_PREFIX}/${VOLK_LIBRARY_DIR} CACHE
PATH "Library Install RPath" FORCE)
endif(NOT CMAKE_INSTALL_RPATH)
endif()
if(NOT CMAKE_BUILD_WITH_INSTALL_RPATH)
set(CMAKE_BUILD_WITH_INSTALL_RPATH ON CACHE
BOOL "Do Build Using Library Install RPath" FORCE)
endif(NOT CMAKE_BUILD_WITH_INSTALL_RPATH)
endif(APPLE)
endif()
endif()
########################################################################
@ -358,7 +359,7 @@ configure_file(
if(NOT CMAKE_MODULES_DIR)
set(CMAKE_MODULES_DIR lib${LIB_SUFFIX}/cmake)
endif(NOT CMAKE_MODULES_DIR)
endif()
install(
FILES
@ -371,7 +372,7 @@ install(
########################################################################
# Option to enable QA testing, on by default
########################################################################
OPTION(ENABLE_TESTING "Enable QA testing" ON)
option(ENABLE_TESTING "Enable QA testing" ON)
if(ENABLE_TESTING)
message(STATUS "QA Testing is enabled.")
else()
@ -383,7 +384,7 @@ message(STATUS " Modify using: -DENABLE_TESTING=ON/OFF")
########################################################################
# Option to enable post-build profiling using volk_profile, off by default
########################################################################
OPTION(ENABLE_PROFILING "Launch system profiler after build" OFF)
option(ENABLE_PROFILING "Launch system profiler after build" OFF)
if(ENABLE_PROFILING)
set(ENABLE_STATIC_LIBS ON)
if(DEFINED VOLK_CONFIGPATH)

View File

@ -22,7 +22,7 @@
########################################################################
if(MSVC)
include_directories(${PROJECT_SOURCE_DIR}/cmake/msvc)
endif(MSVC)
endif()
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
@ -37,26 +37,26 @@ include_directories(
set(Clang_required_link "")
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(Clang_required_link "c++")
endif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(Clang_required_link "c++")
endif()
endif()
if(ORC_FOUND)
set(orc_lib ${ORC_LIBRARIES})
elseif(ORC_FOUND)
else()
set(orc_lib "")
endif(ORC_FOUND)
endif()
# allow 'large' files in 32 bit builds
if(UNIX)
add_definitions( -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64
-D_LARGE_FILES
)
endif(UNIX)
add_definitions(-D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64
-D_LARGE_FILES
)
endif()
# MAKE volk_gnsssdr_profile
@ -68,18 +68,18 @@ add_executable(volk_gnsssdr_profile
if(ENABLE_STATIC_LIBS)
target_link_libraries(volk_gnsssdr_profile volk_gnsssdr_static ${Boost_LIBRARIES} ${Clang_required_link} ${orc_lib})
else(ENABLE_STATIC_LIBS)
else()
target_link_libraries(volk_gnsssdr_profile volk_gnsssdr ${Boost_LIBRARIES} ${Clang_required_link} ${orc_lib})
add_dependencies(volk_gnsssdr_profile volk_gnsssdr)
endif(ENABLE_STATIC_LIBS)
endif()
if(ENABLE_STRIP)
if(CMAKE_COMPILER_IS_GNUCXX AND NOT WIN32)
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32)
set_target_properties(volk_gnsssdr_profile
PROPERTIES LINK_FLAGS "-s")
endif(CMAKE_COMPILER_IS_GNUCXX AND NOT WIN32)
endif(ENABLE_STRIP)
PROPERTIES LINK_FLAGS "-s")
endif()
endif()
install(
@ -92,18 +92,18 @@ install(
# MAKE volk_gnsssdr-config-info
add_executable(volk_gnsssdr-config-info volk_gnsssdr-config-info.cc ${CMAKE_CURRENT_SOURCE_DIR}/volk_gnsssdr_option_helpers.cc)
if(ENABLE_STATIC_LIBS)
target_link_libraries(volk_gnsssdr-config-info volk_gnsssdr_static ${Clang_required_link} ${orc_lib})
else(ENABLE_STATIC_LIBS)
target_link_libraries(volk_gnsssdr-config-info volk_gnsssdr ${Clang_required_link} ${orc_lib})
add_dependencies(volk_gnsssdr-config-info volk_gnsssdr)
endif(ENABLE_STATIC_LIBS)
target_link_libraries(volk_gnsssdr-config-info volk_gnsssdr_static ${Clang_required_link} ${orc_lib})
else()
target_link_libraries(volk_gnsssdr-config-info volk_gnsssdr ${Clang_required_link} ${orc_lib})
add_dependencies(volk_gnsssdr-config-info volk_gnsssdr)
endif()
if(ENABLE_STRIP)
if(CMAKE_COMPILER_IS_GNUCXX AND NOT WIN32)
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32)
set_target_properties(volk_gnsssdr-config-info
PROPERTIES LINK_FLAGS "-s")
endif(CMAKE_COMPILER_IS_GNUCXX AND NOT WIN32)
endif(ENABLE_STRIP)
PROPERTIES LINK_FLAGS "-s")
endif()
endif()
install(
TARGETS volk_gnsssdr-config-info
@ -114,17 +114,14 @@ install(
# Launch volk_gnsssdr_profile if requested to do so
if(ENABLE_PROFILING)
if(DEFINED VOLK_CONFIGPATH)
if(DEFINED VOLK_CONFIGPATH)
set( VOLK_CONFIG_ARG "-p${VOLK_CONFIGPATH}" )
set( VOLK_CONFIG "${VOLK_CONFIGPATH}/volk_gnsssdr_config" )
endif()
add_custom_command(OUTPUT ${VOLK_CONFIG}
endif()
add_custom_command(OUTPUT ${VOLK_CONFIG}
COMMAND volk_gnsssdr_profile "${VOLK_CONFIG_ARG}"
DEPENDS volk_gnsssdr_profile
COMMENT "Launching profiler, this may take a few minutes..."
)
add_custom_target(volk-gnsssdr-profile-run ALL DEPENDS ${VOLK_CONFIG})
endif()

View File

@ -16,52 +16,56 @@
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
FIND_PACKAGE(PkgConfig)
PKG_CHECK_MODULES(PC_ORC "orc-0.4 > 0.4.22")
find_package(PkgConfig)
pkg_check_modules(PC_ORC "orc-0.4 > 0.4.22")
FIND_PROGRAM(ORCC_EXECUTABLE orcc
HINTS ${PC_ORC_TOOLSDIR}
PATHS ${ORC_ROOT}/bin ${CMAKE_INSTALL_PREFIX}/bin)
find_program(ORCC_EXECUTABLE orcc
HINTS ${PC_ORC_TOOLSDIR}
PATHS ${ORC_ROOT}/bin ${CMAKE_INSTALL_PREFIX}/bin
)
FIND_PATH(ORC_INCLUDE_DIR NAMES orc/orc.h
HINTS ${PC_ORC_INCLUDEDIR}
PATHS ${ORC_ROOT}/include/orc-0.4 ${CMAKE_INSTALL_PREFIX}/include/orc-0.4)
FIND_PATH(ORC_LIBRARY_DIR NAMES ${CMAKE_SHARED_LIBRARY_PREFIX}orc-0.4${CMAKE_SHARED_LIBRARY_SUFFIX}
HINTS ${PC_ORC_LIBDIR}
/usr/local/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/i386-linux-gnu
/usr/lib/arm-linux-gnueabihf
/usr/lib/arm-linux-gnueabi
/usr/lib/aarch64-linux-gnu
/usr/lib/mipsel-linux-gnu
/usr/lib/mips-linux-gnu
/usr/lib/mips64el-linux-gnuabi64
/usr/lib/powerpc-linux-gnu
/usr/lib/powerpc64-linux-gnu
/usr/lib/powerpc64le-linux-gnu
/usr/lib/hppa-linux-gnu
/usr/lib/s390x-linux-gnu
/usr/lib64
/usr/lib
PATHS ${ORC_ROOT}/lib${LIB_SUFFIX} ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX})
FIND_LIBRARY(ORC_LIB orc-0.4
HINTS ${PC_ORC_LIBRARY_DIRS}
PATHS ${ORC_ROOT}/lib${LIB_SUFFIX} ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX})
LIST(APPEND ORC_LIBRARY
${ORC_LIB}
find_path(ORC_INCLUDE_DIR NAMES orc/orc.h
HINTS ${PC_ORC_INCLUDEDIR}
PATHS ${ORC_ROOT}/include/orc-0.4 ${CMAKE_INSTALL_PREFIX}/include/orc-0.4
)
SET(ORC_INCLUDE_DIRS ${ORC_INCLUDE_DIR})
SET(ORC_LIBRARIES ${ORC_LIBRARY})
SET(ORC_LIBRARY_DIRS ${ORC_LIBRARY_DIR})
find_path(ORC_LIBRARY_DIR
NAMES ${CMAKE_SHARED_LIBRARY_PREFIX}orc-0.4${CMAKE_SHARED_LIBRARY_SUFFIX}
HINTS ${PC_ORC_LIBDIR}
/usr/local/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/i386-linux-gnu
/usr/lib/arm-linux-gnueabihf
/usr/lib/arm-linux-gnueabi
/usr/lib/aarch64-linux-gnu
/usr/lib/mipsel-linux-gnu
/usr/lib/mips-linux-gnu
/usr/lib/mips64el-linux-gnuabi64
/usr/lib/powerpc-linux-gnu
/usr/lib/powerpc64-linux-gnu
/usr/lib/powerpc64le-linux-gnu
/usr/lib/hppa-linux-gnu
/usr/lib/s390x-linux-gnu
/usr/lib64
/usr/lib
PATHS ${ORC_ROOT}/lib${LIB_SUFFIX} ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}
)
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ORC "orc files" ORC_LIBRARY ORC_INCLUDE_DIR ORCC_EXECUTABLE)
find_library(ORC_LIB orc-0.4
HINTS ${PC_ORC_LIBRARY_DIRS}
PATHS ${ORC_ROOT}/lib${LIB_SUFFIX} ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX})
list(APPEND ORC_LIBRARY
${ORC_LIB}
)
set(ORC_INCLUDE_DIRS ${ORC_INCLUDE_DIR})
set(ORC_LIBRARIES ${ORC_LIBRARY})
set(ORC_LIBRARY_DIRS ${ORC_LIBRARY_DIR})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(ORC "orc files" ORC_LIBRARY ORC_INCLUDE_DIR ORCC_EXECUTABLE)
mark_as_advanced(ORC_INCLUDE_DIR ORC_LIBRARY ORCC_EXECUTABLE)

View File

@ -30,7 +30,7 @@ set(__INCLUDED_VOLK_ADD_TEST TRUE)
function(VOLK_GEN_TEST executable_name)
include(CMakeParseArgumentsCopy)
CMAKE_PARSE_ARGUMENTS(VOLK_TEST "" "" "SOURCES;TARGET_DEPS;EXTRA_LIB_DIRS;ENVIRONS;ARGS" ${ARGN})
cmake_parse_arguments(VOLK_TEST "" "" "SOURCES;TARGET_DEPS;EXTRA_LIB_DIRS;ENVIRONS;ARGS" ${ARGN})
add_executable(${executable_name} ${VOLK_TEST_SOURCES})
target_link_libraries(${executable_name} ${VOLK_TEST_TARGET_DEPS})
endfunction()
@ -53,7 +53,7 @@ function(VOLK_ADD_TEST test_name executable_name)
#parse the arguments for component names
include(CMakeParseArgumentsCopy)
CMAKE_PARSE_ARGUMENTS(VOLK_TEST "" "" "TARGET_DEPS;EXTRA_LIB_DIRS;ENVIRONS;ARGS" ${ARGN})
cmake_parse_arguments(VOLK_TEST "" "" "TARGET_DEPS;EXTRA_LIB_DIRS;ENVIRONS;ARGS" ${ARGN})
#set the initial environs to use
set(environs ${VOLK_TEST_ENVIRONS})
@ -146,7 +146,7 @@ function(VOLK_ADD_TEST test_name executable_name)
#each line sets an environment variable
foreach(environ ${environs})
file(APPEND ${sh_file} "export ${environ}\n")
endforeach(environ)
endforeach()
set(VOLK_TEST_ARGS "${test_name}")
@ -166,7 +166,7 @@ function(VOLK_ADD_TEST test_name executable_name)
COMMAND ${SHELL} ${sh_file} ${TARGET_DIR_LIST}
)
endif(UNIX)
endif()
if(WIN32)
#In the land of windows, all libraries must be in the PATH. Since
@ -199,7 +199,7 @@ function(VOLK_ADD_TEST test_name executable_name)
#each line sets an environment variable
foreach(environ ${environs})
file(APPEND ${bat_file} "SET ${environ}\n")
endforeach(environ)
endforeach()
set(VOLK_TEST_ARGS "${test_name}")
@ -213,7 +213,7 @@ function(VOLK_ADD_TEST test_name executable_name)
add_test(NAME qa_${test_name}
COMMAND ${bat_file} ${TARGET_DIR_LIST}
)
endif(WIN32)
endif()
endfunction(VOLK_ADD_TEST)
endfunction()

View File

@ -31,21 +31,21 @@ set(BOOST_REQUIRED_COMPONENTS
if(UNIX AND NOT BOOST_ROOT AND EXISTS "/usr/lib64")
list(APPEND BOOST_LIBRARYDIR "/usr/lib64") #fedora 64-bit fix
endif(UNIX AND NOT BOOST_ROOT AND EXISTS "/usr/lib64")
endif()
if(MSVC)
set(BOOST_REQUIRED_COMPONENTS ${BOOST_REQUIRED_COMPONENTS} chrono)
if (NOT DEFINED BOOST_ALL_DYN_LINK)
if(NOT DEFINED BOOST_ALL_DYN_LINK)
set(BOOST_ALL_DYN_LINK TRUE)
endif()
set(BOOST_ALL_DYN_LINK "${BOOST_ALL_DYN_LINK}" CACHE BOOL "boost enable dynamic linking")
if(BOOST_ALL_DYN_LINK)
add_definitions(-DBOOST_ALL_DYN_LINK) #setup boost auto-linking in msvc
else(BOOST_ALL_DYN_LINK)
else()
unset(BOOST_REQUIRED_COMPONENTS) #empty components list for static link
endif(BOOST_ALL_DYN_LINK)
endif(MSVC)
endif()
endif()
find_package(Boost "1.35" COMPONENTS ${BOOST_REQUIRED_COMPONENTS})
@ -68,10 +68,10 @@ set(Boost_ADDITIONAL_VERSIONS
# Boost 1.52 disabled, see https://svn.boost.org/trac/boost/ticket/7669
# Similar problems with Boost 1.46 and 1.47.
OPTION(ENABLE_BAD_BOOST "Enable known bad versions of Boost" OFF)
option(ENABLE_BAD_BOOST "Enable known bad versions of Boost" OFF)
if(ENABLE_BAD_BOOST)
MESSAGE(STATUS "Enabling use of known bad versions of Boost.")
endif(ENABLE_BAD_BOOST)
message(STATUS "Enabling use of known bad versions of Boost.")
endif()
# For any unsuitable Boost version, add the version number below in
# the following format: XXYYZZ
@ -80,17 +80,17 @@ endif(ENABLE_BAD_BOOST)
# YY is the minor version number ('46' for 1.46)
# ZZ is the patcher version number (typically just '00')
set(Boost_NOGO_VERSIONS
104600 104601 104700 105200
)
104600 104601 104700 105200
)
foreach(ver ${Boost_NOGO_VERSIONS})
if("${Boost_VERSION}" STREQUAL "${ver}")
if(NOT ENABLE_BAD_BOOST)
MESSAGE(STATUS "WARNING: Found a known bad version of Boost (v${Boost_VERSION}). Disabling.")
set(Boost_FOUND FALSE)
else(NOT ENABLE_BAD_BOOST)
MESSAGE(STATUS "WARNING: Found a known bad version of Boost (v${Boost_VERSION}). Continuing anyway.")
set(Boost_FOUND TRUE)
endif(NOT ENABLE_BAD_BOOST)
endif("${Boost_VERSION}" STREQUAL "${ver}")
endforeach(ver)
if("${Boost_VERSION}" STREQUAL "${ver}")
if(NOT ENABLE_BAD_BOOST)
message(STATUS "WARNING: Found a known bad version of Boost (v${Boost_VERSION}). Disabling.")
set(Boost_FOUND FALSE)
else()
message(STATUS "WARNING: Found a known bad version of Boost (v${Boost_VERSION}). Continuing anyway.")
set(Boost_FOUND TRUE)
endif()
endif()
endforeach()

View File

@ -53,16 +53,16 @@ list(APPEND AVAIL_BUILDTYPES
# the avialable build types.
########################################################################
function(VOLK_CHECK_BUILD_TYPE settype)
STRING(TOUPPER ${settype} _settype)
string(TOUPPER ${settype} _settype)
foreach(btype ${AVAIL_BUILDTYPES})
STRING(TOUPPER ${btype} _btype)
string(TOUPPER ${btype} _btype)
if(${_settype} STREQUAL ${_btype})
return() # found it; exit cleanly
endif(${_settype} STREQUAL ${_btype})
endforeach(btype)
endif()
endforeach()
# Build type not found; error out
message(FATAL_ERROR "Build type '${settype}' not valid, must be one of: ${AVAIL_BUILDTYPES}")
endfunction(VOLK_CHECK_BUILD_TYPE)
endfunction()
########################################################################
# For GCC and Clang, we can set a build type:
@ -74,23 +74,23 @@ endfunction(VOLK_CHECK_BUILD_TYPE)
# NOTE: This is not defined on Windows systems.
########################################################################
if(NOT WIN32)
SET(CMAKE_CXX_FLAGS_DEBUGPARANOID "-Wall -Wextra -g -O0" CACHE STRING
set(CMAKE_CXX_FLAGS_DEBUGPARANOID "-Wall -Wextra -g -O0" CACHE STRING
"Flags used by the C++ compiler during DebugParanoid builds." FORCE)
SET(CMAKE_C_FLAGS_DEBUGPARANOID "-Wall -Wextra -g -O0" CACHE STRING
set(CMAKE_C_FLAGS_DEBUGPARANOID "-Wall -Wextra -g -O0" CACHE STRING
"Flags used by the C compiler during DebugParanoid builds." FORCE)
SET(CMAKE_EXE_LINKER_FLAGS_DEBUGPARANOID
set(CMAKE_EXE_LINKER_FLAGS_DEBUGPARANOID
"-Wl,--warn-unresolved-symbols,--warn-once" CACHE STRING
"Flags used for linking binaries during NoOptWithASM builds." FORCE)
SET(CMAKE_SHARED_LINKER_FLAGS_DEBUGPARANOID
set(CMAKE_SHARED_LINKER_FLAGS_DEBUGPARANOID
"-Wl,--warn-unresolved-symbols,--warn-once" CACHE STRING
"Flags used by the shared lib linker during NoOptWithASM builds." FORCE)
MARK_AS_ADVANCED(
mark_as_advanced(
CMAKE_CXX_FLAGS_DEBUGPARANOID
CMAKE_C_FLAGS_DEBUGPARANOID
CMAKE_EXE_LINKER_FLAGS_DEBUGPARANOID
CMAKE_SHARED_LINKER_DEBUGPARANOID)
endif(NOT WIN32)
endif()
########################################################################
@ -105,23 +105,23 @@ endif(NOT WIN32)
# NOTE: This is not defined on Windows systems.
########################################################################
if(NOT WIN32)
SET(CMAKE_CXX_FLAGS_NOOPTWITHASM "-save-temps -g -O0" CACHE STRING
set(CMAKE_CXX_FLAGS_NOOPTWITHASM "-save-temps -g -O0" CACHE STRING
"Flags used by the C++ compiler during NoOptWithASM builds." FORCE)
SET(CMAKE_C_FLAGS_NOOPTWITHASM "-save-temps -g -O0" CACHE STRING
set(CMAKE_C_FLAGS_NOOPTWITHASM "-save-temps -g -O0" CACHE STRING
"Flags used by the C compiler during NoOptWithASM builds." FORCE)
SET(CMAKE_EXE_LINKER_FLAGS_NOOPTWITHASM
set(CMAKE_EXE_LINKER_FLAGS_NOOPTWITHASM
"-Wl,--warn-unresolved-symbols,--warn-once" CACHE STRING
"Flags used for linking binaries during NoOptWithASM builds." FORCE)
SET(CMAKE_SHARED_LINKER_FLAGS_NOOPTWITHASM
set(CMAKE_SHARED_LINKER_FLAGS_NOOPTWITHASM
"-Wl,--warn-unresolved-symbols,--warn-once" CACHE STRING
"Flags used by the shared lib linker during NoOptWithASM builds." FORCE)
MARK_AS_ADVANCED(
mark_as_advanced(
CMAKE_CXX_FLAGS_NOOPTWITHASM
CMAKE_C_FLAGS_NOOPTWITHASM
CMAKE_EXE_LINKER_FLAGS_NOOPTWITHASM
CMAKE_SHARED_LINKER_FLAGS_NOOPTWITHASM)
endif(NOT WIN32)
endif()
########################################################################
@ -137,23 +137,23 @@ endif(NOT WIN32)
########################################################################
if(NOT WIN32)
SET(CMAKE_CXX_FLAGS_O2WITHASM "-save-temps -g -O2" CACHE STRING
set(CMAKE_CXX_FLAGS_O2WITHASM "-save-temps -g -O2" CACHE STRING
"Flags used by the C++ compiler during O2WithASM builds." FORCE)
SET(CMAKE_C_FLAGS_O2WITHASM "-save-temps -g -O2" CACHE STRING
set(CMAKE_C_FLAGS_O2WITHASM "-save-temps -g -O2" CACHE STRING
"Flags used by the C compiler during O2WithASM builds." FORCE)
SET(CMAKE_EXE_LINKER_FLAGS_O2WITHASM
set(CMAKE_EXE_LINKER_FLAGS_O2WITHASM
"-Wl,--warn-unresolved-symbols,--warn-once" CACHE STRING
"Flags used for linking binaries during O2WithASM builds." FORCE)
SET(CMAKE_SHARED_LINKER_FLAGS_O2WITHASM
set(CMAKE_SHARED_LINKER_FLAGS_O2WITHASM
"-Wl,--warn-unresolved-symbols,--warn-once" CACHE STRING
"Flags used by the shared lib linker during O2WithASM builds." FORCE)
MARK_AS_ADVANCED(
mark_as_advanced(
CMAKE_CXX_FLAGS_O2WITHASM
CMAKE_C_FLAGS_O2WITHASM
CMAKE_EXE_LINKER_FLAGS_O2WITHASM
CMAKE_SHARED_LINKER_FLAGS_O2WITHASM)
endif(NOT WIN32)
endif()
########################################################################
@ -169,23 +169,23 @@ endif(NOT WIN32)
########################################################################
if(NOT WIN32)
SET(CMAKE_CXX_FLAGS_O3WITHASM "-save-temps -g -O3" CACHE STRING
set(CMAKE_CXX_FLAGS_O3WITHASM "-save-temps -g -O3" CACHE STRING
"Flags used by the C++ compiler during O3WithASM builds." FORCE)
SET(CMAKE_C_FLAGS_O3WITHASM "-save-temps -g -O3" CACHE STRING
set(CMAKE_C_FLAGS_O3WITHASM "-save-temps -g -O3" CACHE STRING
"Flags used by the C compiler during O3WithASM builds." FORCE)
SET(CMAKE_EXE_LINKER_FLAGS_O3WITHASM
set(CMAKE_EXE_LINKER_FLAGS_O3WITHASM
"-Wl,--warn-unresolved-symbols,--warn-once" CACHE STRING
"Flags used for linking binaries during O3WithASM builds." FORCE)
SET(CMAKE_SHARED_LINKER_FLAGS_O3WITHASM
set(CMAKE_SHARED_LINKER_FLAGS_O3WITHASM
"-Wl,--warn-unresolved-symbols,--warn-once" CACHE STRING
"Flags used by the shared lib linker during O3WithASM builds." FORCE)
MARK_AS_ADVANCED(
mark_as_advanced(
CMAKE_CXX_FLAGS_O3WITHASM
CMAKE_C_FLAGS_O3WITHASM
CMAKE_EXE_LINKER_FLAGS_O3WITHASM
CMAKE_SHARED_LINKER_FLAGS_O3WITHASM)
endif(NOT WIN32)
endif()
########################################################################
# For GCC and Clang, we can set a build type:
@ -197,14 +197,14 @@ endif(NOT WIN32)
# NOTE: This is not defined on Windows systems.
########################################################################
if(NOT WIN32)
SET(CMAKE_CXX_FLAGS_ASAN "-Wall -Wextra -g -O2 -fsanitize=address -fno-omit-frame-pointer" CACHE STRING
set(CMAKE_CXX_FLAGS_ASAN "-Wall -Wextra -g -O2 -fsanitize=address -fno-omit-frame-pointer" CACHE STRING
"Flags used by the C++ compiler during Address Sanitized builds." FORCE)
SET(CMAKE_C_FLAGS_ASAN "-Wall -Wextra -g -O2 -fsanitize=address -fno-omit-frame-pointer" CACHE STRING
set(CMAKE_C_FLAGS_ASAN "-Wall -Wextra -g -O2 -fsanitize=address -fno-omit-frame-pointer" CACHE STRING
"Flags used by the C compiler during Address Sanitized builds." FORCE)
MARK_AS_ADVANCED(
mark_as_advanced(
CMAKE_CXX_FLAGS_ASAN
CMAKE_C_FLAGS_ASAN
CMAKE_EXE_LINKER_FLAGS_DEBUGPARANOID
CMAKE_SHARED_LINKER_DEBUGPARANOID)
endif(NOT WIN32)
endif()

View File

@ -15,33 +15,33 @@
# You should have received a copy of the GNU General Public License
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
INCLUDE(FindPkgConfig)
PKG_CHECK_MODULES(PC_VOLK_GNSSSDR volk_gnsssdr)
include(FindPkgConfig)
pkg_check_modules(PC_VOLK_GNSSSDR volk_gnsssdr)
FIND_PATH(
find_path(
VOLK_GNSSSDR_INCLUDE_DIRS
NAMES volk_gnsssdr/volk_gnsssdr.h
HINTS $ENV{VOLK_DIR}/include
${PC_VOLK_INCLUDEDIR}
PATHS /usr/local/include
/usr/include
/opt/local/include
"@CMAKE_INSTALL_PREFIX@/include"
/usr/include
/opt/local/include
"@CMAKE_INSTALL_PREFIX@/include"
)
FIND_LIBRARY(
find_library(
VOLK_GNSSSDR_LIBRARIES
NAMES volk_gnsssdr
HINTS $ENV{VOLK_DIR}/lib
${PC_VOLK_LIBDIR}
PATHS /usr/local/lib
/usr/local/lib64
/usr/lib
/usr/lib64
/opt/local/lib
"@CMAKE_INSTALL_PREFIX@/lib"
/usr/local/lib64
/usr/lib
/usr/lib64
/opt/local/lib
"@CMAKE_INSTALL_PREFIX@/lib"
)
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(VOLK_GNSSSDR DEFAULT_MSG VOLK_GNSSSDR_LIBRARIES VOLK_GNSSSDR_INCLUDE_DIRS)
MARK_AS_ADVANCED(VOLK_GNSSSDR_LIBRARIES VOLK_GNSSSDR_INCLUDE_DIRS)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(VOLKGNSSSDR DEFAULT_MSG VOLK_GNSSSDR_LIBRARIES VOLK_GNSSSDR_INCLUDE_DIRS)
mark_as_advanced(VOLK_GNSSSDR_LIBRARIES VOLK_GNSSSDR_INCLUDE_DIRS)

View File

@ -27,6 +27,6 @@ if(${PACKAGE_FIND_VERSION_MAJOR} EQUAL ${MAJOR_VERSION})
if(NOT ${PACKAGE_FIND_VERSION_PATCH} GREATER ${MAINT_VERSION})
set(PACKAGE_VERSION_EXACT 1) # exact match for API version
set(PACKAGE_VERSION_COMPATIBLE 1) # compat for minor/patch version
endif(NOT ${PACKAGE_FIND_VERSION_PATCH} GREATER ${MAINT_VERSION})
endif(${PACKAGE_FIND_VERSION_MINOR} EQUAL ${MINOR_VERSION})
endif(${PACKAGE_FIND_VERSION_MAJOR} EQUAL ${MAJOR_VERSION})
endif()
endif()
endif()

View File

@ -32,30 +32,30 @@ if(CMAKE_VERSION VERSION_LESS 3.12)
if(PYTHON_EXECUTABLE)
message(STATUS "User set python executable ${PYTHON_EXECUTABLE}")
find_package(PythonInterp ${VOLK_PYTHON_MIN_VERSION} REQUIRED)
else(PYTHON_EXECUTABLE)
else()
message(STATUS "PYTHON_EXECUTABLE not set - using default python2")
message(STATUS "Use -DPYTHON_EXECUTABLE=/path/to/python3 to build for python3.")
find_package(PythonInterp ${VOLK_PYTHON_MIN_VERSION})
if(NOT PYTHONINTERP_FOUND)
message(STATUS "python2 not found - using python3")
find_package(PythonInterp ${VOLK_PYTHON3_MIN_VERSION} REQUIRED)
endif(NOT PYTHONINTERP_FOUND)
endif(PYTHON_EXECUTABLE)
endif()
endif()
find_package(PythonLibs ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} EXACT)
else(CMAKE_VERSION VERSION_LESS 3.12)
else()
if(PYTHON_EXECUTABLE)
message(STATUS "User set python executable ${PYTHON_EXECUTABLE}")
find_package(PythonInterp ${VOLK_PYTHON_MIN_VERSION} REQUIRED)
else(PYTHON_EXECUTABLE)
find_package (Python COMPONENTS Interpreter)
else()
find_package(Python COMPONENTS Interpreter)
set(PYTHON_VERSION_MAJOR ${Python_VERSION_MAJOR})
set(PYTHON_EXECUTABLE ${Python_EXECUTABLE})
endif(PYTHON_EXECUTABLE)
endif(CMAKE_VERSION VERSION_LESS 3.12)
endif()
endif()
if (${PYTHON_VERSION_MAJOR} VERSION_EQUAL 3)
if(${PYTHON_VERSION_MAJOR} VERSION_EQUAL 3)
set(PYTHON3 TRUE)
endif ()
endif()
@ -79,7 +79,7 @@ macro(VOLK_PYTHON_CHECK_MODULE_RAW desc python_code have)
message(STATUS "Python checking for ${desc} - not found")
set(${have} FALSE)
endif()
endmacro(VOLK_PYTHON_CHECK_MODULE_RAW)
endmacro()
macro(VOLK_PYTHON_CHECK_MODULE desc mod cmd have)
VOLK_PYTHON_CHECK_MODULE_RAW(
@ -92,7 +92,7 @@ except (ImportError, AssertionError): exit(-1)
except: pass
#########################################"
"${have}")
endmacro(VOLK_PYTHON_CHECK_MODULE)
endmacro()
########################################################################
# Sets the python installation directory VOLK_PYTHON_DIR
@ -121,14 +121,14 @@ unique = hashlib.md5(b'${reldir}${ARGN}').hexdigest()[:5]
print(re.sub('\\W', '_', '${desc} ${reldir} ' + unique))"
OUTPUT_VARIABLE _target OUTPUT_STRIP_TRAILING_WHITESPACE)
add_custom_target(${_target} ALL DEPENDS ${ARGN})
endfunction(VOLK_UNIQUE_TARGET)
endfunction()
########################################################################
# Install python sources (also builds and installs byte-compiled python)
########################################################################
function(VOLK_PYTHON_INSTALL)
include(CMakeParseArgumentsCopy)
CMAKE_PARSE_ARGUMENTS(VOLK_PYTHON_INSTALL "" "DESTINATION;COMPONENT" "FILES;PROGRAMS" ${ARGN})
cmake_parse_arguments(VOLK_PYTHON_INSTALL "" "DESTINATION;COMPONENT" "FILES;PROGRAMS" ${ARGN})
####################################################################
if(VOLK_PYTHON_INSTALL_FILES)
@ -162,7 +162,7 @@ function(VOLK_PYTHON_INSTALL)
get_filename_component(pygen_path ${pygenfile} PATH)
file(MAKE_DIRECTORY ${pygen_path})
endforeach(pyfile)
endforeach()
#the command to generate the pyc files
add_custom_command(
@ -189,8 +189,8 @@ function(VOLK_PYTHON_INSTALL)
####################################################################
file(TO_NATIVE_PATH ${PYTHON_EXECUTABLE} pyexe_native)
if (CMAKE_CROSSCOMPILING)
set(pyexe_native "/usr/bin/env python")
if(CMAKE_CROSSCOMPILING)
set(pyexe_native "/usr/bin/env python")
endif()
foreach(pyfile ${VOLK_PYTHON_INSTALL_PROGRAMS})
@ -220,13 +220,13 @@ function(VOLK_PYTHON_INSTALL)
DESTINATION ${VOLK_PYTHON_INSTALL_DESTINATION}
COMPONENT ${VOLK_PYTHON_INSTALL_COMPONENT}
)
endforeach(pyfile)
endforeach()
endif()
VOLK_UNIQUE_TARGET("pygen" ${python_install_gen_targets})
volk_unique_target("pygen" ${python_install_gen_targets})
endfunction(VOLK_PYTHON_INSTALL)
endfunction()
########################################################################
# Write the python helper script that generates byte code files

View File

@ -22,22 +22,22 @@
# header file detection
########################################################################
include(CheckIncludeFile)
CHECK_INCLUDE_FILE(cpuid.h HAVE_CPUID_H)
check_include_file(cpuid.h HAVE_CPUID_H)
if(HAVE_CPUID_H)
add_definitions(-DHAVE_CPUID_H)
endif()
CHECK_INCLUDE_FILE(intrin.h HAVE_INTRIN_H)
check_include_file(intrin.h HAVE_INTRIN_H)
if(HAVE_INTRIN_H)
add_definitions(-DHAVE_INTRIN_H)
endif()
CHECK_INCLUDE_FILE(fenv.h HAVE_FENV_H)
check_include_file(fenv.h HAVE_FENV_H)
if(HAVE_FENV_H)
add_definitions(-DHAVE_FENV_H)
endif()
CHECK_INCLUDE_FILE(dlfcn.h HAVE_DLFCN_H)
check_include_file(dlfcn.h HAVE_DLFCN_H)
if(HAVE_DLFCN_H)
add_definitions(-DHAVE_DLFCN_H)
list(APPEND volk_gnsssdr_libraries ${CMAKE_DL_LIBS})
@ -62,7 +62,7 @@ endif()
########################################################################
if(COMPILER_NAME MATCHES "GNU")
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-Werror=unused-command-line-argument" HAVE_WERROR_UNUSED_CMD_LINE_ARG)
check_cxx_compiler_flag("-Werror=unused-command-line-argument" HAVE_WERROR_UNUSED_CMD_LINE_ARG)
if(HAVE_WERROR_UNUSED_CMD_LINE_ARG)
set(VOLK_FLAG_CHECK_FLAGS "-Werror=unused-command-line-argument")
endif()
@ -74,20 +74,20 @@ endif()
########################################################################
include(CheckSymbolExists)
CHECK_SYMBOL_EXISTS(posix_memalign stdlib.h HAVE_POSIX_MEMALIGN)
check_symbol_exists(posix_memalign stdlib.h HAVE_POSIX_MEMALIGN)
if(HAVE_POSIX_MEMALIGN)
add_definitions(-DHAVE_POSIX_MEMALIGN)
endif(HAVE_POSIX_MEMALIGN)
endif()
if(NOT DEFINED _XOPEN_SOURCE)
add_definitions(-D_XOPEN_SOURCE=700)
endif(NOT DEFINED _XOPEN_SOURCE)
endif()
########################################################################
# detect x86 flavor of CPU
########################################################################
if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "^(i.86|x86|x86_64|amd64|AMD64)$")
if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^(i.86|x86|x86_64|amd64|AMD64)$")
message(STATUS "x86* CPU detected")
set(CPU_IS_x86 TRUE)
endif()
@ -106,7 +106,7 @@ macro(check_arch arch_name)
set(flags ${ARGN})
set(have_${arch_name} TRUE)
foreach(flag ${flags})
if (MSVC AND (${flag} STREQUAL "/arch:SSE2" OR ${flag} STREQUAL "/arch:SSE" ))
if(MSVC AND (${flag} STREQUAL "/arch:SSE2" OR ${flag} STREQUAL "/arch:SSE"))
# SSE/SSE2 is supported in MSVC since VS 2005 but flag not available when compiling 64-bit so do not check
else()
include(CheckCXXCompilerFlag)
@ -119,27 +119,27 @@ macro(check_arch arch_name)
if(VOLK_FLAG_CHECK_FLAGS)
set(CMAKE_REQUIRED_FLAGS ${VOLK_FLAG_CHECK_FLAGS})
endif()
CHECK_CXX_COMPILER_FLAG(${flag} ${have_flag})
check_cxx_compiler_flag(${flag} ${have_flag})
unset(CMAKE_REQUIRED_FLAGS)
if (NOT ${have_flag})
if(NOT ${have_flag})
set(have_${arch_name} FALSE)
endif()
endif()
endforeach()
if (have_${arch_name})
if(have_${arch_name})
list(APPEND available_archs ${arch_name})
endif()
endmacro(check_arch)
endmacro()
foreach(line ${arch_flag_lines})
string(REGEX REPLACE "," ";" arch_flags ${line})
check_arch(${arch_flags})
endforeach(line)
endforeach()
macro(OVERRULE_ARCH arch reason)
message(STATUS "${reason}, Overruled arch ${arch}")
list(REMOVE_ITEM available_archs ${arch})
endmacro(OVERRULE_ARCH)
endmacro()
########################################################################
# eliminate AVX on if not on x86, or if the compiler does not accept
@ -150,25 +150,25 @@ set(HAVE_XGETBV 0)
set(HAVE_AVX_CVTPI32_PS 0)
if(CPU_IS_x86)
# check to see if the compiler/linker works with xgetb instruction
if (NOT MSVC)
if(NOT MSVC)
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/test_xgetbv.c "unsigned long long _xgetbv(unsigned int index) { unsigned int eax, edx; __asm__ __volatile__(\"xgetbv\" : \"=a\"(eax), \"=d\"(edx) : \"c\"(index)); return ((unsigned long long)edx << 32) | eax; } int main (void) { (void) _xgetbv(0); return (0); }")
else (NOT MSVC)
else()
#MSVC defines an intrinsic
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/test_xgetbv.c "#include <stdio.h> \n #include <intrin.h> \n int main() { int avxSupported = 0; \n#if (_MSC_FULL_VER >= 160040219) \nint cpuInfo[4]; __cpuid(cpuInfo, 1);\nif ((cpuInfo[2] & (1 << 27) || 0) && (cpuInfo[2] & (1 << 28) || 0)) \n{\nunsigned long long xcrFeatureMask = _xgetbv(_XCR_XFEATURE_ENABLED_MASK);\n avxSupported = (xcrFeatureMask & 0x6) == 6;}\n#endif \n return 1- avxSupported; }")
endif(NOT MSVC)
endif()
execute_process(COMMAND ${CMAKE_C_COMPILER} -o
${CMAKE_CURRENT_BINARY_DIR}/test_xgetbv
${CMAKE_CURRENT_BINARY_DIR}/test_xgetbv.c
OUTPUT_QUIET ERROR_QUIET
RESULT_VARIABLE avx_compile_result)
if(NOT ${avx_compile_result} EQUAL 0)
OVERRULE_ARCH(avx "Compiler or linker missing xgetbv instruction")
overrule_arch(avx "Compiler or linker missing xgetbv instruction")
elseif(NOT CROSSCOMPILE_MULTILIB)
execute_process(COMMAND ${CMAKE_CURRENT_BINARY_DIR}/test_xgetbv
OUTPUT_QUIET ERROR_QUIET
RESULT_VARIABLE avx_exe_result)
if(NOT ${avx_exe_result} EQUAL 0)
OVERRULE_ARCH(avx "CPU missing xgetbv")
overrule_arch(avx "CPU missing xgetbv")
else()
set(HAVE_XGETBV 1)
endif()
@ -184,7 +184,7 @@ if(CPU_IS_x86)
#########################################################################
# check to see if the compiler/linker works with cvtpi32_ps instrinsic when using AVX
if (CMAKE_SIZEOF_VOID_P EQUAL 4)
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/test_cvtpi32_ps.c "#include <immintrin.h>\nint main (void) {__m128 __a; __m64 __b; __m128 foo = _mm_cvtpi32_ps(__a, __b); return (0); }")
execute_process(COMMAND ${CMAKE_C_COMPILER} -mavx -o
${CMAKE_CURRENT_BINARY_DIR}/test_cvtpi32_ps
@ -192,13 +192,13 @@ if(CPU_IS_x86)
OUTPUT_QUIET ERROR_QUIET
RESULT_VARIABLE avx_compile_result)
if(NOT ${avx_compile_result} EQUAL 0)
OVERRULE_ARCH(avx "Compiler missing cvtpi32_ps instrinsic")
overrule_arch(avx "Compiler missing cvtpi32_ps instrinsic")
elseif(NOT CROSSCOMPILE_MULTILIB)
execute_process(COMMAND ${CMAKE_CURRENT_BINARY_DIR}/test_cvtpi32_ps
OUTPUT_QUIET ERROR_QUIET
RESULT_VARIABLE avx_exe_result)
if(NOT ${avx_exe_result} EQUAL 0)
OVERRULE_ARCH(avx "CPU missing cvtpi32_ps")
overrule_arch(avx "CPU missing cvtpi32_ps")
else()
set(HAVE_AVX_CVTPI32_PS 1)
endif()
@ -207,13 +207,13 @@ if(CPU_IS_x86)
endif()
file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/test_cvtpi32_ps
${CMAKE_CURRENT_BINARY_DIR}/test_cvtpi32_ps.c)
else(CMAKE_SIZEOF_VOID_P EQUAL 4)
# 64-bit compilations won't need this command so don't overrule AVX
set(HAVE_AVX_CVTPI32_PS 0)
endif(CMAKE_SIZEOF_VOID_P EQUAL 4)
else()
# 64-bit compilations won't need this command so don't overrule AVX
set(HAVE_AVX_CVTPI32_PS 0)
endif()
# Disable SSE4a if Clang is less than version 3.2
if("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
if("${CMAKE_C_COMPILER_ID}" MATCHES "Clang")
# Figure out the version of Clang
if(CMAKE_VERSION VERSION_LESS "2.8.10")
# Exctract the Clang version from the --version string.
@ -222,14 +222,14 @@ if(CPU_IS_x86)
execute_process(COMMAND ${CMAKE_C_COMPILER} --version
OUTPUT_VARIABLE clang_version)
string(REGEX MATCH "[0-9].[0-9]" CMAKE_C_COMPILER_VERSION ${clang_version})
endif(CMAKE_VERSION VERSION_LESS "2.8.10")
endif()
if(CMAKE_C_COMPILER_VERSION VERSION_LESS "3.2")
OVERRULE_ARCH(sse4_a "Clang >= 3.2 required for SSE4a")
endif(CMAKE_C_COMPILER_VERSION VERSION_LESS "3.2")
endif("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
overrule_arch(sse4_a "Clang >= 3.2 required for SSE4a")
endif()
endif()
endif(CPU_IS_x86)
endif()
if(${HAVE_XGETBV})
add_definitions(-DHAVE_XGETBV)
@ -244,17 +244,17 @@ endif()
########################################################################
if(NOT CPU_IS_x86)
OVERRULE_ARCH(3dnow "Architecture is not x86 or x86_64")
OVERRULE_ARCH(mmx "Architecture is not x86 or x86_64")
OVERRULE_ARCH(sse "Architecture is not x86 or x86_64")
OVERRULE_ARCH(sse2 "Architecture is not x86 or x86_64")
OVERRULE_ARCH(sse3 "Architecture is not x86 or x86_64")
OVERRULE_ARCH(ssse3 "Architecture is not x86 or x86_64")
OVERRULE_ARCH(sse4_a "Architecture is not x86 or x86_64")
OVERRULE_ARCH(sse4_1 "Architecture is not x86 or x86_64")
OVERRULE_ARCH(sse4_2 "Architecture is not x86 or x86_64")
OVERRULE_ARCH(avx "Architecture is not x86 or x86_64")
endif(NOT CPU_IS_x86)
overrule_arch(3dnow "Architecture is not x86 or x86_64")
overrule_arch(mmx "Architecture is not x86 or x86_64")
overrule_arch(sse "Architecture is not x86 or x86_64")
overrule_arch(sse2 "Architecture is not x86 or x86_64")
overrule_arch(sse3 "Architecture is not x86 or x86_64")
overrule_arch(ssse3 "Architecture is not x86 or x86_64")
overrule_arch(sse4_a "Architecture is not x86 or x86_64")
overrule_arch(sse4_1 "Architecture is not x86 or x86_64")
overrule_arch(sse4_2 "Architecture is not x86 or x86_64")
overrule_arch(avx "Architecture is not x86 or x86_64")
endif()
########################################################################
# Select neon based on ARM ISA version
@ -265,33 +265,33 @@ endif(NOT CPU_IS_x86)
include(CheckCSourceCompiles)
check_c_source_compiles("#include <arm_neon.h>\nint main(){ uint8_t *dest; uint8x8_t res; vst1_u8(dest, res); }"
neon_compile_result)
neon_compile_result)
if(neon_compile_result)
check_c_source_compiles("int main(){asm volatile(\"vrev32.8 q0, q0\");}"
have_neonv7_result )
have_neonv7_result)
check_c_source_compiles("int main(){asm volatile(\"sub v1.4s,v1.4s,v1.4s\");}"
have_neonv8_result )
have_neonv8_result)
if (have_neonv7_result)
OVERRULE_ARCH(neonv8 "CPU is armv7")
if(have_neonv7_result)
overrule_arch(neonv8 "CPU is armv7")
endif()
if (have_neonv8_result)
OVERRULE_ARCH(neonv7 "CPU is armv8")
if(have_neonv8_result)
overrule_arch(neonv7 "CPU is armv8")
endif()
else(neon_compile_result)
OVERRULE_ARCH(neon "Compiler doesn't support NEON")
OVERRULE_ARCH(neonv7 "Compiler doesn't support NEON")
OVERRULE_ARCH(neonv8 "Compiler doesn't support NEON")
endif(neon_compile_result)
else()
overrule_arch(neon "Compiler doesn't support NEON")
overrule_arch(neonv7 "Compiler doesn't support NEON")
overrule_arch(neonv8 "Compiler doesn't support NEON")
endif()
########################################################################
# implement overruling in the ORC case,
# since ORC always passes flag detection
########################################################################
if(NOT ORC_FOUND)
OVERRULE_ARCH(orc "ORC support not found")
overrule_arch(orc "ORC support not found")
endif()
########################################################################
@ -301,16 +301,16 @@ endif()
if(NOT CROSSCOMPILE_MULTILIB AND CPU_IS_x86)
include(CheckTypeSize)
check_type_size("void*[8]" SIZEOF_CPU BUILTIN_TYPES_ONLY)
if (${SIZEOF_CPU} EQUAL 64)
OVERRULE_ARCH(32 "CPU width is 64 bits")
if(${SIZEOF_CPU} EQUAL 64)
overrule_arch(32 "CPU width is 64 bits")
endif()
if (${SIZEOF_CPU} EQUAL 32)
OVERRULE_ARCH(64 "CPU width is 32 bits")
if(${SIZEOF_CPU} EQUAL 32)
overrule_arch(64 "CPU width is 32 bits")
endif()
#MSVC 64 bit does not have MMX, overrule it
if (${SIZEOF_CPU} EQUAL 64 AND MSVC)
OVERRULE_ARCH(mmx "No MMX for Win64")
if(${SIZEOF_CPU} EQUAL 64 AND MSVC)
overrule_arch(mmx "No MMX for Win64")
endif()
endif()
@ -340,12 +340,12 @@ execute_process(
foreach(arch mmx orc 64 32)
foreach(machine_name ${available_machines})
string(REPLACE "_${arch}" "" machine_name_no_arch ${machine_name})
if (${machine_name} STREQUAL ${machine_name_no_arch})
if(${machine_name} STREQUAL ${machine_name_no_arch})
else()
list(REMOVE_ITEM available_machines ${machine_name_no_arch})
endif()
endforeach(machine_name)
endforeach(arch)
endforeach()
endforeach()
########################################################################
# done overrules! print the result
@ -373,7 +373,7 @@ macro(gen_template tmpl output)
${PROJECT_SOURCE_DIR}/gen/volk_gnsssdr_tmpl_utils.py
--input ${tmpl} --output ${output} ${ARGN}
)
endmacro(gen_template)
endmacro()
file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/include/volk_gnsssdr)
@ -399,13 +399,13 @@ if(MSVC)
elseif(MSVC11) #Visual Studio 11
set(cmake_c_compiler_version "Microsoft Visual Studio 11.0")
elseif(MSVC12) #Visual Studio 12
SET(cmake_c_compiler_version "Microsoft Visual Studio 12.0")
set(cmake_c_compiler_version "Microsoft Visual Studio 12.0")
endif()
else()
execute_process(COMMAND ${CMAKE_C_COMPILER} --version
OUTPUT_VARIABLE cmake_c_compiler_version)
endif(MSVC)
set(COMPILER_INFO "${CMAKE_C_COMPILER}:::${CMAKE_C_FLAGS_${GRCBTU}} ${CMAKE_C_FLAGS}\n${CMAKE_CXX_COMPILER}:::${CMAKE_CXX_FLAGS_${GRCBTU}} ${CMAKE_CXX_FLAGS}\n" )
endif()
set(COMPILER_INFO "${CMAKE_C_COMPILER}:::${CMAKE_C_FLAGS_${GRCBTU}} ${CMAKE_C_FLAGS}\n${CMAKE_CXX_COMPILER}:::${CMAKE_CXX_FLAGS_${GRCBTU}} ${CMAKE_CXX_FLAGS}\n")
foreach(machine_name ${available_machines})
#generate machine source
@ -419,8 +419,8 @@ foreach(machine_name ${available_machines})
--mode "machine_flags" --machine "${machine_name}" --compiler "${COMPILER_NAME}"
OUTPUT_VARIABLE ${machine_name}_flags OUTPUT_STRIP_TRAILING_WHITESPACE
)
MESSAGE(STATUS "BUILD INFO ::: ${machine_name} ::: ${COMPILER_NAME} ::: ${CMAKE_C_FLAGS_${CBTU}} ${CMAKE_C_FLAGS} ${${machine_name}_flags}")
set(COMPILER_INFO "${COMPILER_INFO}${machine_name}:::${COMPILER_NAME}:::${CMAKE_C_FLAGS_${CBTU}} ${CMAKE_C_FLAGS} ${${machine_name}_flags}\n" )
message(STATUS "BUILD INFO ::: ${machine_name} ::: ${COMPILER_NAME} ::: ${CMAKE_C_FLAGS_${CBTU}} ${CMAKE_C_FLAGS} ${${machine_name}_flags}")
set(COMPILER_INFO "${COMPILER_INFO}${machine_name}:::${COMPILER_NAME}:::${CMAKE_C_FLAGS_${CBTU}} ${CMAKE_C_FLAGS} ${${machine_name}_flags}\n")
if(${machine_name}_flags AND NOT MSVC)
set_source_files_properties(${machine_source} PROPERTIES COMPILE_FLAGS "${${machine_name}_flags}")
endif()
@ -428,12 +428,12 @@ foreach(machine_name ${available_machines})
#add to available machine defs
string(TOUPPER LV_MACHINE_${machine_name} machine_def)
list(APPEND machine_defs ${machine_def})
endforeach(machine_name)
endforeach()
# Convert to a C string to compile and display properly
string(STRIP "${cmake_c_compiler_version}" cmake_c_compiler_version)
string(STRIP ${COMPILER_INFO} COMPILER_INFO)
MESSAGE(STATUS "Compiler Version: ${cmake_c_compiler_version}")
message(STATUS "Compiler Version: ${cmake_c_compiler_version}")
string(REPLACE "\n" " \\n" cmake_c_compiler_version ${cmake_c_compiler_version})
string(REPLACE "\n" " \\n" COMPILER_INFO ${COMPILER_INFO})
@ -462,7 +462,7 @@ if(${CMAKE_VERSION} VERSION_GREATER "2.8.9")
# set up the assembler flags and include the source files
foreach(ARCH ${ASM_ARCHS_AVAILABLE})
string(REGEX MATCH "${ARCH}" ASM_ARCH "${available_archs}")
if( ASM_ARCH STREQUAL "neonv7" )
if(ASM_ARCH STREQUAL "neonv7")
message(STATUS "---- Adding ASM files") # we always use ATT syntax
message(STATUS "-- Detected neon architecture; enabling ASM")
# setup architecture specific assembler flags
@ -474,23 +474,23 @@ if(${CMAKE_VERSION} VERSION_GREATER "2.8.9")
foreach(asm_file ${asm_files})
list(APPEND volk_gnsssdr_sources ${asm_file})
message(STATUS "Adding source file: ${asm_file}")
endforeach(asm_file)
endforeach()
endif()
enable_language(ASM)
set(CMAKE_ASM_FLAGS ${ARCH_ASM_FLAGS})
message(STATUS "c flags: ${FULL_C_FLAGS}")
message(STATUS "asm flags: ${CMAKE_ASM_FLAGS}")
endforeach(ARCH)
endforeach()
else(${CMAKE_VERSION} VERSION_GREATER "2.8.9")
else()
message(STATUS "Not enabling ASM support. CMake >= 2.8.10 required.")
foreach(machine_name ${available_machines})
string(REGEX MATCH "neon" NEON_MACHINE ${machine_name})
if( NEON_MACHINE STREQUAL "neon")
if(NEON_MACHINE STREQUAL "neon")
message(FATAL_ERROR "CMake >= 2.8.10 is required for ARM NEON support")
endif()
endforeach()
endif(${CMAKE_VERSION} VERSION_GREATER "2.8.9")
endif()
########################################################################
# Handle orc support
@ -517,7 +517,7 @@ if(ORC_FOUND)
)
list(APPEND volk_gnsssdr_sources ${orcc_gen})
endforeach(orc_file)
endforeach()
else()
message(STATUS "Did not find liborc and orcc, disabling orc support...")
endif()
@ -571,7 +571,7 @@ endif()
if(CMAKE_VERSION VERSION_GREATER "2.8.7")
#Create a volk_gnsssdr object library (requires cmake >= 2.8.8)
add_library(volk_gnsssdr_obj OBJECT ${volk_gnsssdr_sources})
#Add dynamic library
add_library(volk_gnsssdr SHARED $<TARGET_OBJECTS:volk_gnsssdr_obj>)
target_link_libraries(volk_gnsssdr ${volk_gnsssdr_libraries} ${Boost_LIBRARIES})
@ -597,7 +597,7 @@ if(CMAKE_VERSION VERSION_GREATER "2.8.7")
install(TARGETS volk_gnsssdr_static
ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT "volk_gnsssdr_devel"
)
endif(ENABLE_STATIC_LIBS)
endif()
#Older cmake versions (slower to build when building dynamic/static libs)
else()
@ -619,14 +619,14 @@ else()
if(NOT WIN32)
set_target_properties(volk_gnsssdr_static
PROPERTIES OUTPUT_NAME volk_gnsssdr)
endif(NOT WIN32)
endif()
install(TARGETS volk_gnsssdr_static
ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT "volk_gnsssdr_devel" # .lib file
)
endif(ENABLE_STATIC_LIBS)
endif()
endif()
endif(CMAKE_VERSION VERSION_GREATER "2.8.7")
########################################################################
# Build the QA test application
########################################################################
@ -641,7 +641,7 @@ if(ENABLE_TESTING)
)
include(VolkAddTest)
VOLK_GEN_TEST("volk_gnsssdr_test_all"
volk_gen_test("volk_gnsssdr_test_all"
SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/testqa.cc
${CMAKE_CURRENT_SOURCE_DIR}/qa_utils.cc
TARGET_DEPS volk_gnsssdr
@ -649,7 +649,7 @@ if(ENABLE_TESTING)
foreach(kernel ${h_files})
get_filename_component(kernel ${kernel} NAME)
string(REPLACE ".h" "" kernel ${kernel})
VOLK_ADD_TEST(${kernel} "volk_gnsssdr_test_all")
volk_add_test(${kernel} "volk_gnsssdr_test_all")
endforeach()
endif(ENABLE_TESTING)
endif()

View File

@ -17,4 +17,4 @@
#
add_subdirectory(adapters)
add_subdirectory(gnuradio_blocks)
add_subdirectory(gnuradio_blocks)

View File

@ -17,24 +17,24 @@
#
set(OBS_ADAPTER_SOURCES
hybrid_observables.cc
hybrid_observables.cc
)
set(OBS_ADAPTER_HEADERS
hybrid_observables.h
hybrid_observables.h
)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/observables/gnuradio_blocks
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${CMAKE_SOURCE_DIR}/src/algorithms/PVT/libs
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/observables/gnuradio_blocks
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${CMAKE_SOURCE_DIR}/src/algorithms/PVT/libs
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
)
add_library(obs_adapters ${OBS_ADAPTER_SOURCES} ${OBS_ADAPTER_HEADERS})

View File

@ -17,32 +17,49 @@
#
set(OBS_GR_BLOCKS_SOURCES
hybrid_observables_cc.cc
hybrid_observables_cc.cc
)
set(OBS_GR_BLOCKS_HEADERS
hybrid_observables_cc.h
hybrid_observables_cc.h
)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${CMAKE_SOURCE_DIR}/src/algorithms/PVT/libs
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${ARMADILLO_INCLUDE_DIRS}
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${MATIO_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${CMAKE_SOURCE_DIR}/src/algorithms/PVT/libs
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${ARMADILLO_INCLUDE_DIRS}
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${MATIO_INCLUDE_DIRS}
)
add_library(obs_gr_blocks ${OBS_GR_BLOCKS_SOURCES} ${OBS_GR_BLOCKS_HEADERS})
source_group(Headers FILES ${OBS_GR_BLOCKS_HEADERS})
if(MATIO_FOUND)
add_dependencies(obs_gr_blocks gnss_sp_libs glog-${glog_RELEASE} armadillo-${armadillo_RELEASE})
else(MATIO_FOUND)
add_dependencies(obs_gr_blocks gnss_sp_libs glog-${glog_RELEASE} armadillo-${armadillo_RELEASE} matio-${GNSSSDR_MATIO_LOCAL_VERSION})
endif(MATIO_FOUND)
target_link_libraries(obs_gr_blocks gnss_sp_libs ${GNURADIO_RUNTIME_LIBRARIES} ${ARMADILLO_LIBRARIES} ${MATIO_LIBRARIES})
add_dependencies(obs_gr_blocks
gnss_sp_libs
glog-${glog_RELEASE}
armadillo-${armadillo_RELEASE}
)
else()
add_dependencies(obs_gr_blocks
gnss_sp_libs
glog-${glog_RELEASE}
armadillo-${armadillo_RELEASE}
matio-${GNSSSDR_MATIO_LOCAL_VERSION}
)
endif()
target_link_libraries(obs_gr_blocks
gnss_sp_libs
${GNURADIO_RUNTIME_LIBRARIES}
${ARMADILLO_LIBRARIES}
${MATIO_LIBRARIES}
)

View File

@ -17,4 +17,4 @@
#
add_subdirectory(adapters)
add_subdirectory(gnuradio_blocks)
add_subdirectory(gnuradio_blocks)

View File

@ -16,35 +16,39 @@
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
#
set(RESAMPLER_ADAPTER_SOURCES
direct_resampler_conditioner.cc
mmse_resampler_conditioner.cc
direct_resampler_conditioner.cc
mmse_resampler_conditioner.cc
)
set(RESAMPLER_ADAPTER_HEADERS
direct_resampler_conditioner.h
mmse_resampler_conditioner.h
direct_resampler_conditioner.h
mmse_resampler_conditioner.h
)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/algorithms/resampler/gnuradio_blocks
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${VOLK_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/algorithms/resampler/gnuradio_blocks
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${VOLK_INCLUDE_DIRS}
)
if(${PC_GNURADIO_RUNTIME_VERSION} VERSION_GREATER "3.7.13.4" )
add_definitions( -DGR_GREATER_38=1 )
endif(${PC_GNURADIO_RUNTIME_VERSION} VERSION_GREATER "3.7.13.4" )
if(${PC_GNURADIO_RUNTIME_VERSION} VERSION_GREATER "3.7.13.4")
add_definitions(-DGR_GREATER_38=1)
endif()
list(SORT RESAMPLER_ADAPTER_HEADERS)
list(SORT RESAMPLER_ADAPTER_SOURCES)
add_library(resampler_adapters ${RESAMPLER_ADAPTER_SOURCES} ${RESAMPLER_ADAPTER_HEADERS})
add_library(resampler_adapters
${RESAMPLER_ADAPTER_SOURCES}
${RESAMPLER_ADAPTER_HEADERS}
)
source_group(Headers FILES ${RESAMPLER_ADAPTER_HEADERS})
target_link_libraries(resampler_adapters resampler_gr_blocks)

View File

@ -63,6 +63,17 @@ MmseResamplerConditioner::MmseResamplerConditioner(
if (item_type_.compare("gr_complex") == 0)
{
item_size_ = sizeof(gr_complex);
//create a FIR low pass filter
std::vector<float> taps = gr::filter::firdes::low_pass(1.0,
sample_freq_in_,
sample_freq_out_ / 2.1,
sample_freq_out_ / 10,
gr::filter::firdes::win_type::WIN_HAMMING);
std::cout << "Enabled fractional resampler low pass filter with " << taps.size() << " taps" << std::endl;
fir_filter_ccf_ = gr::filter::fir_filter_ccf::make(1, taps);
#ifdef GR_GREATER_38
resampler_ = gr::filter::mmse_resampler_cc::make(0.0, sample_freq_in_ / sample_freq_out_);
#else
@ -96,18 +107,17 @@ MmseResamplerConditioner::MmseResamplerConditioner(
MmseResamplerConditioner::~MmseResamplerConditioner() {}
void MmseResamplerConditioner::connect(gr::top_block_sptr top_block)
{
if (dump_)
{
top_block->connect(fir_filter_ccf_, 0, resampler_, 0);
top_block->connect(resampler_, 0, file_sink_, 0);
DLOG(INFO) << "connected resampler to file sink";
}
else
{
DLOG(INFO) << "nothing to connect internally";
top_block->connect(fir_filter_ccf_, 0, resampler_, 0);
}
}
@ -116,14 +126,19 @@ void MmseResamplerConditioner::disconnect(gr::top_block_sptr top_block)
{
if (dump_)
{
top_block->disconnect(fir_filter_ccf_, 0, resampler_, 0);
top_block->disconnect(resampler_, 0, file_sink_, 0);
}
else
{
top_block->disconnect(fir_filter_ccf_, 0, resampler_, 0);
}
}
gr::basic_block_sptr MmseResamplerConditioner::get_left_block()
{
return resampler_;
return fir_filter_ccf_;
}

View File

@ -36,9 +36,13 @@
#include "gnss_block_interface.h"
#ifdef GR_GREATER_38
#include <gnuradio/filter/mmse_resampler_cc.h>
#include <gnuradio/filter/fir_filter_blk.h>
#else
#include <gnuradio/filter/fractional_resampler_cc.h>
#include <gnuradio/filter/fir_filter_ccf.h>
#endif
#include <gnuradio/filter/firdes.h>
#include <string>
class ConfigurationInterface;
@ -91,6 +95,7 @@ private:
#else
gr::filter::fractional_resampler_cc::sptr resampler_;
#endif
gr::filter::fir_filter_ccf::sptr fir_filter_ccf_;
gr::block_sptr file_sink_;
};

View File

@ -17,29 +17,34 @@
#
set(RESAMPLER_GR_BLOCKS_SOURCES
direct_resampler_conditioner_cc.cc
direct_resampler_conditioner_cs.cc
direct_resampler_conditioner_cb.cc
set(RESAMPLER_GR_BLOCKS_SOURCES
direct_resampler_conditioner_cc.cc
direct_resampler_conditioner_cs.cc
direct_resampler_conditioner_cb.cc
)
set(RESAMPLER_GR_BLOCKS_HEADERS
direct_resampler_conditioner_cc.h
direct_resampler_conditioner_cs.h
direct_resampler_conditioner_cb.h
set(RESAMPLER_GR_BLOCKS_HEADERS
direct_resampler_conditioner_cc.h
direct_resampler_conditioner_cs.h
direct_resampler_conditioner_cb.h
)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${VOLK_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${VOLK_INCLUDE_DIRS}
)
list(SORT RESAMPLER_GR_BLOCKS_HEADERS)
list(SORT RESAMPLER_GR_BLOCKS_SOURCES)
add_library(resampler_gr_blocks ${RESAMPLER_GR_BLOCKS_SOURCES} ${RESAMPLER_GR_BLOCKS_HEADERS})
add_library(resampler_gr_blocks
${RESAMPLER_GR_BLOCKS_SOURCES}
${RESAMPLER_GR_BLOCKS_HEADERS}
)
source_group(Headers FILES ${RESAMPLER_GR_BLOCKS_HEADERS})
add_dependencies(resampler_gr_blocks glog-${glog_RELEASE})
add_dependencies(resampler_gr_blocks glog-${glog_RELEASE})

View File

@ -20,22 +20,28 @@ set(SIGNAL_GENERATOR_ADAPTER_SOURCES signal_generator.cc)
set(SIGNAL_GENERATOR_ADAPTER_HEADERS signal_generator.h)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/signal_generator/gnuradio_blocks
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/signal_generator/gnuradio_blocks
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
)
add_library(signal_generator_adapters ${SIGNAL_GENERATOR_ADAPTER_SOURCES} ${SIGNAL_GENERATOR_ADAPTER_HEADERS})
source_group(Headers FILES ${SIGNAL_GENERATOR_ADAPTER_HEADERS})
target_link_libraries(signal_generator_adapters gnss_sp_libs
signal_generator_blocks
${GNURADIO_RUNTIME_LIBRARIES}
${GNURADIO_BLOCKS_LIBRARIES}
${GNURADIO_FILTER_LIBRARIES}
add_library(signal_generator_adapters
${SIGNAL_GENERATOR_ADAPTER_SOURCES}
${SIGNAL_GENERATOR_ADAPTER_HEADERS}
)
source_group(Headers FILES ${SIGNAL_GENERATOR_ADAPTER_HEADERS})
target_link_libraries(signal_generator_adapters
gnss_sp_libs
signal_generator_blocks
${GNURADIO_RUNTIME_LIBRARIES}
${GNURADIO_BLOCKS_LIBRARIES}
${GNURADIO_FILTER_LIBRARIES}
)

View File

@ -20,27 +20,35 @@ set(SIGNAL_GENERATOR_BLOCK_SOURCES signal_generator_c.cc)
set(SIGNAL_GENERATOR_BLOCK_HEADERS signal_generator_c.h)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${VOLK_GNSSSDR_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${VOLK_GNSSSDR_INCLUDE_DIRS}
)
add_library(signal_generator_blocks
${SIGNAL_GENERATOR_BLOCK_SOURCES}
${SIGNAL_GENERATOR_BLOCK_HEADERS}
)
add_library(signal_generator_blocks ${SIGNAL_GENERATOR_BLOCK_SOURCES} ${SIGNAL_GENERATOR_BLOCK_HEADERS})
source_group(Headers FILES ${SIGNAL_GENERATOR_BLOCK_HEADERS})
target_link_libraries(signal_generator_blocks gnss_system_parameters gnss_sp_libs
${GNURADIO_RUNTIME_LIBRARIES}
${GNURADIO_FFT_LIBRARIES}
${VOLK_GNSSSDR_LIBRARIES} ${ORC_LIBRARIES}
target_link_libraries(signal_generator_blocks
gnss_system_parameters
gnss_sp_libs
${GNURADIO_RUNTIME_LIBRARIES}
${GNURADIO_FFT_LIBRARIES}
${VOLK_GNSSSDR_LIBRARIES}
${ORC_LIBRARIES}
)
if(VOLK_GNSSSDR_FOUND)
if(VOLKGNSSSDR_FOUND)
# add_dependencies(signal_generator_blocks glog-${glog_RELEASE})
else(VOLK_GNSSSDR_FOUND)
else()
add_dependencies(signal_generator_blocks volk_gnsssdr_module)
endif(VOLK_GNSSSDR_FOUND)
endif()

View File

@ -23,30 +23,30 @@ if(ENABLE_RAW_UDP)
find_package(PCAP)
if(NOT PCAP_FOUND)
message(FATAL_ERROR "PCAP required to compile custom UDP packet sample source (ENABLE_RAW_UDP)")
endif(NOT PCAP_FOUND)
endif()
get_filename_component(PCAP_LIBRARY_DIRS ${PCAP_LIBRARY} DIRECTORY CACHE)
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${PCAP_LIBRARIES})
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${PCAP_INCLUDE_DIRS})
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} custom_udp_signal_source.cc)
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} custom_udp_signal_source.h)
endif(ENABLE_RAW_UDP)
endif()
if(ENABLE_PLUTOSDR OR ENABLE_FMCOMMS2)
find_package(Griio REQUIRED)
if(NOT IIO_FOUND)
find_package(GRIIO REQUIRED)
if(NOT GRIIO_FOUND)
message(STATUS "gnuradio-iio not found, its installation is required.")
message(STATUS "Please build and install the following projects:")
message(STATUS " * libiio from https://github.com/analogdevicesinc/libiio")
message(STATUS " * libad9361-iio from https://github.com/analogdevicesinc/libad9361-iio")
message(STATUS " * gnuradio-iio from https://github.com/analogdevicesinc/gr-iio")
message(FATAL_ERROR "gnuradio-iio is required for building gnss-sdr with this option enabled.")
endif(NOT IIO_FOUND)
endif()
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${IIO_LIBRARIES})
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${IIO_INCLUDE_DIRS})
endif(ENABLE_PLUTOSDR OR ENABLE_FMCOMMS2)
endif()
if(ENABLE_AD9361)
find_package(libiio REQUIRED)
find_package(LIBIIO REQUIRED)
if(NOT LIBIIO_FOUND)
message(STATUS "libiio not found, its installation is required.")
message(STATUS "Please build and install the following projects:")
@ -54,32 +54,33 @@ if(ENABLE_AD9361)
message(STATUS " * libad9361-iio from https://github.com/analogdevicesinc/libad9361-iio")
message(STATUS " * gnuradio-iio from https://github.com/analogdevicesinc/gr-iio")
message(FATAL_ERROR "libiio is required for building gnss-sdr with this option enabled.")
endif(NOT LIBIIO_FOUND)
endif()
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${LIBIIO_LIBRARIES})
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${LIBIIO_INCLUDE_DIRS})
endif(ENABLE_AD9361)
endif()
if(ENABLE_PLUTOSDR)
##############################################
# ADALM-PLUTO (Analog Devices Inc.)
##############################################
if(IIO_FOUND)
if(GRIIO_FOUND)
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} plutosdr_signal_source.cc)
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} plutosdr_signal_source.h)
endif(IIO_FOUND)
endif(ENABLE_PLUTOSDR)
endif()
endif()
if(ENABLE_FMCOMMS2)
###############################################
# FMCOMMS2 based SDR Hardware
###############################################
if(IIO_FOUND)
if(GRIIO_FOUND)
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} fmcomms2_signal_source.cc)
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} fmcomms2_signal_source.h)
endif(IIO_FOUND)
endif(ENABLE_FMCOMMS2)
endif()
endif()
if(ENABLE_AD9361)
###############################################
@ -88,62 +89,60 @@ if(ENABLE_AD9361)
if(LIBIIO_FOUND)
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} ad9361_fpga_signal_source.cc)
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} ad9361_fpga_signal_source.h)
endif(LIBIIO_FOUND)
endif(ENABLE_AD9361)
endif()
endif()
if(ENABLE_GN3S)
##############################################
# GN3S (USB dongle)
##############################################
find_package(GrGN3S REQUIRED)
if(NOT GR_GN3S_FOUND)
message(" gr-gn3s not found, install it from https://github.com/gnss-sdr/gr-gn3s ")
message(FATAL_ERROR "gr-gn3s required for building gnss-sdr with this option enabled")
endif(NOT GR_GN3S_FOUND)
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${GR_GN3S_LIBRARIES})
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${GR_GN3S_INCLUDE_DIRS})
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} gn3s_signal_source.cc)
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} gn3s_signal_source.h)
endif(ENABLE_GN3S)
##############################################
# GN3S (USB dongle)
##############################################
find_package(GRGN3S REQUIRED)
if(NOT GRGN3S_FOUND)
message(" gr-gn3s not found, install it from https://github.com/gnss-sdr/gr-gn3s ")
message(FATAL_ERROR "gr-gn3s required for building gnss-sdr with this option enabled")
endif()
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${GR_GN3S_LIBRARIES})
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${GR_GN3S_INCLUDE_DIRS})
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} gn3s_signal_source.cc)
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} gn3s_signal_source.h)
endif()
if(ENABLE_FLEXIBAND)
##############################################
# TELEORBIT FLEXIBAND FRONTEND ADAPTER
##############################################
find_package(Teleorbit REQUIRED)
if(NOT TELEORBIT_FOUND)
message(FATAL_ERROR "Teleorbit Flexiband GNU Radio driver required to build gnss-sdr with the optional FLEXIBAND adapter")
endif(NOT TELEORBIT_FOUND)
# Set up variables
set(FLEXIBAND_DRIVER_INCLUDE_DIRS
${OPT_DRIVER_INCLUDE_DIRS}
${TELEORBIT_INCLUDE_DIR}/teleorbit
)
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${TELEORBIT_LIBRARIES})
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${FLEXIBAND_DRIVER_INCLUDE_DIRS})
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} flexiband_signal_source.cc)
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} flexiband_signal_source.h)
endif(ENABLE_FLEXIBAND)
##############################################
# TELEORBIT FLEXIBAND FRONTEND ADAPTER
##############################################
find_package(TELEORBIT REQUIRED)
if(NOT TELEORBIT_FOUND)
message(FATAL_ERROR "Teleorbit Flexiband GNU Radio driver required to build gnss-sdr with the optional FLEXIBAND adapter")
endif()
# Set up variables
set(FLEXIBAND_DRIVER_INCLUDE_DIRS
${OPT_DRIVER_INCLUDE_DIRS}
${TELEORBIT_INCLUDE_DIR}/teleorbit
)
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${TELEORBIT_LIBRARIES})
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${FLEXIBAND_DRIVER_INCLUDE_DIRS})
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} flexiband_signal_source.cc)
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} flexiband_signal_source.h)
endif()
if(ENABLE_ARRAY)
##############################################
# DBFCTTC GNSS EXPERIMENTAL ARRAY PROTOTYPE
##############################################
find_package(GrDbfcttc REQUIRED)
if(NOT GR_DBFCTTC_FOUND)
message(" gr-dbfcttc not found, install it from https://github.com/gnss-sdr/gr-dbfcttc ")
message(FATAL_ERROR "gr-dbfcttc required for building gnss-sdr with this option enabled")
endif(NOT GR_DBFCTTC_FOUND)
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${GR_DBFCTTC_LIBRARIES})
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${GR_DBFCTTC_INCLUDE_DIRS})
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} raw_array_signal_source.cc)
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} raw_array_signal_source.h)
endif(ENABLE_ARRAY)
##############################################
# DBFCTTC GNSS EXPERIMENTAL ARRAY PROTOTYPE
##############################################
find_package(GRDBFCTTC REQUIRED)
if(NOT GRDBFCTTC_FOUND)
message(" gr-dbfcttc not found, install it from https://github.com/gnss-sdr/gr-dbfcttc ")
message(FATAL_ERROR "gr-dbfcttc required for building gnss-sdr with this option enabled")
endif()
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${GR_DBFCTTC_LIBRARIES})
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${GR_DBFCTTC_INCLUDE_DIRS})
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} raw_array_signal_source.cc)
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} raw_array_signal_source.h)
endif()
if(ENABLE_OSMOSDR)
@ -153,8 +152,8 @@ if(ENABLE_OSMOSDR)
if(NOT GROSMOSDR_FOUND)
if(ENABLE_PACKAGING)
list(REMOVE_ITEM SIGNAL_SOURCE_ADAPTER_HEADERS ${CMAKE_SOURCE_DIR}/src/algorithms/signal_source/adapters/osmosdr_signal_source.h)
endif(ENABLE_PACKAGING)
else(NOT GROSMOSDR_FOUND)
endif()
else()
# set OSMO include dirs
set(OSMO_DRIVER_INCLUDE_DIRS
${OPT_DRIVER_INCLUDE_DIRS}
@ -164,65 +163,68 @@ if(ENABLE_OSMOSDR)
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} osmosdr_signal_source.h)
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${GROSMOSDR_LIBRARIES})
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${OSMO_DRIVER_INCLUDE_DIRS})
endif(NOT GROSMOSDR_FOUND)
endif(ENABLE_OSMOSDR)
endif()
endif()
if(ENABLE_UHD AND GNURADIO_UHD_LIBRARIES_gnuradio-uhd)
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} uhd_signal_source.cc)
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} uhd_signal_source.h)
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${UHD_LIBRARIES} ${GNURADIO_UHD_LIBRARIES})
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${UHD_INCLUDE_DIRS})
endif(ENABLE_UHD AND GNURADIO_UHD_LIBRARIES_gnuradio-uhd)
endif()
set(SIGNAL_SOURCE_ADAPTER_SOURCES file_signal_source.cc
gen_signal_source.cc
nsr_file_signal_source.cc
spir_file_signal_source.cc
spir_gss6450_file_signal_source.cc
rtl_tcp_signal_source.cc
labsat_signal_source.cc
${OPT_DRIVER_SOURCES}
set(SIGNAL_SOURCE_ADAPTER_SOURCES
file_signal_source.cc
gen_signal_source.cc
nsr_file_signal_source.cc
spir_file_signal_source.cc
spir_gss6450_file_signal_source.cc
rtl_tcp_signal_source.cc
labsat_signal_source.cc
${OPT_DRIVER_SOURCES}
)
set(SIGNAL_SOURCE_ADAPTER_HEADERS file_signal_source.h
gen_signal_source.h
nsr_file_signal_source.h
spir_file_signal_source.h
spir_gss6450_file_signal_source.h
rtl_tcp_signal_source.h
labsat_signal_source.h
${OPT_DRIVER_HEADERS}
set(SIGNAL_SOURCE_ADAPTER_HEADERS
file_signal_source.h
gen_signal_source.h
nsr_file_signal_source.h
spir_file_signal_source.h
spir_gss6450_file_signal_source.h
rtl_tcp_signal_source.h
labsat_signal_source.h
${OPT_DRIVER_HEADERS}
)
if(PC_GNURADIO_RUNTIME_VERSION VERSION_GREATER 3.7.3)
set(SIGNAL_SOURCE_ADAPTER_SOURCES ${SIGNAL_SOURCE_ADAPTER_SOURCES}
two_bit_cpx_file_signal_source.cc
two_bit_packed_file_signal_source.cc )
set(SIGNAL_SOURCE_ADAPTER_HEADERS ${SIGNAL_SOURCE_ADAPTER_HEADERS}
two_bit_cpx_file_signal_source.h
two_bit_packed_file_signal_source.h )
endif(PC_GNURADIO_RUNTIME_VERSION VERSION_GREATER 3.7.3)
set(SIGNAL_SOURCE_ADAPTER_SOURCES ${SIGNAL_SOURCE_ADAPTER_SOURCES}
two_bit_cpx_file_signal_source.cc
two_bit_packed_file_signal_source.cc)
set(SIGNAL_SOURCE_ADAPTER_HEADERS ${SIGNAL_SOURCE_ADAPTER_HEADERS}
two_bit_cpx_file_signal_source.h
two_bit_packed_file_signal_source.h)
endif()
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${OPT_DRIVER_INCLUDE_DIRS}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${CMAKE_SOURCE_DIR}/src/algorithms/signal_source/libs
${CMAKE_SOURCE_DIR}/src/algorithms/signal_source/gnuradio_blocks
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${VOLK_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
${OPT_DRIVER_INCLUDE_DIRS}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${CMAKE_SOURCE_DIR}/src/algorithms/signal_source/libs
${CMAKE_SOURCE_DIR}/src/algorithms/signal_source/gnuradio_blocks
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${VOLK_INCLUDE_DIRS}
)
if(ARCH_64BITS)
add_definitions(-DARCH_64BITS=1)
endif(ARCH_64BITS)
endif()
add_definitions(-DGNSSSDR_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}")
@ -232,9 +234,9 @@ list(SORT SIGNAL_SOURCE_ADAPTER_SOURCES)
add_library(signal_source_adapters ${SIGNAL_SOURCE_ADAPTER_SOURCES} ${SIGNAL_SOURCE_ADAPTER_HEADERS})
source_group(Headers FILES ${SIGNAL_SOURCE_ADAPTER_HEADERS})
target_link_libraries(signal_source_adapters signal_source_gr_blocks
${Boost_LIBRARIES}
${GNURADIO_PMT_LIBRARIES}
${GNURADIO_BLOCKS_LIBRARIES}
${OPT_LIBRARIES}
gnss_sp_libs
${Boost_LIBRARIES}
${GNURADIO_PMT_LIBRARIES}
${GNURADIO_BLOCKS_LIBRARIES}
${OPT_LIBRARIES}
gnss_sp_libs
)

View File

@ -153,7 +153,8 @@ SpirGSS6450FileSignalSource::SpirGSS6450FileSignalSource(ConfigurationInterface*
valve_vec_.push_back(gnss_sdr_make_valve(sizeof(gr_complex), samples_, queue_));
if (dump_)
{
sink_vec_.push_back(gr::blocks::file_sink::make(sizeof(gr_complex), dump_filename_.c_str()));
std::string tmp_str = dump_filename_ + "_ch" + std::to_string(i);
sink_vec_.push_back(gr::blocks::file_sink::make(sizeof(gr_complex), tmp_str.c_str()));
}
if (enable_throttle_control_)
{

View File

@ -20,60 +20,67 @@
if(ENABLE_RAW_UDP)
find_package(PCAP)
if(NOT PCAP_FOUND)
message(FATAL_ERROR "PCAP required to compile custom UDP packet sample source (ENABLE_RAW_UDP)")
endif(NOT PCAP_FOUND)
message(FATAL_ERROR "PCAP required to compile custom UDP packet sample source")
endif()
get_filename_component(PCAP_LIBRARY_DIRS ${PCAP_LIBRARY} DIRECTORY CACHE)
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${PCAP_LIBRARIES})
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${PCAP_INCLUDE_DIRS})
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} gr_complex_ip_packet_source.cc)
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} gr_complex_ip_packet_source.h)
endif(ENABLE_RAW_UDP)
endif()
set(SIGNAL_SOURCE_GR_BLOCKS_SOURCES
unpack_byte_2bit_samples.cc
unpack_byte_2bit_cpx_samples.cc
unpack_byte_4bit_samples.cc
unpack_intspir_1bit_samples.cc
rtl_tcp_signal_source_c.cc
unpack_2bit_samples.cc
unpack_spir_gss6450_samples.cc
labsat23_source.cc
${OPT_DRIVER_SOURCES}
unpack_byte_2bit_samples.cc
unpack_byte_2bit_cpx_samples.cc
unpack_byte_4bit_samples.cc
unpack_intspir_1bit_samples.cc
rtl_tcp_signal_source_c.cc
unpack_2bit_samples.cc
unpack_spir_gss6450_samples.cc
labsat23_source.cc
${OPT_DRIVER_SOURCES}
)
set(SIGNAL_SOURCE_GR_BLOCKS_HEADERS
unpack_byte_2bit_samples.h
unpack_byte_2bit_cpx_samples.h
unpack_byte_4bit_samples.h
unpack_intspir_1bit_samples.h
rtl_tcp_signal_source_c.h
unpack_2bit_samples.h
unpack_spir_gss6450_samples.h
labsat23_source.h
${OPT_DRIVER_HEADERS}
unpack_byte_2bit_samples.h
unpack_byte_2bit_cpx_samples.h
unpack_byte_4bit_samples.h
unpack_intspir_1bit_samples.h
rtl_tcp_signal_source_c.h
unpack_2bit_samples.h
unpack_spir_gss6450_samples.h
labsat23_source.h
${OPT_DRIVER_HEADERS}
)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/algorithms/signal_source/libs
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${OPT_DRIVER_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/algorithms/signal_source/libs
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${OPT_DRIVER_INCLUDE_DIRS}
)
list(SORT SIGNAL_SOURCE_GR_BLOCKS_HEADERS)
list(SORT SIGNAL_SOURCE_GR_BLOCKS_SOURCES)
add_library(signal_source_gr_blocks ${SIGNAL_SOURCE_GR_BLOCKS_SOURCES} ${SIGNAL_SOURCE_GR_BLOCKS_HEADERS})
add_library(signal_source_gr_blocks
${SIGNAL_SOURCE_GR_BLOCKS_SOURCES}
${SIGNAL_SOURCE_GR_BLOCKS_HEADERS}
)
source_group(Headers FILES ${SIGNAL_SOURCE_GR_BLOCKS_HEADERS})
target_link_libraries(signal_source_gr_blocks
signal_source_lib
${GNURADIO_RUNTIME_LIBRARIES}
target_link_libraries(signal_source_gr_blocks
signal_source_lib
${GNURADIO_RUNTIME_LIBRARIES}
${Boost_LIBRARIES}
${OPT_LIBRARIES}
)
add_dependencies(signal_source_gr_blocks glog-${glog_RELEASE})

View File

@ -236,8 +236,8 @@ int labsat23_source::general_work(int noutput_items,
//std::cout << "Section ID: " << (int)section_id << std::endl;
byte_counter += 2;
uint8_t section_lenght_bytes = 0;
section_lenght_bytes += memblock[byte_counter] | (memblock[byte_counter + 1] << 8) | (memblock[byte_counter + 2] << 16) | (memblock[byte_counter + 3] << 24);
//uint8_t section_lenght_bytes = 0;
//section_lenght_bytes += memblock[byte_counter] | (memblock[byte_counter + 1] << 8) | (memblock[byte_counter + 2] << 16) | (memblock[byte_counter + 3] << 24);
//std::cout << "section_lenght_bytes=" << (int)section_lenght_bytes << std::endl;
byte_counter += 4;

View File

@ -3,6 +3,7 @@
*
* \brief Unpacks SPIR int samples
* \author Antonio Ramos, antonio(at)cttc.es
* \author Javier Arribas jarribas (at) cttc.es
* -------------------------------------------------------------------------
*
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
@ -45,10 +46,6 @@ unpack_spir_gss6450_samples::unpack_spir_gss6450_samples(unsigned int adc_nbit)
{
adc_bits = adc_nbit;
samples_per_int = 16 / adc_bits;
i_data.resize(adc_bits, false);
q_data.resize(adc_bits, false);
adc_bits_two_pow = static_cast<int>(std::exp2(adc_bits));
two_compl_thres = adc_bits_two_pow / 2;
}
@ -56,50 +53,87 @@ unpack_spir_gss6450_samples::~unpack_spir_gss6450_samples()
{
}
int unpack_spir_gss6450_samples::compute_two_complement(unsigned long data)
void unpack_spir_gss6450_samples::decode_4bits_word(uint32_t input_uint32, gr_complex* out, int adc_bits)
{
int res = 0;
if (static_cast<int>(data) < two_compl_thres)
int8_t tmp_char;
float Q;
float I;
switch (adc_bits)
{
res = static_cast<int>(data);
}
else
{
res = static_cast<int>(data) - adc_bits_two_pow;
}
return res;
}
case 2:
//four bits per complex sample (2 I + 2 Q), 8 samples per int32[s0,s1,s2,s3,s4,s5,s6,s7]
for (int i = 0; i < 8; i++)
{
tmp_char = input_uint32 & 3;
if (tmp_char >= 2)
{
I = (tmp_char - 4);
}
else
{
I = tmp_char;
}
input_uint32 = input_uint32 >> 2;
tmp_char = input_uint32 & 3;
if (tmp_char >= 2)
{
Q = (tmp_char - 4);
}
else
{
Q = tmp_char;
}
input_uint32 = input_uint32 >> 2;
out[7 - i] = gr_complex(I, Q);
}
break;
case 4:
//eight bits per complex sample (4 I + 4 Q), 4 samples per int32= [s0,s1,s2,s3]
for (int i = 0; i < 4; i++)
{
tmp_char = input_uint32 & 0x0F;
if (tmp_char >= 8)
{
I = (tmp_char - 16);
}
else
{
I = tmp_char;
}
input_uint32 = input_uint32 >> 4;
tmp_char = input_uint32 & 0x0F;
if (tmp_char >= 8)
{
Q = (tmp_char - 16);
}
else
{
Q = tmp_char;
}
input_uint32 = input_uint32 >> 4;
out[3 - i] = gr_complex(I, Q);
}
break;
}
}
int unpack_spir_gss6450_samples::work(int noutput_items,
gr_vector_const_void_star& input_items, gr_vector_void_star& output_items)
{
const int* in = reinterpret_cast<const int*>(input_items[0]);
const int32_t* in = reinterpret_cast<const int32_t*>(input_items[0]);
gr_complex* out = reinterpret_cast<gr_complex*>(output_items[0]);
unsigned int n_sample = 0;
unsigned int in_counter = 0;
std::bitset<32> bs;
for (int i = 0; i < noutput_items; i++)
int n_sample = 0;
int in_counter = 0;
do
{
bs = in[in_counter];
int i_shift = adc_bits * 2 * (samples_per_int - n_sample - 1) + adc_bits;
int q_shift = adc_bits * 2 * (samples_per_int - n_sample - 1);
for (unsigned int k = 0; k < adc_bits; k++)
{
i_data[k] = bs[i_shift + k];
q_data[k] = bs[q_shift + k];
}
//out[i] = gr_complex(static_cast<float>(compute_two_complement(i_data.to_ulong())) + 0.5,
// static_cast<float>(compute_two_complement(q_data.to_ulong())) + 0.5);
out[i] = gr_complex(static_cast<float>(compute_two_complement(q_data.to_ulong())) + 0.5,
static_cast<float>(compute_two_complement(i_data.to_ulong())) + 0.5);
n_sample++;
if (n_sample == samples_per_int)
{
n_sample = 0;
in_counter++;
}
decode_4bits_word(in[in_counter++], &out[n_sample], adc_bits);
n_sample += samples_per_int;
}
while (n_sample < noutput_items);
return noutput_items;
}

View File

@ -3,6 +3,7 @@
*
* \brief Unpacks SPIR int samples
* \author Antonio Ramos, antonio.ramos(at)cttc.es
* \author Javier Arribas jarribas (at) cttc.es
* -------------------------------------------------------------------------
*
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
@ -32,7 +33,6 @@
#define GNSS_SDR_UNPACK_SPIR_GSS6450_SAMPLES_H
#include <gnuradio/sync_interpolator.h>
#include <boost/dynamic_bitset.hpp>
class unpack_spir_gss6450_samples;
@ -47,18 +47,13 @@ public:
int work(int noutput_items,
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items);
friend unpack_spir_gss6450_samples_sptr make_unpack_spir_gss6450_samples_sptr(unsigned int adc_nbit);
void decode_4bits_word(uint32_t input_int32, gr_complex *out, int adc_bits);
unpack_spir_gss6450_samples(unsigned int adc_nbit);
~unpack_spir_gss6450_samples();
private:
int compute_two_complement(unsigned long data);
unsigned int adc_bits;
unsigned int samples_per_int;
int two_compl_thres;
int adc_bits_two_pow;
boost::dynamic_bitset<> i_data;
boost::dynamic_bitset<> q_data;
};
#endif

View File

@ -17,64 +17,64 @@
#
if(ENABLE_PLUTOSDR OR ENABLE_FMCOMMS2)
find_package(Griio REQUIRED)
if(NOT IIO_FOUND)
message(STATUS "gnuradio-iio not found, its installation is required.")
message(STATUS "Please build and install the following projects:")
message(STATUS " * libiio from https://github.com/analogdevicesinc/libiio")
message(STATUS " * libad9361-iio from https://github.com/analogdevicesinc/libad9361-iio")
message(STATUS " * gnuradio-iio from https://github.com/analogdevicesinc/gr-iio")
message(FATAL_ERROR "gnuradio-iio is required for building gnss-sdr with this option enabled")
endif(NOT IIO_FOUND)
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${IIO_LIBRARIES})
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${IIO_INCLUDE_DIRS})
endif(ENABLE_PLUTOSDR OR ENABLE_FMCOMMS2)
find_package(GRIIO REQUIRED)
if(NOT GRIIO_FOUND)
message(STATUS "gnuradio-iio not found, its installation is required.")
message(STATUS "Please build and install the following projects:")
message(STATUS " * libiio from https://github.com/analogdevicesinc/libiio")
message(STATUS " * libad9361-iio from https://github.com/analogdevicesinc/libad9361-iio")
message(STATUS " * gnuradio-iio from https://github.com/analogdevicesinc/gr-iio")
message(FATAL_ERROR "gnuradio-iio is required for building gnss-sdr with this option enabled")
endif()
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${IIO_LIBRARIES})
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${IIO_INCLUDE_DIRS})
endif()
if(ENABLE_FMCOMMS2 OR ENABLE_AD9361)
find_package(libiio REQUIRED)
if(NOT LIBIIO_FOUND)
message(STATUS "libiio not found, its installation is required.")
message(STATUS "Please build and install the following projects:")
message(STATUS " * libiio from https://github.com/analogdevicesinc/libiio")
message(STATUS " * libad9361-iio from https://github.com/analogdevicesinc/libad9361-iio")
message(STATUS " * gnuradio-iio from https://github.com/analogdevicesinc/gr-iio")
message(FATAL_ERROR "libiio is required for building gnss-sdr with this option enabled")
endif(NOT LIBIIO_FOUND)
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${LIBIIO_LIBRARIES})
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${LIBIIO_INCLUDE_DIRS})
find_package(LIBIIO REQUIRED)
if(NOT LIBIIO_FOUND)
message(STATUS "libiio not found, its installation is required.")
message(STATUS "Please build and install the following projects:")
message(STATUS " * libiio from https://github.com/analogdevicesinc/libiio")
message(STATUS " * libad9361-iio from https://github.com/analogdevicesinc/libad9361-iio")
message(STATUS " * gnuradio-iio from https://github.com/analogdevicesinc/gr-iio")
message(FATAL_ERROR "libiio is required for building gnss-sdr with this option enabled")
endif()
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${LIBIIO_LIBRARIES})
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${LIBIIO_INCLUDE_DIRS})
###############################################
# FMCOMMS2 based SDR Hardware
###############################################
if(LIBIIO_FOUND)
set(OPT_SIGNAL_SOURCE_LIB_SOURCES ad9361_manager.cc)
set(OPT_SIGNAL_SOURCE_LIB_HEADERS ad9361_manager.h)
endif(LIBIIO_FOUND)
endif(ENABLE_FMCOMMS2 OR ENABLE_AD9361)
###############################################
# FMCOMMS2 based SDR Hardware
###############################################
if(LIBIIO_FOUND)
set(OPT_SIGNAL_SOURCE_LIB_SOURCES ad9361_manager.cc)
set(OPT_SIGNAL_SOURCE_LIB_HEADERS ad9361_manager.h)
endif()
endif()
if(ENABLE_FPGA OR ENABLE_AD9361)
set(OPT_SIGNAL_SOURCE_LIB_SOURCES ${OPT_SIGNAL_SOURCE_LIB_SOURCES} fpga_switch.cc)
set(OPT_SIGNAL_SOURCE_LIB_HEADERS ${OPT_SIGNAL_SOURCE_LIB_HEADERS} fpga_switch.h)
endif(ENABLE_FPGA OR ENABLE_AD9361)
set(OPT_SIGNAL_SOURCE_LIB_SOURCES ${OPT_SIGNAL_SOURCE_LIB_SOURCES} fpga_switch.cc)
set(OPT_SIGNAL_SOURCE_LIB_HEADERS ${OPT_SIGNAL_SOURCE_LIB_HEADERS} fpga_switch.h)
endif()
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${Boost_INCLUDE_DIRS}
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${OPT_DRIVER_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
${Boost_INCLUDE_DIRS}
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${OPT_DRIVER_INCLUDE_DIRS}
)
set(SIGNAL_SOURCE_LIB_SOURCES
rtl_tcp_commands.cc
rtl_tcp_dongle_info.cc
${OPT_SIGNAL_SOURCE_LIB_SOURCES}
rtl_tcp_commands.cc
rtl_tcp_dongle_info.cc
${OPT_SIGNAL_SOURCE_LIB_SOURCES}
)
set(SIGNAL_SOURCE_LIB_HEADERS
rtl_tcp_commands.h
rtl_tcp_dongle_info.h
${OPT_SIGNAL_SOURCE_LIB_HEADERS}
rtl_tcp_commands.h
rtl_tcp_dongle_info.h
${OPT_SIGNAL_SOURCE_LIB_HEADERS}
)
list(SORT SIGNAL_SOURCE_LIB_HEADERS)

View File

@ -18,4 +18,4 @@
add_subdirectory(adapters)
add_subdirectory(gnuradio_blocks)
add_subdirectory(libs)
add_subdirectory(libs)

View File

@ -20,42 +20,51 @@
set(TELEMETRY_DECODER_ADAPTER_SOURCES
gps_l1_ca_telemetry_decoder.cc
gps_l2c_telemetry_decoder.cc
gps_l5_telemetry_decoder.cc
gps_l5_telemetry_decoder.cc
galileo_e1b_telemetry_decoder.cc
sbas_l1_telemetry_decoder.cc
galileo_e5a_telemetry_decoder.cc
glonass_l1_ca_telemetry_decoder.cc
glonass_l2_ca_telemetry_decoder.cc
glonass_l2_ca_telemetry_decoder.cc
)
set(TELEMETRY_DECODER_ADAPTER_HEADERS
gps_l1_ca_telemetry_decoder.h
gps_l2c_telemetry_decoder.h
gps_l5_telemetry_decoder.h
gps_l5_telemetry_decoder.h
galileo_e1b_telemetry_decoder.h
sbas_l1_telemetry_decoder.h
galileo_e5a_telemetry_decoder.h
glonass_l1_ca_telemetry_decoder.h
glonass_l2_ca_telemetry_decoder.h
glonass_l2_ca_telemetry_decoder.h
)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/telemetry_decoder/gnuradio_blocks
${CMAKE_SOURCE_DIR}/src/algorithms/telemetry_decoder/libs
${CMAKE_SOURCE_DIR}/src/algorithms/telemetry_decoder/libs/libswiftcnav
${Boost_INCLUDE_DIRS}
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/telemetry_decoder/gnuradio_blocks
${CMAKE_SOURCE_DIR}/src/algorithms/telemetry_decoder/libs
${CMAKE_SOURCE_DIR}/src/algorithms/telemetry_decoder/libs/libswiftcnav
${Boost_INCLUDE_DIRS}
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
)
list(SORT TELEMETRY_DECODER_ADAPTER_HEADERS)
list(SORT TELEMETRY_DECODER_ADAPTER_SOURCES)
add_library(telemetry_decoder_adapters ${TELEMETRY_DECODER_ADAPTER_SOURCES} ${TELEMETRY_DECODER_ADAPTER_HEADERS})
add_library(telemetry_decoder_adapters
${TELEMETRY_DECODER_ADAPTER_SOURCES}
${TELEMETRY_DECODER_ADAPTER_HEADERS}
)
source_group(Headers FILES ${TELEMETRY_DECODER_ADAPTER_HEADERS})
target_link_libraries(telemetry_decoder_adapters telemetry_decoder_gr_blocks gnss_system_parameters ${GNURADIO_RUNTIME_LIBRARIES})
target_link_libraries(telemetry_decoder_adapters
telemetry_decoder_gr_blocks
gnss_system_parameters
${GNURADIO_RUNTIME_LIBRARIES}
)

View File

@ -17,45 +17,56 @@
#
set(TELEMETRY_DECODER_GR_BLOCKS_SOURCES
gps_l1_ca_telemetry_decoder_cc.cc
gps_l2c_telemetry_decoder_cc.cc
gps_l5_telemetry_decoder_cc.cc
sbas_l1_telemetry_decoder_cc.cc
glonass_l1_ca_telemetry_decoder_cc.cc
glonass_l2_ca_telemetry_decoder_cc.cc
galileo_telemetry_decoder_cc.cc
gps_l1_ca_telemetry_decoder_cc.cc
gps_l2c_telemetry_decoder_cc.cc
gps_l5_telemetry_decoder_cc.cc
sbas_l1_telemetry_decoder_cc.cc
glonass_l1_ca_telemetry_decoder_cc.cc
glonass_l2_ca_telemetry_decoder_cc.cc
galileo_telemetry_decoder_cc.cc
)
set(TELEMETRY_DECODER_GR_BLOCKS_HEADERS
gps_l1_ca_telemetry_decoder_cc.h
gps_l2c_telemetry_decoder_cc.h
gps_l5_telemetry_decoder_cc.h
sbas_l1_telemetry_decoder_cc.h
glonass_l1_ca_telemetry_decoder_cc.h
glonass_l2_ca_telemetry_decoder_cc.h
galileo_telemetry_decoder_cc.h
gps_l1_ca_telemetry_decoder_cc.h
gps_l2c_telemetry_decoder_cc.h
gps_l5_telemetry_decoder_cc.h
sbas_l1_telemetry_decoder_cc.h
glonass_l1_ca_telemetry_decoder_cc.h
glonass_l2_ca_telemetry_decoder_cc.h
galileo_telemetry_decoder_cc.h
)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/telemetry_decoder/libs
${CMAKE_SOURCE_DIR}/src/algorithms/telemetry_decoder/libs/libswiftcnav
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${VOLK_GNSSSDR_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/telemetry_decoder/libs
${CMAKE_SOURCE_DIR}/src/algorithms/telemetry_decoder/libs/libswiftcnav
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${VOLK_GNSSSDR_INCLUDE_DIRS}
)
list(SORT TELEMETRY_DECODER_GR_BLOCKS_HEADERS)
list(SORT TELEMETRY_DECODER_GR_BLOCKS_SOURCES)
add_library(telemetry_decoder_gr_blocks ${TELEMETRY_DECODER_GR_BLOCKS_SOURCES} ${TELEMETRY_DECODER_GR_BLOCKS_HEADERS})
source_group(Headers FILES ${TELEMETRY_DECODER_GR_BLOCKS_HEADERS})
target_link_libraries(telemetry_decoder_gr_blocks telemetry_decoder_libswiftcnav telemetry_decoder_lib gnss_system_parameters ${GNURADIO_RUNTIME_LIBRARIES} ${VOLK_GNSSSDR_LIBRARIES})
add_library(telemetry_decoder_gr_blocks
${TELEMETRY_DECODER_GR_BLOCKS_SOURCES}
${TELEMETRY_DECODER_GR_BLOCKS_HEADERS}
)
if(NOT VOLK_GNSSSDR_FOUND)
add_dependencies(telemetry_decoder_gr_blocks volk_gnsssdr_module)
endif(NOT VOLK_GNSSSDR_FOUND)
source_group(Headers FILES ${TELEMETRY_DECODER_GR_BLOCKS_HEADERS})
target_link_libraries(telemetry_decoder_gr_blocks
telemetry_decoder_libswiftcnav
telemetry_decoder_lib
gnss_system_parameters
${GNURADIO_RUNTIME_LIBRARIES}
${VOLK_GNSSSDR_LIBRARIES}
)
if(NOT VOLKGNSSSDR_FOUND)
add_dependencies(telemetry_decoder_gr_blocks volk_gnsssdr_module)
endif()

View File

@ -16,31 +16,36 @@
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
#
add_subdirectory(libswiftcnav)
set(TELEMETRY_DECODER_LIB_SOURCES
viterbi_decoder.cc
viterbi_decoder.cc
)
set(TELEMETRY_DECODER_LIB_HEADERS
viterbi_decoder.h
convolutional.h
viterbi_decoder.h
convolutional.h
)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/telemetry_decoder/adapters
${Boost_INCLUDE_DIRS}
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/telemetry_decoder/adapters
${Boost_INCLUDE_DIRS}
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
)
list(SORT TELEMETRY_DECODER_LIB_HEADERS)
list(SORT TELEMETRY_DECODER_LIB_SOURCES)
add_library(telemetry_decoder_lib ${TELEMETRY_DECODER_LIB_SOURCES} ${TELEMETRY_DECODER_LIB_HEADERS})
add_library(telemetry_decoder_lib
${TELEMETRY_DECODER_LIB_SOURCES}
${TELEMETRY_DECODER_LIB_HEADERS}
)
source_group(Headers FILES ${TELEMETRY_DECODER_LIB_HEADERS})
target_link_libraries(telemetry_decoder_lib gnss_system_parameters)

View File

@ -16,28 +16,34 @@
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
#
set(TELEMETRY_DECODER_LIBSWIFTCNAV_SOURCES
cnav_msg.c
bits.c
edc.c
viterbi27.c
set(TELEMETRY_DECODER_LIBSWIFTCNAV_SOURCES
cnav_msg.c
bits.c
edc.c
viterbi27.c
)
set(TELEMETRY_DECODER_LIBSWIFTCNAV_HEADERS
cnav_msg.h
bits.h
edc.h
swift_common.h
fec.h
set(TELEMETRY_DECODER_LIBSWIFTCNAV_HEADERS
cnav_msg.h
bits.h
edc.h
swift_common.h
fec.h
)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
)
list(SORT TELEMETRY_DECODER_LIBSWIFTCNAV_HEADERS)
list(SORT TELEMETRY_DECODER_LIBSWIFTCNAV_SOURCES)
add_library(telemetry_decoder_libswiftcnav STATIC ${TELEMETRY_DECODER_LIBSWIFTCNAV_SOURCES} ${TELEMETRY_DECODER_LIBSWIFTCNAV_HEADERS})
add_library(telemetry_decoder_libswiftcnav STATIC
${TELEMETRY_DECODER_LIBSWIFTCNAV_SOURCES}
${TELEMETRY_DECODER_LIBSWIFTCNAV_HEADERS}
)
source_group(Headers FILES ${TELEMETRY_DECODER_LIBSWIFTCNAV_HEADERS})
set_target_properties(telemetry_decoder_libswiftcnav PROPERTIES LINKER_LANGUAGE C)
set_target_properties(telemetry_decoder_libswiftcnav
PROPERTIES LINKER_LANGUAGE C)

View File

@ -16,81 +16,103 @@
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
#
if(ENABLE_CUDA)
set(OPT_TRACKING_ADAPTERS_SOURCES ${OPT_TRACKING_ADAPTERS_SOURCES} gps_l1_ca_dll_pll_tracking_gpu.cc)
set(OPT_TRACKING_ADAPTERS_HEADERS ${OPT_TRACKING_ADAPTERS_HEADERS} gps_l1_ca_dll_pll_tracking_gpu.h)
set(OPT_TRACKING_INCLUDE_DIRS ${OPT_TRACKING_INCLUDE_DIRS} ${CUDA_INCLUDE_DIRS})
endif(ENABLE_CUDA)
set(OPT_TRACKING_ADAPTERS_SOURCES
${OPT_TRACKING_ADAPTERS_SOURCES}
gps_l1_ca_dll_pll_tracking_gpu.cc
)
set(OPT_TRACKING_ADAPTERS_HEADERS
${OPT_TRACKING_ADAPTERS_HEADERS}
gps_l1_ca_dll_pll_tracking_gpu.h
)
set(OPT_TRACKING_INCLUDE_DIRS
${OPT_TRACKING_INCLUDE_DIRS}
${CUDA_INCLUDE_DIRS}
)
endif()
if(ENABLE_FPGA)
set(OPT_TRACKING_ADAPTERS_SOURCES ${OPT_TRACKING_ADAPTERS_SOURCES}
gps_l1_ca_dll_pll_tracking_fpga.cc
gps_l2_m_dll_pll_tracking_fpga.cc
galileo_e1_dll_pll_veml_tracking_fpga.cc
galileo_e5a_dll_pll_tracking_fpga.cc
gps_l5_dll_pll_tracking_fpga.cc)
set(OPT_TRACKING_ADAPTERS_HEADERS ${OPT_TRACKING_ADAPTERS_HEADERS}
gps_l1_ca_dll_pll_tracking_fpga.h
gps_l2_m_dll_pll_tracking_fpga.h
galileo_e1_dll_pll_veml_tracking_fpga.h
galileo_e5a_dll_pll_tracking_fpga.h
gps_l5_dll_pll_tracking_fpga.h)
endif(ENABLE_FPGA)
set(OPT_TRACKING_ADAPTERS_SOURCES
${OPT_TRACKING_ADAPTERS_SOURCES}
gps_l1_ca_dll_pll_tracking_fpga.cc
gps_l2_m_dll_pll_tracking_fpga.cc
galileo_e1_dll_pll_veml_tracking_fpga.cc
galileo_e5a_dll_pll_tracking_fpga.cc
gps_l5_dll_pll_tracking_fpga.cc
)
set(OPT_TRACKING_ADAPTERS_HEADERS
${OPT_TRACKING_ADAPTERS_HEADERS}
gps_l1_ca_dll_pll_tracking_fpga.h
gps_l2_m_dll_pll_tracking_fpga.h
galileo_e1_dll_pll_veml_tracking_fpga.h
galileo_e5a_dll_pll_tracking_fpga.h
gps_l5_dll_pll_tracking_fpga.h
)
endif()
set(TRACKING_ADAPTER_SOURCES
galileo_e1_dll_pll_veml_tracking.cc
galileo_e1_tcp_connector_tracking.cc
gps_l1_ca_dll_pll_tracking.cc
gps_l1_ca_dll_pll_c_aid_tracking.cc
gps_l1_ca_tcp_connector_tracking.cc
galileo_e5a_dll_pll_tracking.cc
gps_l2_m_dll_pll_tracking.cc
glonass_l1_ca_dll_pll_tracking.cc
glonass_l1_ca_dll_pll_c_aid_tracking.cc
gps_l1_ca_kf_tracking.cc
gps_l5_dll_pll_tracking.cc
glonass_l2_ca_dll_pll_tracking.cc
glonass_l2_ca_dll_pll_c_aid_tracking.cc
${OPT_TRACKING_ADAPTERS_SOURCES}
galileo_e1_dll_pll_veml_tracking.cc
galileo_e1_tcp_connector_tracking.cc
gps_l1_ca_dll_pll_tracking.cc
gps_l1_ca_dll_pll_c_aid_tracking.cc
gps_l1_ca_tcp_connector_tracking.cc
galileo_e5a_dll_pll_tracking.cc
gps_l2_m_dll_pll_tracking.cc
glonass_l1_ca_dll_pll_tracking.cc
glonass_l1_ca_dll_pll_c_aid_tracking.cc
gps_l1_ca_kf_tracking.cc
gps_l5_dll_pll_tracking.cc
glonass_l2_ca_dll_pll_tracking.cc
glonass_l2_ca_dll_pll_c_aid_tracking.cc
${OPT_TRACKING_ADAPTERS_SOURCES}
)
set(TRACKING_ADAPTER_HEADERS
galileo_e1_dll_pll_veml_tracking.h
galileo_e1_tcp_connector_tracking.h
gps_l1_ca_dll_pll_tracking.h
gps_l1_ca_dll_pll_c_aid_tracking.h
gps_l1_ca_tcp_connector_tracking.h
galileo_e5a_dll_pll_tracking.h
gps_l2_m_dll_pll_tracking.h
glonass_l1_ca_dll_pll_tracking.h
glonass_l1_ca_dll_pll_c_aid_tracking.h
gps_l1_ca_kf_tracking.h
gps_l5_dll_pll_tracking.h
glonass_l2_ca_dll_pll_tracking.h
glonass_l2_ca_dll_pll_c_aid_tracking.h
${OPT_TRACKING_ADAPTERS_HEADERS}
galileo_e1_dll_pll_veml_tracking.h
galileo_e1_tcp_connector_tracking.h
gps_l1_ca_dll_pll_tracking.h
gps_l1_ca_dll_pll_c_aid_tracking.h
gps_l1_ca_tcp_connector_tracking.h
galileo_e5a_dll_pll_tracking.h
gps_l2_m_dll_pll_tracking.h
glonass_l1_ca_dll_pll_tracking.h
glonass_l1_ca_dll_pll_c_aid_tracking.h
gps_l1_ca_kf_tracking.h
gps_l5_dll_pll_tracking.h
glonass_l2_ca_dll_pll_tracking.h
glonass_l2_ca_dll_pll_c_aid_tracking.h
${OPT_TRACKING_ADAPTERS_HEADERS}
)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/tracking/gnuradio_blocks
${CMAKE_SOURCE_DIR}/src/algorithms/tracking/libs
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${ARMADILLO_INCLUDE_DIRS}
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${VOLK_GNSSSDR_INCLUDE_DIRS}
${OPT_TRACKING_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/tracking/gnuradio_blocks
${CMAKE_SOURCE_DIR}/src/algorithms/tracking/libs
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${ARMADILLO_INCLUDE_DIRS}
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${VOLK_GNSSSDR_INCLUDE_DIRS}
${OPT_TRACKING_INCLUDE_DIRS}
)
list(SORT TRACKING_ADAPTER_HEADERS)
list(SORT TRACKING_ADAPTER_SOURCES)
add_library(tracking_adapters ${TRACKING_ADAPTER_SOURCES} ${TRACKING_ADAPTER_HEADERS})
add_library(tracking_adapters
${TRACKING_ADAPTER_SOURCES}
${TRACKING_ADAPTER_HEADERS}
)
source_group(Headers FILES ${TRACKING_ADAPTER_HEADERS})
target_link_libraries(tracking_adapters tracking_gr_blocks gnss_sp_libs gnss_sdr_flags)
target_link_libraries(tracking_adapters
tracking_gr_blocks
gnss_sp_libs
gnss_sdr_flags
)

View File

@ -17,86 +17,120 @@
#
if(ENABLE_CUDA)
set(OPT_TRACKING_BLOCKS_SOURCES ${OPT_TRACKING_BLOCKS_SOURCES} gps_l1_ca_dll_pll_tracking_gpu_cc.cc)
set(OPT_TRACKING_BLOCKS_HEADERS ${OPT_TRACKING_BLOCKS_HEADERS} gps_l1_ca_dll_pll_tracking_gpu_cc.h)
set(OPT_TRACKING_INCLUDES ${OPT_TRACKING_INCLUDES} ${CUDA_INCLUDE_DIRS})
set(OPT_TRACKING_LIBRARIES ${OPT_TRACKING_LIBRARIES} ${CUDA_LIBRARIES})
endif(ENABLE_CUDA)
set(OPT_TRACKING_BLOCKS_SOURCES
${OPT_TRACKING_BLOCKS_SOURCES}
gps_l1_ca_dll_pll_tracking_gpu_cc.cc
)
set(OPT_TRACKING_BLOCKS_HEADERS
${OPT_TRACKING_BLOCKS_HEADERS}
gps_l1_ca_dll_pll_tracking_gpu_cc.h
)
set(OPT_TRACKING_INCLUDES
${OPT_TRACKING_INCLUDES}
${CUDA_INCLUDE_DIRS}
)
set(OPT_TRACKING_LIBRARIES
${OPT_TRACKING_LIBRARIES}
${CUDA_LIBRARIES}
)
endif()
if(ENABLE_FPGA)
set(OPT_TRACKING_BLOCKS_SOURCES ${OPT_TRACKING_BLOCKS_SOURCES} dll_pll_veml_tracking_fpga.cc)
set(OPT_TRACKING_BLOCKS_HEADERS ${OPT_TRACKING_BLOCKS_HEADERS} dll_pll_veml_tracking_fpga.h)
endif(ENABLE_FPGA)
set(OPT_TRACKING_BLOCKS_SOURCES
${OPT_TRACKING_BLOCKS_SOURCES}
dll_pll_veml_tracking_fpga.cc
)
set(OPT_TRACKING_BLOCKS_HEADERS
${OPT_TRACKING_BLOCKS_HEADERS}
dll_pll_veml_tracking_fpga.h
)
endif()
set(TRACKING_GR_BLOCKS_SOURCES
galileo_e1_tcp_connector_tracking_cc.cc
gps_l1_ca_tcp_connector_tracking_cc.cc
gps_l1_ca_dll_pll_c_aid_tracking_cc.cc
gps_l1_ca_dll_pll_c_aid_tracking_sc.cc
glonass_l1_ca_dll_pll_tracking_cc.cc
glonass_l1_ca_dll_pll_c_aid_tracking_cc.cc
glonass_l1_ca_dll_pll_c_aid_tracking_sc.cc
gps_l1_ca_kf_tracking_cc.cc
glonass_l2_ca_dll_pll_tracking_cc.cc
glonass_l2_ca_dll_pll_c_aid_tracking_cc.cc
glonass_l2_ca_dll_pll_c_aid_tracking_sc.cc
dll_pll_veml_tracking.cc
${OPT_TRACKING_BLOCKS_SOURCES}
galileo_e1_tcp_connector_tracking_cc.cc
gps_l1_ca_tcp_connector_tracking_cc.cc
gps_l1_ca_dll_pll_c_aid_tracking_cc.cc
gps_l1_ca_dll_pll_c_aid_tracking_sc.cc
glonass_l1_ca_dll_pll_tracking_cc.cc
glonass_l1_ca_dll_pll_c_aid_tracking_cc.cc
glonass_l1_ca_dll_pll_c_aid_tracking_sc.cc
gps_l1_ca_kf_tracking_cc.cc
glonass_l2_ca_dll_pll_tracking_cc.cc
glonass_l2_ca_dll_pll_c_aid_tracking_cc.cc
glonass_l2_ca_dll_pll_c_aid_tracking_sc.cc
dll_pll_veml_tracking.cc
${OPT_TRACKING_BLOCKS_SOURCES}
)
set(TRACKING_GR_BLOCKS_HEADERS
galileo_e1_tcp_connector_tracking_cc.h
gps_l1_ca_tcp_connector_tracking_cc.h
gps_l1_ca_dll_pll_c_aid_tracking_cc.h
gps_l1_ca_dll_pll_c_aid_tracking_sc.h
glonass_l1_ca_dll_pll_tracking_cc.h
glonass_l1_ca_dll_pll_c_aid_tracking_cc.h
glonass_l1_ca_dll_pll_c_aid_tracking_sc.h
gps_l1_ca_kf_tracking_cc.h
glonass_l2_ca_dll_pll_tracking_cc.h
glonass_l2_ca_dll_pll_c_aid_tracking_cc.h
glonass_l2_ca_dll_pll_c_aid_tracking_sc.h
dll_pll_veml_tracking.h
${OPT_TRACKING_BLOCKS_HEADERS}
galileo_e1_tcp_connector_tracking_cc.h
gps_l1_ca_tcp_connector_tracking_cc.h
gps_l1_ca_dll_pll_c_aid_tracking_cc.h
gps_l1_ca_dll_pll_c_aid_tracking_sc.h
glonass_l1_ca_dll_pll_tracking_cc.h
glonass_l1_ca_dll_pll_c_aid_tracking_cc.h
glonass_l1_ca_dll_pll_c_aid_tracking_sc.h
gps_l1_ca_kf_tracking_cc.h
glonass_l2_ca_dll_pll_tracking_cc.h
glonass_l2_ca_dll_pll_c_aid_tracking_cc.h
glonass_l2_ca_dll_pll_c_aid_tracking_sc.h
dll_pll_veml_tracking.h
${OPT_TRACKING_BLOCKS_HEADERS}
)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/tracking/libs
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${ARMADILLO_INCLUDE_DIRS}
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${VOLK_GNSSSDR_INCLUDE_DIRS}
${OPT_TRACKING_INCLUDES}
${MATIO_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/tracking/libs
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${ARMADILLO_INCLUDE_DIRS}
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${VOLK_GNSSSDR_INCLUDE_DIRS}
${OPT_TRACKING_INCLUDES}
${MATIO_INCLUDE_DIRS}
)
if(ENABLE_GENERIC_ARCH)
add_definitions( -DGENERIC_ARCH=1 )
endif(ENABLE_GENERIC_ARCH)
add_definitions(-DGENERIC_ARCH=1)
endif()
list(SORT TRACKING_GR_BLOCKS_HEADERS)
list(SORT TRACKING_GR_BLOCKS_SOURCES)
add_library(tracking_gr_blocks ${TRACKING_GR_BLOCKS_SOURCES} ${TRACKING_GR_BLOCKS_HEADERS})
add_library(tracking_gr_blocks
${TRACKING_GR_BLOCKS_SOURCES}
${TRACKING_GR_BLOCKS_HEADERS}
)
source_group(Headers FILES ${TRACKING_GR_BLOCKS_HEADERS})
target_link_libraries(tracking_gr_blocks tracking_lib ${GNURADIO_RUNTIME_LIBRARIES} gnss_sdr_flags gnss_sp_libs ${Boost_LIBRARIES} ${VOLK_GNSSSDR_LIBRARIES} ${MATIO_LIBRARIES} ${OPT_TRACKING_LIBRARIES})
target_link_libraries(tracking_gr_blocks
tracking_lib
${GNURADIO_RUNTIME_LIBRARIES}
gnss_sdr_flags gnss_sp_libs
${Boost_LIBRARIES}
${VOLK_GNSSSDR_LIBRARIES}
${MATIO_LIBRARIES}
${OPT_TRACKING_LIBRARIES}
)
if(NOT VOLK_GNSSSDR_FOUND)
if(NOT VOLKGNSSSDR_FOUND)
if(MATIO_FOUND)
add_dependencies(tracking_gr_blocks volk_gnsssdr_module)
else(MATIO_FOUND)
add_dependencies(tracking_gr_blocks volk_gnsssdr_module matio-${GNSSSDR_MATIO_LOCAL_VERSION})
endif(MATIO_FOUND)
else(NOT VOLK_GNSSSDR_FOUND)
else()
add_dependencies(tracking_gr_blocks volk_gnsssdr_module
matio-${GNSSSDR_MATIO_LOCAL_VERSION}
)
endif()
else()
if(NOT MATIO_FOUND)
add_dependencies(tracking_gr_blocks matio-${GNSSSDR_MATIO_LOCAL_VERSION})
endif(NOT MATIO_FOUND)
endif(NOT VOLK_GNSSSDR_FOUND)
add_dependencies(tracking_gr_blocks
matio-${GNSSSDR_MATIO_LOCAL_VERSION}
)
endif()
endif()

View File

@ -1,8 +1,8 @@
/*!
* \file dll_pll_veml_tracking.cc
* \brief Implementation of a code DLL + carrier PLL tracking block.
* \author Javier Arribas, 2018. jarribas(at)cttc.es
* \author Antonio Ramos, 2018 antonio.ramosdet(at)gmail.com
* Javier Arribas, 2018. jarribas(at)cttc.es
*
* Code DLL + carrier PLL according to the algorithms described in:
* [1] K.Borre, D.M.Akos, N.Bertelsen, P.Rinder, and S.H.Jensen,
@ -402,7 +402,6 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl
d_carrier_phase_step_rad = 0.0;
d_carrier_phase_rate_step_rad = 0.0;
d_rem_code_phase_chips = 0.0;
d_code_phase_samples = 0.0;
d_last_prompt = gr_complex(0.0, 0.0);
d_state = 0; // initial state: standby
clear_tracking_vars();
@ -464,36 +463,6 @@ void dll_pll_veml_tracking::start_tracking()
d_acq_carrier_doppler_hz = d_acquisition_gnss_synchro->Acq_doppler_hz;
d_acq_sample_stamp = d_acquisition_gnss_synchro->Acq_samplestamp_samples;
int64_t acq_trk_diff_samples = static_cast<int64_t>(d_sample_counter) - static_cast<int64_t>(d_acq_sample_stamp);
double acq_trk_diff_seconds = static_cast<double>(acq_trk_diff_samples) / trk_parameters.fs_in;
DLOG(INFO) << "Number of samples between Acquisition and Tracking = " << acq_trk_diff_samples;
DLOG(INFO) << "Number of seconds between Acquisition and Tracking = " << acq_trk_diff_seconds;
// Doppler effect Fd = (C / (C + Vr)) * F
double radial_velocity = (d_signal_carrier_freq + d_acq_carrier_doppler_hz) / d_signal_carrier_freq;
// new chip and PRN sequence periods based on acq Doppler
d_code_freq_chips = radial_velocity * d_code_chip_rate;
d_code_phase_step_chips = d_code_freq_chips / trk_parameters.fs_in;
d_code_phase_rate_step_chips = 0.0;
double T_chip_mod_seconds = 1.0 / d_code_freq_chips;
double T_prn_mod_seconds = T_chip_mod_seconds * static_cast<double>(d_code_length_chips);
double T_prn_mod_samples = T_prn_mod_seconds * trk_parameters.fs_in;
//d_current_prn_length_samples = std::round(T_prn_mod_samples);
d_current_prn_length_samples = std::floor(T_prn_mod_samples);
double T_prn_true_seconds = static_cast<double>(d_code_length_chips) / d_code_chip_rate;
double T_prn_true_samples = T_prn_true_seconds * trk_parameters.fs_in;
double T_prn_diff_seconds = T_prn_true_seconds - T_prn_mod_seconds;
double N_prn_diff = acq_trk_diff_seconds / T_prn_true_seconds;
double corrected_acq_phase_samples = std::fmod(d_acq_code_phase_samples + T_prn_diff_seconds * N_prn_diff * trk_parameters.fs_in, T_prn_true_samples);
if (corrected_acq_phase_samples < 0.0)
{
corrected_acq_phase_samples += T_prn_mod_samples;
}
double delay_correction_samples = d_acq_code_phase_samples - corrected_acq_phase_samples;
d_acq_code_phase_samples = corrected_acq_phase_samples;
d_carrier_doppler_hz = d_acq_carrier_doppler_hz;
d_carrier_phase_step_rad = PI_2 * d_carrier_doppler_hz / trk_parameters.fs_in;
d_carrier_phase_rate_step_rad = 0.0;
@ -590,7 +559,6 @@ void dll_pll_veml_tracking::start_tracking()
d_local_code_shift_chips[2] = trk_parameters.early_late_space_chips * static_cast<float>(d_code_samples_per_chip);
}
d_code_phase_samples = d_acq_code_phase_samples;
d_code_loop_filter.set_DLL_BW(trk_parameters.dll_bw_hz);
d_carrier_loop_filter.set_PLL_BW(trk_parameters.pll_bw_hz);
d_carrier_loop_filter.set_pdi(static_cast<float>(d_code_period));
@ -598,16 +566,13 @@ void dll_pll_veml_tracking::start_tracking()
// DEBUG OUTPUT
std::cout << "Tracking of " << systemName << " " << signal_pretty_name << " signal started on channel " << d_channel << " for satellite " << Gnss_Satellite(systemName, d_acquisition_gnss_synchro->PRN) << std::endl;
LOG(INFO) << "Starting tracking of satellite " << Gnss_Satellite(systemName, d_acquisition_gnss_synchro->PRN) << " on channel " << d_channel;
DLOG(INFO) << "Starting tracking of satellite " << Gnss_Satellite(systemName, d_acquisition_gnss_synchro->PRN) << " on channel " << d_channel;
// enable tracking pull-in
d_state = 1;
d_cloop = true;
d_Prompt_buffer_deque.clear();
d_last_prompt = gr_complex(0.0, 0.0);
LOG(INFO) << "PULL-IN Doppler [Hz] = " << d_carrier_doppler_hz
<< ". Code Phase correction [samples] = " << delay_correction_samples
<< ". PULL-IN Code Phase [samples] = " << d_acq_code_phase_samples;
}
@ -1391,17 +1356,34 @@ int dll_pll_veml_tracking::general_work(int noutput_items __attribute__((unused)
case 1: // Pull-in
{
// Signal alignment (skip samples until the incoming signal is aligned with local replica)
uint64_t acq_to_trk_delay_samples = static_cast<uint64_t>(d_sample_counter - d_acq_sample_stamp);
double acq_trk_shif_correction_samples = static_cast<double>(d_current_prn_length_samples) - std::fmod(static_cast<double>(acq_to_trk_delay_samples), static_cast<double>(d_current_prn_length_samples));
int32_t samples_offset = std::round(d_acq_code_phase_samples + acq_trk_shif_correction_samples);
if (samples_offset < 0)
{
samples_offset = 0;
}
d_acc_carrier_phase_rad -= d_carrier_phase_step_rad * d_acq_code_phase_samples;
int64_t acq_trk_diff_samples = static_cast<int64_t>(d_sample_counter) - static_cast<int64_t>(d_acq_sample_stamp);
double acq_trk_diff_seconds = static_cast<double>(acq_trk_diff_samples) / trk_parameters.fs_in;
double delta_trk_to_acq_prn_start_samples = static_cast<double>(acq_trk_diff_samples) - d_acq_code_phase_samples;
// Doppler effect Fd = (C / (C + Vr)) * F
double radial_velocity = (d_signal_carrier_freq + d_acq_carrier_doppler_hz) / d_signal_carrier_freq;
// new chip and PRN sequence periods based on acq Doppler
d_code_freq_chips = radial_velocity * d_code_chip_rate;
d_code_freq_chips = d_code_chip_rate;
d_code_phase_step_chips = d_code_freq_chips / trk_parameters.fs_in;
d_code_phase_rate_step_chips = 0.0;
double T_chip_mod_seconds = 1.0 / d_code_freq_chips;
double T_prn_mod_seconds = T_chip_mod_seconds * static_cast<double>(d_code_length_chips);
double T_prn_mod_samples = T_prn_mod_seconds * trk_parameters.fs_in;
d_acq_code_phase_samples = T_prn_mod_samples - std::fmod(delta_trk_to_acq_prn_start_samples, T_prn_mod_samples);
d_current_prn_length_samples = round(T_prn_mod_samples);
int32_t samples_offset = round(d_acq_code_phase_samples);
d_acc_carrier_phase_rad -= d_carrier_phase_step_rad * static_cast<double>(samples_offset);
d_state = 2;
d_sample_counter += static_cast<uint64_t>(samples_offset); // count for the processed samples
consume_each(samples_offset); // shift input to perform alignment with local replica
d_sample_counter += samples_offset; // count for the processed samples
DLOG(INFO) << "Number of samples between Acquisition and Tracking = " << acq_trk_diff_samples << " ( " << acq_trk_diff_seconds << " s)";
DLOG(INFO) << "PULL-IN Doppler [Hz] = " << d_carrier_doppler_hz
<< ". PULL-IN Code Phase [samples] = " << d_acq_code_phase_samples;
consume_each(samples_offset); // shift input to perform alignment with local replica
return 0;
}
case 2: // Wide tracking and symbol synchronization

Some files were not shown because too many files have changed in this diff Show More