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 vtl_experimental
This commit is contained in:
commit
d710eb946f
@ -327,7 +327,7 @@ set(GNSSSDR_GLOG_LOCAL_VERSION "0.4.0")
|
||||
set(GNSSSDR_ARMADILLO_LOCAL_VERSION "10.1.x")
|
||||
set(GNSSSDR_GTEST_LOCAL_VERSION "1.10.0")
|
||||
set(GNSSSDR_GNSS_SIM_LOCAL_VERSION "master")
|
||||
set(GNSSSDR_GPSTK_LOCAL_VERSION "3.0.0")
|
||||
set(GNSSSDR_GPSTK_LOCAL_VERSION "8.0.0")
|
||||
set(GNSSSDR_MATIO_LOCAL_VERSION "1.5.18")
|
||||
set(GNSSSDR_PUGIXML_LOCAL_VERSION "1.11")
|
||||
set(GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION "3.14.0")
|
||||
@ -601,10 +601,16 @@ endif()
|
||||
# Detect availability of std::filesystem and set C++ standard accordingly
|
||||
################################################################################
|
||||
set(FILESYSTEM_FOUND FALSE)
|
||||
if(NOT ENABLE_OWN_GPSTK)
|
||||
find_package(GPSTK)
|
||||
set_package_properties(GPSTK PROPERTIES
|
||||
PURPOSE "Used in some Extra Tests."
|
||||
)
|
||||
endif()
|
||||
if(NOT (GNURADIO_VERSION VERSION_LESS 3.8) AND LOG4CPP_READY_FOR_CXX17)
|
||||
# Check if we have std::filesystem
|
||||
if(NOT (CMAKE_VERSION VERSION_LESS 3.8))
|
||||
if(NOT (ENABLE_UNIT_TESTING_EXTRA OR ENABLE_SYSTEM_TESTING_EXTRA OR ENABLE_FPGA)) # Fix for GPTSk
|
||||
if(NOT GPSTK_FOUND OR NOT (GPSTK_FOUND AND GPSTK_OLDER_THAN_8)) # Fix for GPSTk < 8.0.0
|
||||
find_package(FILESYSTEM COMPONENTS Final Experimental)
|
||||
set_package_properties(FILESYSTEM PROPERTIES
|
||||
URL "https://en.cppreference.com/w/cpp/filesystem"
|
||||
@ -613,7 +619,7 @@ if(NOT (GNURADIO_VERSION VERSION_LESS 3.8) AND LOG4CPP_READY_FOR_CXX17)
|
||||
TYPE OPTIONAL
|
||||
)
|
||||
endif()
|
||||
if(${FILESYSTEM_FOUND})
|
||||
if(FILESYSTEM_FOUND)
|
||||
if(CMAKE_VERSION VERSION_LESS 3.13)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
else()
|
||||
@ -1123,15 +1129,15 @@ if(NOT VOLKGNSSSDR_FOUND)
|
||||
include(GNUInstallDirs)
|
||||
set(SUPPORTED_CPU_FEATURES_ARCH FALSE)
|
||||
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^mips")
|
||||
set(SUPPORTED_CPU_FEATURES_ARCH TRUE)
|
||||
set(SUPPORTED_CPU_FEATURES_ARCH TRUE)
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm")
|
||||
set(SUPPORTED_CPU_FEATURES_ARCH TRUE)
|
||||
set(SUPPORTED_CPU_FEATURES_ARCH TRUE)
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^aarch64")
|
||||
set(SUPPORTED_CPU_FEATURES_ARCH TRUE)
|
||||
set(SUPPORTED_CPU_FEATURES_ARCH TRUE)
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "(x86_64)|(AMD64|amd64)|(^i.86$)")
|
||||
set(SUPPORTED_CPU_FEATURES_ARCH TRUE)
|
||||
set(SUPPORTED_CPU_FEATURES_ARCH TRUE)
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)")
|
||||
set(SUPPORTED_CPU_FEATURES_ARCH TRUE)
|
||||
set(SUPPORTED_CPU_FEATURES_ARCH TRUE)
|
||||
endif()
|
||||
if(${CMAKE_INSTALL_LIBDIR} MATCHES lib64)
|
||||
set(VOLK_GNSSSDR_LIB_SUFFIX 64)
|
||||
@ -1187,15 +1193,15 @@ if(NOT VOLKGNSSSDR_FOUND)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT ORC_FOUND)
|
||||
set(ORC_LIBRARIES "")
|
||||
if(NOT ORC_LIBRARIES_STATIC)
|
||||
set(ORC_LIBRARIES_STATIC "")
|
||||
set(ORC_INCLUDE_DIRS "")
|
||||
endif()
|
||||
|
||||
add_library(volk_gnsssdr UNKNOWN IMPORTED)
|
||||
set_property(TARGET volk_gnsssdr PROPERTY IMPORTED_LOCATION ${CMAKE_BINARY_DIR}/volk_gnsssdr_module/install/lib${VOLK_GNSSSDR_LIB_SUFFIX}/libvolk_gnsssdr${CMAKE_STATIC_LIBRARY_SUFFIX})
|
||||
set(VOLK_GNSSSDR_INCLUDE_DIRS "${CMAKE_BINARY_DIR}/volk_gnsssdr_module/build/include/;${CMAKE_SOURCE_DIR}/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/include;${ORC_INCLUDE_DIRS}")
|
||||
set(VOLK_GNSSSDR_LIBRARIES volk_gnsssdr ${ORC_LIBRARIES})
|
||||
set(VOLK_GNSSSDR_LIBRARIES volk_gnsssdr ${ORC_LIBRARIES_STATIC})
|
||||
|
||||
if(NOT TARGET Volkgnsssdr::volkgnsssdr)
|
||||
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/volk_gnsssdr_module/build/include)
|
||||
|
@ -80,6 +80,10 @@ else()
|
||||
)
|
||||
endif()
|
||||
|
||||
if(GPSTK_FOUND AND NOT EXISTS ${GPSTK_INCLUDE_DIR}/gpstk/SatelliteSystem.hpp)
|
||||
set(GPSTK_OLDER_THAN_8 TRUE)
|
||||
endif()
|
||||
|
||||
set_package_properties(GPSTK PROPERTIES
|
||||
URL "https://github.com/SGL-UT/GPSTk"
|
||||
)
|
||||
|
@ -6,6 +6,11 @@
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
if(DEFINED __INCLUDED_GNSSSDR_CMAKE_FIND_ORC)
|
||||
return()
|
||||
endif()
|
||||
set(__INCLUDED_GNSSSDR_CMAKE_FIND_ORC TRUE)
|
||||
|
||||
if(NOT COMMAND feature_summary)
|
||||
include(FeatureSummary)
|
||||
endif()
|
||||
@ -60,6 +65,8 @@ find_path(ORC_LIBRARY_DIR
|
||||
HINTS ${PC_ORC_LIBDIR}
|
||||
PATHS ${ORC_ROOT_USER_PROVIDED}/lib
|
||||
${ORC_ROOT_USER_PROVIDED}/lib64
|
||||
${CMAKE_INSTALL_PREFIX}/lib
|
||||
${CMAKE_INSTALL_PREFIX}/lib64
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
/usr/lib/x86_64-linux-gnu
|
||||
@ -84,6 +91,54 @@ find_library(ORC_LIB orc-0.4
|
||||
HINTS ${PC_ORC_LIBRARY_DIRS}
|
||||
PATHS ${ORC_ROOT_USER_PROVIDED}/lib
|
||||
${ORC_ROOT_USER_PROVIDED}/lib64
|
||||
${CMAKE_INSTALL_PREFIX}/lib
|
||||
${CMAKE_INSTALL_PREFIX}/lib64
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
/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/local/lib
|
||||
/usr/local/lib64
|
||||
/opt/local/lib
|
||||
)
|
||||
|
||||
find_library(ORC_LIBRARY_STATIC ${CMAKE_STATIC_LIBRARY_PREFIX}orc-0.4${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
HINTS ${PC_ORC_LIBRARY_DIRS}
|
||||
PATHS ${ORC_ROOT}/lib
|
||||
${ORC_ROOT}/lib64
|
||||
${CMAKE_INSTALL_PREFIX}/lib
|
||||
${CMAKE_INSTALL_PREFIX}/lib64
|
||||
${ORC_ROOT_USER_PROVIDED}/lib
|
||||
${ORC_ROOT_USER_PROVIDED}/lib64
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
/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/local/lib
|
||||
/usr/local/lib64
|
||||
/opt/local/lib
|
||||
)
|
||||
|
||||
if(PC_ORC_VERSION)
|
||||
@ -95,6 +150,7 @@ 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_LIBRARIES_STATIC ${ORC_LIBRARY_STATIC})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(ORC "orc files" ORC_LIBRARY ORC_INCLUDE_DIR ORCC_EXECUTABLE)
|
||||
|
@ -128,12 +128,22 @@ endif()
|
||||
|
||||
mark_as_advanced(VOLK_LIBRARIES VOLK_INCLUDE_DIRS VOLK_VERSION)
|
||||
|
||||
if(NOT ORC_FOUND)
|
||||
find_package(ORC QUIET)
|
||||
endif()
|
||||
if(ORC_LIBRARIES_STATIC)
|
||||
set(VOLK_LINK_LIBRARIES ${VOLK_LIBRARIES} ${ORC_LIBRARIES_STATIC})
|
||||
set(VOLK_INCLUDE_DIRS ${VOLK_INCLUDE_DIRS} ${ORC_INCLUDE_DIRS})
|
||||
else()
|
||||
set(VOLK_LINK_LIBRARIES ${VOLK_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(VOLK_FOUND AND NOT TARGET Volk::volk)
|
||||
add_library(Volk::volk SHARED IMPORTED)
|
||||
set_target_properties(Volk::volk PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_LOCATION "${VOLK_LIBRARIES}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${VOLK_INCLUDE_DIRS}"
|
||||
INTERFACE_LINK_LIBRARIES "${VOLK_LIBRARIES}"
|
||||
INTERFACE_LINK_LIBRARIES "${VOLK_LINK_LIBRARIES}"
|
||||
)
|
||||
endif()
|
||||
|
@ -88,12 +88,22 @@ else()
|
||||
)
|
||||
endif()
|
||||
|
||||
if(NOT ORC_FOUND)
|
||||
find_package(ORC QUIET)
|
||||
endif()
|
||||
if(ORC_FOUND)
|
||||
set(VOLK_GNSSSDR_LINK_LIBRARIES ${VOLK_GNSSSDR_LIBRARIES} ${ORC_LIBRARIES})
|
||||
set(VOLK_GNSSSDR_INCLUDE_DIRS ${VOLK_GNSSSDR_INCLUDE_DIRS} ${ORC_INCLUDE_DIRS})
|
||||
else()
|
||||
set(VOLK_GNSSSDR_LINK_LIBRARIES ${VOLK_GNSSSDR_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(VOLKGNSSSDR_FOUND AND NOT TARGET Volkgnsssdr::volkgnsssdr)
|
||||
add_library(Volkgnsssdr::volkgnsssdr SHARED IMPORTED)
|
||||
set_target_properties(Volkgnsssdr::volkgnsssdr PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_LOCATION "${VOLK_GNSSSDR_LIBRARIES}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${VOLK_GNSSSDR_INCLUDE_DIRS}"
|
||||
INTERFACE_LINK_LIBRARIES "${VOLK_GNSSSDR_LIBRARIES}"
|
||||
INTERFACE_LINK_LIBRARIES "${VOLK_GNSSSDR_LINK_LIBRARIES}"
|
||||
)
|
||||
endif()
|
||||
|
@ -59,7 +59,8 @@ SPDX-FileCopyrightText: 2011-2020 Carles Fernandez-Prades <carles.fernandez@cttc
|
||||
everything is managed by the CMake scripts.
|
||||
- The `volk_gnsssdr` library can be built on Microsoft Windows and can execute
|
||||
SIMD instructions on that OS.
|
||||
- Fix building with `-DENABLE_CUDA=ON` for blocks implemented with CUDA.
|
||||
- Fixed building with `-DENABLE_CUDA=ON` for blocks implemented with CUDA.
|
||||
- Fixed linking against the ORC library if it is present in the system.
|
||||
|
||||
### Improvements in Usability:
|
||||
|
||||
|
@ -114,7 +114,7 @@ target_link_libraries(algorithms_libs
|
||||
Gnuradio::blocks
|
||||
PRIVATE
|
||||
core_system_parameters
|
||||
Volk::volk ${ORC_LIBRARIES}
|
||||
Volk::volk
|
||||
Volkgnsssdr::volkgnsssdr
|
||||
Gflags::gflags
|
||||
Glog::glog
|
||||
|
@ -11,7 +11,7 @@
|
||||
########################################################################
|
||||
# Project setup
|
||||
########################################################################
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
cmake_minimum_required(VERSION 2.8.12...3.19)
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE "Release")
|
||||
endif()
|
||||
|
@ -56,6 +56,8 @@ find_path(ORC_LIBRARY_DIR
|
||||
HINTS ${PC_ORC_LIBDIR}
|
||||
PATHS ${ORC_ROOT_USER_PROVIDED}/lib
|
||||
${ORC_ROOT_USER_PROVIDED}/lib64
|
||||
${CMAKE_INSTALL_PREFIX}/lib
|
||||
${CMAKE_INSTALL_PREFIX}/lib64
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
/usr/lib/x86_64-linux-gnu
|
||||
@ -80,6 +82,54 @@ find_library(ORC_LIB orc-0.4
|
||||
HINTS ${PC_ORC_LIBRARY_DIRS}
|
||||
PATHS ${ORC_ROOT_USER_PROVIDED}/lib
|
||||
${ORC_ROOT_USER_PROVIDED}/lib64
|
||||
${CMAKE_INSTALL_PREFIX}/lib
|
||||
${CMAKE_INSTALL_PREFIX}/lib64
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
/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/local/lib
|
||||
/usr/local/lib64
|
||||
/opt/local/lib
|
||||
)
|
||||
|
||||
find_library(ORC_LIBRARY_STATIC ${CMAKE_STATIC_LIBRARY_PREFIX}orc-0.4${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
HINTS ${PC_ORC_LIBRARY_DIRS}
|
||||
PATHS ${ORC_ROOT}/lib
|
||||
${ORC_ROOT}/lib64
|
||||
${CMAKE_INSTALL_PREFIX}/lib
|
||||
${CMAKE_INSTALL_PREFIX}/lib64
|
||||
${ORC_ROOT_USER_PROVIDED}/lib
|
||||
${ORC_ROOT_USER_PROVIDED}/lib64
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
/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/local/lib
|
||||
/usr/local/lib64
|
||||
/opt/local/lib
|
||||
)
|
||||
|
||||
if(PC_ORC_VERSION)
|
||||
@ -91,8 +141,12 @@ 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_LIBRARIES_STATIC ${ORC_LIBRARY_STATIC})
|
||||
|
||||
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)
|
||||
if(ENABLE_STATIC_LIBS)
|
||||
find_package_handle_standard_args(ORC "orc files" ORC_LIBRARY ORC_INCLUDE_DIR ORCC_EXECUTABLE ORC_LIBRARY_STATIC)
|
||||
else()
|
||||
find_package_handle_standard_args(ORC "orc files" ORC_LIBRARY ORC_INCLUDE_DIR ORCC_EXECUTABLE)
|
||||
endif()
|
||||
mark_as_advanced(ORC_INCLUDE_DIR ORC_LIBRARY ORCC_EXECUTABLE ORC_LIBRARY_STATIC)
|
||||
|
@ -576,6 +576,9 @@ if(USE_CPU_FEATURES)
|
||||
)
|
||||
endif()
|
||||
# Configure target properties
|
||||
if(ORC_FOUND)
|
||||
target_link_libraries(volk_gnsssdr PRIVATE ${ORC_LIBRARIES})
|
||||
endif()
|
||||
if(NOT MSVC)
|
||||
target_link_libraries(volk_gnsssdr PUBLIC m)
|
||||
endif()
|
||||
@ -597,12 +600,16 @@ if(ENABLE_STATIC_LIBS)
|
||||
else()
|
||||
add_library(volk_gnsssdr_static STATIC $<TARGET_OBJECTS:volk_gnsssdr_obj>)
|
||||
endif()
|
||||
target_link_libraries(volk_gnsssdr_static PUBLIC ${volk_gnsssdr_libraries})
|
||||
if(USE_CPU_FEATURES)
|
||||
target_link_libraries(volk_gnsssdr_static
|
||||
PRIVATE cpu_features
|
||||
)
|
||||
endif()
|
||||
target_link_libraries(volk_gnsssdr_static PUBLIC ${volk_gnsssdr_libraries} pthread)
|
||||
if(ORC_FOUND)
|
||||
target_link_libraries(volk_gnsssdr_static PUBLIC ${ORC_LIBRARIES_STATIC})
|
||||
endif()
|
||||
target_link_libraries(volk_gnsssdr_static PRIVATE pthread)
|
||||
if(NOT MSVC)
|
||||
target_link_libraries(volk_gnsssdr_static PUBLIC m)
|
||||
endif()
|
||||
@ -630,12 +637,19 @@ if(ENABLE_TESTING)
|
||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/.unittest)
|
||||
|
||||
include(VolkAddTest)
|
||||
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
|
||||
)
|
||||
|
||||
if(ENABLE_STATIC_LIBS)
|
||||
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_static
|
||||
)
|
||||
else()
|
||||
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
|
||||
)
|
||||
endif()
|
||||
foreach(kernel ${h_files})
|
||||
get_filename_component(kernel ${kernel} NAME)
|
||||
string(REPLACE ".h" "" kernel ${kernel})
|
||||
|
@ -322,11 +322,6 @@ if(ENABLE_UNIT_TESTING_EXTRA OR ENABLE_SYSTEM_TESTING_EXTRA OR ENABLE_FPGA)
|
||||
############################################################################
|
||||
# Local installation of GPSTk https://github.com/SGL-UT/GPSTk
|
||||
############################################################################
|
||||
find_package(GPSTK)
|
||||
set_package_properties(GPSTK PROPERTIES
|
||||
PURPOSE "Used in some Extra Tests."
|
||||
TYPE REQUIRED
|
||||
)
|
||||
if(NOT GPSTK_FOUND OR ENABLE_OWN_GPSTK)
|
||||
set_package_properties(GPSTK PROPERTIES
|
||||
PURPOSE "GPSTk v${GNSSSDR_GPSTK_LOCAL_VERSION} will be automatically downloaded and built when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'."
|
||||
@ -348,7 +343,7 @@ if(ENABLE_UNIT_TESTING_EXTRA OR ENABLE_SYSTEM_TESTING_EXTRA OR ENABLE_FPGA)
|
||||
SOURCE_DIR ${CMAKE_BINARY_DIR}/thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}
|
||||
BINARY_DIR ${CMAKE_BINARY_DIR}/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}
|
||||
PATCH_COMMAND cd ${CMAKE_BINARY_DIR}/thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION} && ${Patch_EXECUTABLE} ${CMAKE_BINARY_DIR}/thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/CMakeLists.txt < ${CMAKE_SOURCE_DIR}/src/tests/data/gpstk_static.patch
|
||||
CMAKE_ARGS ${GTEST_COMPILER} ${TOOLCHAIN_ARG} -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install -DBUILD_EXT=OFF -DBUILD_PYTHON=OFF -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_CXX_STANDARD=11 -DCMAKE_CXX_EXTENSIONS=ON -DCMAKE_C_STANDARD=11 -DCMAKE_C_EXTENSIONS=ON
|
||||
CMAKE_ARGS ${GTEST_COMPILER} ${TOOLCHAIN_ARG} -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install -DBUILD_EXT=ON -DBUILD_PYTHON=OFF -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_CXX_STANDARD=11 -DCMAKE_CXX_EXTENSIONS=ON -DCMAKE_C_STANDARD=11 -DCMAKE_C_EXTENSIONS=ON
|
||||
BUILD_COMMAND ${GPSTK_BUILD_COMMAND}
|
||||
UPDATE_COMMAND ""
|
||||
PATCH_COMMAND ""
|
||||
@ -368,7 +363,7 @@ if(ENABLE_UNIT_TESTING_EXTRA OR ENABLE_SYSTEM_TESTING_EXTRA OR ENABLE_FPGA)
|
||||
SOURCE_DIR ${CMAKE_BINARY_DIR}/thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}
|
||||
BINARY_DIR ${CMAKE_BINARY_DIR}/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}
|
||||
PATCH_COMMAND cd ${CMAKE_BINARY_DIR}/thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION} && ${Patch_EXECUTABLE} ${CMAKE_BINARY_DIR}/thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/CMakeLists.txt < ${CMAKE_SOURCE_DIR}/src/tests/data/gpstk_static.patch
|
||||
CMAKE_ARGS ${GTEST_COMPILER} ${TOOLCHAIN_ARG} -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install -DBUILD_EXT=OFF -DBUILD_PYTHON=OFF -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_CXX_STANDARD=14 -DCMAKE_CXX_EXTENSIONS=ON -DCMAKE_C_STANDARD=11 -DCMAKE_C_EXTENSIONS=ON
|
||||
CMAKE_ARGS ${GTEST_COMPILER} ${TOOLCHAIN_ARG} -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install -DBUILD_EXT=ON -DBUILD_PYTHON=OFF -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_CXX_STANDARD=14 -DCMAKE_CXX_EXTENSIONS=ON -DCMAKE_C_STANDARD=11 -DCMAKE_C_EXTENSIONS=ON
|
||||
BUILD_COMMAND ${GPSTK_BUILD_COMMAND} ${GPSTK_PARALLEL_BUILD}
|
||||
BUILD_BYPRODUCTS ${CMAKE_BINARY_DIR}/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install/${CMAKE_INSTALL_LIBDIR}/${CMAKE_FIND_LIBRARY_PREFIXES}gpstk${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
UPDATE_COMMAND ""
|
||||
@ -526,6 +521,9 @@ if(ENABLE_UNIT_TESTING)
|
||||
endif()
|
||||
if(ENABLE_UNIT_TESTING_EXTRA)
|
||||
target_link_libraries(run_tests PRIVATE Gpstk::gpstk)
|
||||
if(GPSTK_OLDER_THAN_8)
|
||||
target_compile_definitions(run_tests PRIVATE -DOLD_GPSTK=1)
|
||||
endif()
|
||||
endif()
|
||||
if(ENABLE_STRIP)
|
||||
set_target_properties(run_tests PROPERTIES LINK_FLAGS "-s")
|
||||
|
@ -2,7 +2,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||
SPDX-FileCopyrightText: 2020 Carles Fernandez-Prades <carles.fernandez@cttc.es>
|
||||
--- CMakeLists.txt 2020-10-25 10:06:26.000000000 +0100
|
||||
+++ CMakeLists.txt 2020-10-25 10:06:11.000000000 +0100
|
||||
@@ -74,7 +74,16 @@
|
||||
@@ -77,7 +77,16 @@
|
||||
|
||||
|
||||
include( BuildSetup.cmake )
|
||||
|
@ -1577,13 +1577,25 @@ bool HybridObservablesTest::ReadRinexObs(std::vector<arma::mat>* obs_vec, Gnss_S
|
||||
switch (gnss.System)
|
||||
{
|
||||
case 'G':
|
||||
#if OLD_GPSTK
|
||||
prn = gpstk::SatID(myprn, gpstk::SatID::systemGPS);
|
||||
#else
|
||||
prn = gpstk::SatID(myprn, gpstk::SatelliteSystem::GPS);
|
||||
#endif
|
||||
break;
|
||||
case 'E':
|
||||
#if OLD_GPSTK
|
||||
prn = gpstk::SatID(myprn, gpstk::SatID::systemGalileo);
|
||||
#else
|
||||
prn = gpstk::SatID(myprn, gpstk::SatelliteSystem::Galileo);
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
#if OLD_GPSTK
|
||||
prn = gpstk::SatID(myprn, gpstk::SatID::systemGPS);
|
||||
#else
|
||||
prn = gpstk::SatID(myprn, gpstk::SatelliteSystem::GPS);
|
||||
#endif
|
||||
}
|
||||
|
||||
gpstk::CommonTime time = r_ref_data.time;
|
||||
@ -1741,7 +1753,7 @@ TEST_F(HybridObservablesTest, ValidationOfResults)
|
||||
{
|
||||
// based on true observables metadata (for custom sdr generator)
|
||||
// open true observables log file written by the simulator or based on provided RINEX obs
|
||||
std::vector<std::shared_ptr<Tracking_True_Obs_Reader>> true_reader_vec;
|
||||
std::vector<std::shared_ptr<Tracking_True_Obs_Reader> > true_reader_vec;
|
||||
// read true data from the generator logs
|
||||
true_reader_vec.push_back(std::make_shared<Tracking_True_Obs_Reader>());
|
||||
std::cout << "Loading true observable data for PRN " << n.PRN << '\n';
|
||||
@ -1782,8 +1794,8 @@ TEST_F(HybridObservablesTest, ValidationOfResults)
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<std::shared_ptr<TrackingInterface>> tracking_ch_vec;
|
||||
std::vector<std::shared_ptr<TelemetryDecoderInterface>> tlm_ch_vec;
|
||||
std::vector<std::shared_ptr<TrackingInterface> > tracking_ch_vec;
|
||||
std::vector<std::shared_ptr<TelemetryDecoderInterface> > tlm_ch_vec;
|
||||
|
||||
std::vector<gr::blocks::null_sink::sptr> null_sink_vec;
|
||||
for (unsigned int n = 0; n < gnss_synchro_vec.size(); n++)
|
||||
|
@ -1668,13 +1668,25 @@ bool HybridObservablesTestFpga::ReadRinexObs(std::vector<arma::mat>* obs_vec, Gn
|
||||
switch (gnss.System)
|
||||
{
|
||||
case 'G':
|
||||
#if OLD_GPSTK
|
||||
prn = gpstk::SatID(myprn, gpstk::SatID::systemGPS);
|
||||
#else
|
||||
prn = gpstk::SatID(myprn, gpstk::SatelliteSystem::GPS);
|
||||
#endif
|
||||
break;
|
||||
case 'E':
|
||||
#if OLD_GPSTK
|
||||
prn = gpstk::SatID(myprn, gpstk::SatID::systemGalileo);
|
||||
#else
|
||||
prn = gpstk::SatID(myprn, gpstk::SatelliteSystem::Galileo);
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
#if OLD_GPSTK
|
||||
prn = gpstk::SatID(myprn, gpstk::SatID::systemGPS);
|
||||
#else
|
||||
prn = gpstk::SatID(myprn, gpstk::SatelliteSystem::GPS);
|
||||
#endif
|
||||
}
|
||||
|
||||
gpstk::CommonTime time = r_ref_data.time;
|
||||
|
@ -72,6 +72,10 @@ if("${ARMADILLO_VERSION_STRING}" VERSION_GREATER "9.800" OR (NOT ARMADILLO_FOUND
|
||||
${GPSTK_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
if(GPSTK_OLDER_THAN_8)
|
||||
target_compile_definitions(obsdiff PUBLIC -DOLD_GPSTK=1)
|
||||
endif()
|
||||
|
||||
if(ENABLE_STRIP)
|
||||
set_target_properties(obsdiff PROPERTIES LINK_FLAGS "-s")
|
||||
endif()
|
||||
|
@ -113,15 +113,27 @@ std::map<int, arma::mat> ReadRinexObs(const std::string& rinex_file, char system
|
||||
switch (system)
|
||||
{
|
||||
case 'G':
|
||||
#if OLD_GPSTK
|
||||
prn.system = gpstk::SatID::systemGPS;
|
||||
#else
|
||||
prn.system = gpstk::SatelliteSystem::GPS;
|
||||
#endif
|
||||
PRN_set = available_gps_prn;
|
||||
break;
|
||||
case 'E':
|
||||
#if OLD_GPSTK
|
||||
prn.system = gpstk::SatID::systemGalileo;
|
||||
#else
|
||||
prn.system = gpstk::SatelliteSystem::Galileo;
|
||||
#endif
|
||||
PRN_set = available_galileo_prn;
|
||||
break;
|
||||
default:
|
||||
#if OLD_GPSTK
|
||||
prn.system = gpstk::SatID::systemGPS;
|
||||
#else
|
||||
prn.system = gpstk::SatelliteSystem::GPS;
|
||||
#endif
|
||||
PRN_set = available_gps_prn;
|
||||
}
|
||||
|
||||
@ -1241,12 +1253,19 @@ double compute_rx_clock_error(const std::string& rinex_nav_filename, const std::
|
||||
// pointer to the tropospheric model to be applied
|
||||
try
|
||||
{
|
||||
#if OLD_GPSTK
|
||||
std::vector<gpstk::SatID::SatelliteSystem> Syss;
|
||||
#endif
|
||||
gpstk::Matrix<double> invMC;
|
||||
int iret;
|
||||
// Call RAIMCompute.
|
||||
// Call RAIMCompute
|
||||
#if OLD_GPSTK
|
||||
iret = raimSolver.RAIMCompute(rod.time, prnVec, Syss, rangeVec, invMC,
|
||||
&bcestore, tropModelPtr);
|
||||
#else
|
||||
iret = raimSolver.RAIMCompute(rod.time, prnVec, rangeVec, invMC,
|
||||
&bcestore, tropModelPtr);
|
||||
#endif
|
||||
switch (iret)
|
||||
{
|
||||
/// @return Return values:
|
||||
|
Loading…
Reference in New Issue
Block a user