2018-05-13 20:49:11 +00:00
|
|
|
# Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
2012-12-24 13:29:23 +00:00
|
|
|
#
|
|
|
|
# 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
|
Improving handling of optional processing blocks and linking libraries.
New options ENABLE_GN3S, ENABLE_RTLSDR, ENABLE_OPENCL, ENABLE_ARRAY and
ENABLE_GPERFTOOLS, all set by default to OFF. Users can enable that
features by 'cmake -DENABLE_XXX=ON ../ '. OpenCL is now not used by
default since it was giving problems in some platforms. Old variables
(RTSDR_DRIVER, GN3S_DRIVER, RAW_ARRAY_DRIVER and DISABLE_OPENCL) are
still honored and can be used in the same way, but the new ENABLE_XXX
are recommended for the sake of more uniform naming. Main CMakeFile.txt
has been rearranged, putting options first, then searching for the
required libraries, and then the optional ones. If Gperftools is enabled
and found, binaries are linked to the tcmalloc and profiler libraries,
and using the adequate flags. Fixed building in Mac OSX if Armadillo and
OpenBLAS were not installed in the system.
2014-08-07 19:04:01 +00:00
|
|
|
# (at your option) any later version.
|
2012-12-24 13:29:23 +00:00
|
|
|
#
|
|
|
|
# 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
|
2018-05-13 20:49:11 +00:00
|
|
|
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
2012-12-24 13:29:23 +00:00
|
|
|
#
|
|
|
|
|
2017-02-01 18:24:25 +00:00
|
|
|
|
|
|
|
add_subdirectory(unit-tests/signal-processing-blocks/libs)
|
2018-08-29 16:53:03 +00:00
|
|
|
add_subdirectory(system-tests/libs)
|
2017-02-01 18:24:25 +00:00
|
|
|
|
2016-11-27 23:18:02 +00:00
|
|
|
################################################################################
|
|
|
|
# Google Test - https://github.com/google/googletest
|
|
|
|
################################################################################
|
2014-05-28 20:02:11 +00:00
|
|
|
if(EXISTS $ENV{GTEST_DIR})
|
|
|
|
set(GTEST_DIR_LOCAL $ENV{GTEST_DIR})
|
|
|
|
endif(EXISTS $ENV{GTEST_DIR})
|
|
|
|
if(GTEST_DIR)
|
|
|
|
set(GTEST_DIR_LOCAL ${GTEST_DIR})
|
|
|
|
endif(GTEST_DIR)
|
2014-04-07 16:20:09 +00:00
|
|
|
if(NOT GTEST_DIR_LOCAL)
|
2014-12-07 19:42:52 +00:00
|
|
|
set(GTEST_DIR_LOCAL false)
|
2014-04-07 16:20:09 +00:00
|
|
|
else()
|
2015-08-24 13:59:49 +00:00
|
|
|
set(GTEST_DIR_LOCAL true)
|
2014-04-07 16:20:09 +00:00
|
|
|
endif(NOT GTEST_DIR_LOCAL)
|
2015-02-15 13:49:17 +00:00
|
|
|
|
2014-12-07 10:16:33 +00:00
|
|
|
if(GTEST_INCLUDE_DIRS)
|
2014-12-07 19:42:52 +00:00
|
|
|
set(GTEST_DIR_LOCAL true)
|
2014-12-07 10:16:33 +00:00
|
|
|
endif(GTEST_INCLUDE_DIRS)
|
2012-12-26 11:19:57 +00:00
|
|
|
|
2016-12-20 20:43:19 +00:00
|
|
|
set(GTEST_COMPILER -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER})
|
|
|
|
set(TOOLCHAIN_ARG "")
|
2017-02-15 21:10:06 +00:00
|
|
|
if(EXISTS $ENV{OECORE_TARGET_SYSROOT})
|
|
|
|
set(GTEST_COMPILER "")
|
|
|
|
set(TOOLCHAIN_ARG "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/Toolchains/oe-sdk_cross.cmake")
|
|
|
|
endif(EXISTS $ENV{OECORE_TARGET_SYSROOT})
|
2016-12-20 20:43:19 +00:00
|
|
|
|
2014-12-07 19:42:52 +00:00
|
|
|
if(NOT ${GTEST_DIR_LOCAL})
|
2012-12-26 11:19:57 +00:00
|
|
|
# if GTEST_DIR is not defined, we download and build it
|
2017-06-22 18:17:37 +00:00
|
|
|
if(CMAKE_VERSION VERSION_LESS 3.2)
|
|
|
|
ExternalProject_Add(
|
2017-11-04 18:22:40 +00:00
|
|
|
gtest-${GNSSSDR_GTEST_LOCAL_VERSION}
|
2017-06-22 18:17:37 +00:00
|
|
|
GIT_REPOSITORY https://github.com/google/googletest
|
2017-11-04 18:22:40 +00:00
|
|
|
GIT_TAG release-${GNSSSDR_GTEST_LOCAL_VERSION}
|
|
|
|
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gtest/gtest-${GNSSSDR_GTEST_LOCAL_VERSION}
|
|
|
|
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/../../gtest-${GNSSSDR_GTEST_LOCAL_VERSION}
|
2018-08-31 22:31:02 +00:00
|
|
|
CMAKE_ARGS ${GTEST_COMPILER} -DINSTALL_GTEST=OFF -DBUILD_GMOCK=OFF ${TOOLCHAIN_ARG}
|
2017-06-22 18:17:37 +00:00
|
|
|
UPDATE_COMMAND ""
|
|
|
|
PATCH_COMMAND ""
|
|
|
|
INSTALL_COMMAND ""
|
|
|
|
)
|
|
|
|
else(CMAKE_VERSION VERSION_LESS 3.2)
|
|
|
|
ExternalProject_Add(
|
2017-11-04 18:22:40 +00:00
|
|
|
gtest-${GNSSSDR_GTEST_LOCAL_VERSION}
|
2015-08-24 13:59:49 +00:00
|
|
|
GIT_REPOSITORY https://github.com/google/googletest
|
2017-11-04 18:22:40 +00:00
|
|
|
GIT_TAG release-${GNSSSDR_GTEST_LOCAL_VERSION}
|
|
|
|
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gtest/gtest-${GNSSSDR_GTEST_LOCAL_VERSION}
|
|
|
|
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/../../gtest-${GNSSSDR_GTEST_LOCAL_VERSION}
|
2018-08-31 22:31:02 +00:00
|
|
|
CMAKE_ARGS ${GTEST_COMPILER} -DINSTALL_GTEST=OFF -DBUILD_GMOCK=OFF ${TOOLCHAIN_ARG}
|
2015-08-24 13:59:49 +00:00
|
|
|
UPDATE_COMMAND ""
|
|
|
|
PATCH_COMMAND ""
|
2017-11-04 18:22:40 +00:00
|
|
|
BUILD_BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/../../gtest-${GNSSSDR_GTEST_LOCAL_VERSION}/googletest/${CMAKE_FIND_LIBRARY_PREFIXES}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/../../gtest-${GNSSSDR_GTEST_LOCAL_VERSION}/googletest/${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main${CMAKE_STATIC_LIBRARY_SUFFIX}
|
2015-08-24 13:59:49 +00:00
|
|
|
INSTALL_COMMAND ""
|
2017-07-11 10:52:45 +00:00
|
|
|
)
|
2017-06-22 18:17:37 +00:00
|
|
|
endif(CMAKE_VERSION VERSION_LESS 3.2)
|
2017-07-11 10:52:45 +00:00
|
|
|
|
2012-12-26 11:19:57 +00:00
|
|
|
# Set up variables
|
|
|
|
# Set recently downloaded and build Googletest root folder
|
2017-11-04 18:22:40 +00:00
|
|
|
set(GTEST_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gtest/gtest-${GNSSSDR_GTEST_LOCAL_VERSION}/googletest")
|
2012-12-26 11:19:57 +00:00
|
|
|
# Source code
|
2017-11-04 18:22:40 +00:00
|
|
|
ExternalProject_Get_Property(gtest-${GNSSSDR_GTEST_LOCAL_VERSION} source_dir)
|
2016-09-23 19:59:00 +00:00
|
|
|
set(GTEST_INCLUDE_DIR ${source_dir}/googletest/include)
|
2012-12-26 11:19:57 +00:00
|
|
|
set(GTEST_INCLUDE_DIRECTORIES ${GTEST_DIR}/include ${GTEST_DIR} ${GTEST_DIR}/src)
|
|
|
|
# Library
|
2017-11-04 18:22:40 +00:00
|
|
|
ExternalProject_Get_Property(gtest-${GNSSSDR_GTEST_LOCAL_VERSION} binary_dir)
|
2014-10-18 10:39:58 +00:00
|
|
|
if(OS_IS_MACOSX)
|
2013-11-15 17:45:24 +00:00
|
|
|
if(CMAKE_GENERATOR STREQUAL Xcode)
|
|
|
|
set(binary_dir "${binary_dir}/Debug")
|
|
|
|
endif(CMAKE_GENERATOR STREQUAL Xcode)
|
2014-10-18 10:39:58 +00:00
|
|
|
endif(OS_IS_MACOSX)
|
2017-06-21 06:54:47 +00:00
|
|
|
set(GTEST_LIBRARY_PATH "${binary_dir}/googletest/${CMAKE_FIND_LIBRARY_PREFIXES}gtest${CMAKE_STATIC_LIBRARY_SUFFIX};${binary_dir}/googletest/${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
2017-11-04 18:22:40 +00:00
|
|
|
set(GTEST_LIBRARY gtest-${GNSSSDR_GTEST_LOCAL_VERSION})
|
2016-09-23 19:59:00 +00:00
|
|
|
set(GTEST_LIBRARIES
|
2017-06-21 06:54:47 +00:00
|
|
|
${binary_dir}/googletest/${CMAKE_FIND_LIBRARY_PREFIXES}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}
|
|
|
|
${binary_dir}/googletest/${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main${CMAKE_STATIC_LIBRARY_SUFFIX}
|
2016-09-23 19:59:00 +00:00
|
|
|
)
|
2017-11-04 18:22:40 +00:00
|
|
|
set(GTEST_LIB_DIR "${CMAKE_CURRENT_BINARY_DIR}/../../gtest-${GNSSSDR_GTEST_LOCAL_VERSION}/googletest")
|
2014-12-07 19:42:52 +00:00
|
|
|
else(NOT ${GTEST_DIR_LOCAL})
|
2014-12-07 10:16:33 +00:00
|
|
|
if(GTEST_INCLUDE_DIRS)
|
2015-02-15 13:49:17 +00:00
|
|
|
set(GTEST_INCLUDE_DIRECTORIES ${GTEST_INCLUDE_DIRS} ${LIBGTEST_DEV_DIR})
|
|
|
|
add_library(gtest ${LIBGTEST_DEV_DIR}/src/gtest-all.cc ${LIBGTEST_DEV_DIR}/src/gtest_main.cc)
|
2014-12-07 10:16:33 +00:00
|
|
|
set(GTEST_LIBRARIES gtest)
|
|
|
|
else(GTEST_INCLUDE_DIRS)
|
|
|
|
# If the variable GTEST_DIR is defined, we use the existing Googletest
|
|
|
|
set(GTEST_DIR $ENV{GTEST_DIR})
|
|
|
|
set(GTEST_INCLUDE_DIRECTORIES ${GTEST_DIR}/include ${GTEST_DIR} ${GTEST_DIR}/src)
|
|
|
|
add_library(gtest ${GTEST_DIR}/src/gtest-all.cc ${GTEST_DIR}/src/gtest_main.cc)
|
|
|
|
set(GTEST_LIBRARIES gtest)
|
|
|
|
endif(GTEST_INCLUDE_DIRS)
|
2014-12-07 19:42:52 +00:00
|
|
|
endif(NOT ${GTEST_DIR_LOCAL})
|
2013-07-06 02:15:09 +00:00
|
|
|
|
2014-03-15 01:21:17 +00:00
|
|
|
|
2016-11-27 23:18:02 +00:00
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# Optional libraries
|
|
|
|
################################################################################
|
Improving handling of optional processing blocks and linking libraries.
New options ENABLE_GN3S, ENABLE_RTLSDR, ENABLE_OPENCL, ENABLE_ARRAY and
ENABLE_GPERFTOOLS, all set by default to OFF. Users can enable that
features by 'cmake -DENABLE_XXX=ON ../ '. OpenCL is now not used by
default since it was giving problems in some platforms. Old variables
(RTSDR_DRIVER, GN3S_DRIVER, RAW_ARRAY_DRIVER and DISABLE_OPENCL) are
still honored and can be used in the same way, but the new ENABLE_XXX
are recommended for the sake of more uniform naming. Main CMakeFile.txt
has been rearranged, putting options first, then searching for the
required libraries, and then the optional ones. If Gperftools is enabled
and found, binaries are linked to the tcmalloc and profiler libraries,
and using the adequate flags. Fixed building in Mac OSX if Armadillo and
OpenBLAS were not installed in the system.
2014-08-07 19:04:01 +00:00
|
|
|
set(GNSS_SDR_TEST_OPTIONAL_LIBS "")
|
|
|
|
set(GNSS_SDR_TEST_OPTIONAL_HEADERS "")
|
|
|
|
|
2016-06-17 10:48:31 +00:00
|
|
|
if(ENABLE_CUDA)
|
|
|
|
set(GNSS_SDR_TEST_OPTIONAL_HEADERS ${GNSS_SDR_TEST_OPTIONAL_HEADERS} ${CUDA_INCLUDE_DIRS})
|
|
|
|
set(GNSS_SDR_TEST_OPTIONAL_LIBS ${GNSS_SDR_TEST_OPTIONAL_LIBS} ${CUDA_LIBRARIES})
|
|
|
|
endif(ENABLE_CUDA)
|
|
|
|
|
2018-08-08 07:30:26 +00:00
|
|
|
|
Improving handling of optional processing blocks and linking libraries.
New options ENABLE_GN3S, ENABLE_RTLSDR, ENABLE_OPENCL, ENABLE_ARRAY and
ENABLE_GPERFTOOLS, all set by default to OFF. Users can enable that
features by 'cmake -DENABLE_XXX=ON ../ '. OpenCL is now not used by
default since it was giving problems in some platforms. Old variables
(RTSDR_DRIVER, GN3S_DRIVER, RAW_ARRAY_DRIVER and DISABLE_OPENCL) are
still honored and can be used in the same way, but the new ENABLE_XXX
are recommended for the sake of more uniform naming. Main CMakeFile.txt
has been rearranged, putting options first, then searching for the
required libraries, and then the optional ones. If Gperftools is enabled
and found, binaries are linked to the tcmalloc and profiler libraries,
and using the adequate flags. Fixed building in Mac OSX if Armadillo and
OpenBLAS were not installed in the system.
2014-08-07 19:04:01 +00:00
|
|
|
if(ENABLE_GPERFTOOLS)
|
|
|
|
if(GPERFTOOLS_FOUND)
|
|
|
|
set(GNSS_SDR_TEST_OPTIONAL_LIBS "${GNSS_SDR_TEST_OPTIONAL_LIBS};${GPERFTOOLS_LIBRARIES}")
|
|
|
|
set(GNSS_SDR_TEST_OPTIONAL_HEADERS "${GNSS_SDR_TEST_OPTIONAL_HEADERS};${GPERFTOOLS_INCLUDE_DIR}")
|
|
|
|
endif(GPERFTOOLS_FOUND)
|
|
|
|
endif(ENABLE_GPERFTOOLS)
|
|
|
|
|
2014-12-21 21:46:57 +00:00
|
|
|
if(Boost_VERSION LESS 105000)
|
|
|
|
add_definitions(-DOLD_BOOST=1)
|
|
|
|
endif(Boost_VERSION LESS 105000)
|
2015-10-27 19:18:48 +00:00
|
|
|
|
2018-08-31 11:52:35 +00:00
|
|
|
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" )
|
2018-08-31 11:58:45 +00:00
|
|
|
|
2015-10-27 19:18:48 +00:00
|
|
|
if(OPENSSL_FOUND)
|
|
|
|
add_definitions( -DUSE_OPENSSL_FALLBACK=1 )
|
|
|
|
endif(OPENSSL_FOUND)
|
2016-09-23 19:59:00 +00:00
|
|
|
|
2016-11-27 23:18:02 +00:00
|
|
|
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
2017-08-07 09:08:05 +00:00
|
|
|
if(OS_IS_MACOSX)
|
|
|
|
set(CLANG_FLAGS "-stdlib=libc++ -lc++")
|
|
|
|
endif(OS_IS_MACOSX)
|
2016-11-27 23:18:02 +00:00
|
|
|
endif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
|
|
|
|
|
|
|
if(OPENCL_FOUND)
|
|
|
|
add_definitions(-DOPENCL_BLOCKS_TEST=1)
|
|
|
|
endif(OPENCL_FOUND)
|
|
|
|
|
2017-03-13 19:54:25 +00:00
|
|
|
if(ENABLE_CUDA)
|
|
|
|
add_definitions(-DCUDA_BLOCKS_TEST=1)
|
2016-11-27 23:18:02 +00:00
|
|
|
endif(ENABLE_CUDA)
|
|
|
|
|
2017-03-13 19:54:25 +00:00
|
|
|
if(ENABLE_FPGA)
|
|
|
|
add_definitions(-DFPGA_BLOCKS_TEST=1)
|
2017-02-13 16:20:49 +00:00
|
|
|
endif(ENABLE_FPGA)
|
|
|
|
|
2017-10-21 11:05:51 +00:00
|
|
|
find_package(Gnuplot)
|
|
|
|
if(GNUPLOT_FOUND)
|
|
|
|
add_definitions(-DGNUPLOT_EXECUTABLE="${GNUPLOT_EXECUTABLE}")
|
|
|
|
endif(GNUPLOT_FOUND)
|
|
|
|
|
2018-03-28 06:35:33 +00:00
|
|
|
if(${PC_GNURADIO_RUNTIME_VERSION} VERSION_GREATER "3.7.15" )
|
2018-02-03 09:49:03 +00:00
|
|
|
add_definitions( -DGR_GREATER_38=1 )
|
2018-03-28 06:35:33 +00:00
|
|
|
endif(${PC_GNURADIO_RUNTIME_VERSION} VERSION_GREATER "3.7.15" )
|
2018-02-03 09:49:03 +00:00
|
|
|
|
2017-11-17 22:17:08 +00:00
|
|
|
|
2016-12-20 20:43:19 +00:00
|
|
|
################################################################################
|
|
|
|
# Optional generator
|
|
|
|
################################################################################
|
2017-02-15 21:10:06 +00:00
|
|
|
if(ENABLE_UNIT_TESTING_EXTRA OR ENABLE_SYSTEM_TESTING_EXTRA OR ENABLE_FPGA)
|
|
|
|
if(ENABLE_FPGA)
|
|
|
|
set(CROSS_INSTALL_DIR "-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}")
|
|
|
|
if(EXISTS $ENV{OECORE_TARGET_SYSROOT})
|
|
|
|
set(CROSS_INSTALL_DIR "${CROSS_INSTALL_DIR} -DBOOST_ROOT=$ENV{OECORE_TARGET_SYSROOT}/usr")
|
|
|
|
endif(EXISTS $ENV{OECORE_TARGET_SYSROOT})
|
|
|
|
else(ENABLE_FPGA)
|
|
|
|
set(CROSS_INSTALL_DIR "")
|
|
|
|
endif(ENABLE_FPGA)
|
2016-12-20 20:43:19 +00:00
|
|
|
ExternalProject_Add(
|
|
|
|
gnss-sim
|
|
|
|
GIT_REPOSITORY https://bitbucket.org/jarribas/gnss-simulator
|
2017-11-04 18:22:40 +00:00
|
|
|
GIT_TAG ${GNSSSDR_GNSS_SIM_LOCAL_VERSION}
|
2016-12-20 20:43:19 +00:00
|
|
|
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gnss-sim
|
|
|
|
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/../../gnss-sim
|
2017-02-15 21:10:06 +00:00
|
|
|
CMAKE_ARGS ${GTEST_COMPILER} ${TOOLCHAIN_ARG} ${CROSS_INSTALL_DIR}
|
2016-12-20 20:43:19 +00:00
|
|
|
UPDATE_COMMAND ""
|
|
|
|
PATCH_COMMAND ""
|
|
|
|
INSTALL_COMMAND ""
|
|
|
|
)
|
2017-02-17 00:02:07 +00:00
|
|
|
if(ENABLE_INSTALL_TESTS)
|
2017-02-16 19:53:04 +00:00
|
|
|
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/../../gnss-sim/gnss_sim DESTINATION bin)
|
2017-02-16 18:59:46 +00:00
|
|
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/../../../thirdparty/gnss-sim/brdc3540.14n DESTINATION share/gnss-sim)
|
|
|
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/../../../thirdparty/gnss-sim/circle.csv DESTINATION share/gnss-sim)
|
2017-02-16 19:03:03 +00:00
|
|
|
set(SW_GENERATOR_BIN ${CMAKE_INSTALL_PREFIX}/bin/gnss_sim)
|
2017-02-15 21:10:06 +00:00
|
|
|
add_definitions(-DSW_GENERATOR_BIN="${SW_GENERATOR_BIN}")
|
2017-02-16 19:03:03 +00:00
|
|
|
add_definitions(-DDEFAULT_RINEX_NAV="${CMAKE_INSTALL_PREFIX}/share/gnss-sim/brdc3540.14n")
|
|
|
|
add_definitions(-DDEFAULT_POSITION_FILE="${CMAKE_INSTALL_PREFIX}/share/gnss-sim/circle.csv")
|
2017-02-17 00:02:07 +00:00
|
|
|
else(ENABLE_INSTALL_TESTS)
|
2017-02-16 18:41:11 +00:00
|
|
|
set(SW_GENERATOR_BIN ${CMAKE_CURRENT_BINARY_DIR}/../../gnss-sim/gnss_sim)
|
|
|
|
add_definitions(-DSW_GENERATOR_BIN="${SW_GENERATOR_BIN}")
|
|
|
|
add_definitions(-DDEFAULT_RINEX_NAV="${CMAKE_CURRENT_BINARY_DIR}/../../../thirdparty/gnss-sim/brdc3540.14n")
|
|
|
|
add_definitions(-DDEFAULT_POSITION_FILE="${CMAKE_CURRENT_BINARY_DIR}/../../../thirdparty/gnss-sim/circle.csv")
|
2017-02-17 00:02:07 +00:00
|
|
|
endif(ENABLE_INSTALL_TESTS)
|
2017-02-01 15:17:58 +00:00
|
|
|
|
2016-12-22 00:35:31 +00:00
|
|
|
################################################################################
|
|
|
|
# Local installation of GPSTk http://www.gpstk.org/
|
|
|
|
################################################################################
|
2016-12-30 13:36:41 +00:00
|
|
|
find_package(GPSTK)
|
|
|
|
if(NOT GPSTK_FOUND OR ENABLE_OWN_GPSTK)
|
2018-03-25 17:47:28 +00:00
|
|
|
message(STATUS "GPSTk v${GNSSSDR_GPSTK_LOCAL_VERSION} will be automatically downloaded and built when doing 'make'.")
|
2018-08-11 10:56:52 +00:00
|
|
|
|
2018-08-10 09:53:40 +00:00
|
|
|
# if(NOT ENABLE_FPGA)
|
2017-06-22 18:17:37 +00:00
|
|
|
if(CMAKE_VERSION VERSION_LESS 3.2)
|
|
|
|
ExternalProject_Add(
|
2017-11-04 18:22:40 +00:00
|
|
|
gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}
|
2017-06-22 18:17:37 +00:00
|
|
|
GIT_REPOSITORY https://github.com/SGL-UT/GPSTk
|
2017-11-04 18:22:40 +00:00
|
|
|
GIT_TAG v${GNSSSDR_GPSTK_LOCAL_VERSION}
|
|
|
|
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}
|
|
|
|
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/../../gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}
|
|
|
|
CMAKE_ARGS ${GTEST_COMPILER} ${TOOLCHAIN_ARG} -DCMAKE_INSTALL_PREFIX=${CMAKE_SOURCE_DIR}/thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install -DBUILD_EXT=OFF -DBUILD_PYTHON=OFF
|
2017-06-22 18:17:37 +00:00
|
|
|
UPDATE_COMMAND ""
|
|
|
|
PATCH_COMMAND ""
|
|
|
|
)
|
|
|
|
else(CMAKE_VERSION VERSION_LESS 3.2)
|
|
|
|
ExternalProject_Add(
|
2017-11-04 18:22:40 +00:00
|
|
|
gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}
|
2017-02-15 21:10:06 +00:00
|
|
|
GIT_REPOSITORY https://github.com/SGL-UT/GPSTk
|
2017-11-04 18:22:40 +00:00
|
|
|
GIT_TAG v${GNSSSDR_GPSTK_LOCAL_VERSION}
|
|
|
|
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}
|
|
|
|
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/../../gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}
|
|
|
|
CMAKE_ARGS ${GTEST_COMPILER} ${TOOLCHAIN_ARG} -DCMAKE_INSTALL_PREFIX=${CMAKE_SOURCE_DIR}/thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install -DBUILD_EXT=OFF -DBUILD_PYTHON=OFF
|
|
|
|
BUILD_BYPRODUCTS ${CMAKE_SOURCE_DIR}/thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gpstk${CMAKE_SHARED_LIBRARY_SUFFIX}
|
2017-02-15 21:10:06 +00:00
|
|
|
UPDATE_COMMAND ""
|
|
|
|
PATCH_COMMAND ""
|
2017-06-22 18:17:37 +00:00
|
|
|
)
|
|
|
|
endif(CMAKE_VERSION VERSION_LESS 3.2)
|
2017-07-11 10:52:45 +00:00
|
|
|
|
2017-11-04 18:22:40 +00:00
|
|
|
set(GPSTK_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install/include CACHE PATH "Local GPSTK headers")
|
2017-02-15 21:10:06 +00:00
|
|
|
add_library(gpstk UNKNOWN IMPORTED)
|
2017-11-04 18:22:40 +00:00
|
|
|
set_property(TARGET gpstk PROPERTY IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gpstk${CMAKE_SHARED_LIBRARY_SUFFIX})
|
|
|
|
add_dependencies(gpstk gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION})
|
|
|
|
set(GPSTK_BINDIR ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install/bin/ )
|
2017-02-15 21:10:06 +00:00
|
|
|
add_definitions(-DGPSTK_BINDIR="${GPSTK_BINDIR}")
|
|
|
|
set(gpstk_libs gpstk)
|
2017-02-25 20:13:16 +00:00
|
|
|
set(OWN_GPSTK True)
|
2018-08-10 09:53:40 +00:00
|
|
|
# else(NOT ENABLE_FPGA)
|
|
|
|
# message(STATUS "GPSTk has not been found, try to install it on target.")
|
|
|
|
# message(STATUS "Some extra tests requiring GPSTk will not be built.")
|
|
|
|
# endif(NOT ENABLE_FPGA)
|
2016-12-30 13:36:41 +00:00
|
|
|
else(NOT GPSTK_FOUND OR ENABLE_OWN_GPSTK)
|
|
|
|
set(gpstk_libs ${GPSTK_LIBRARIES})
|
|
|
|
set(GPSTK_INCLUDE_DIRS ${GPSTK_INCLUDE_DIR})
|
|
|
|
set(GPSTK_BINDIR ${GPSTK_LIBRARY}/../bin/ )
|
|
|
|
add_definitions(-DGPSTK_BINDIR="${GPSTK_BINDIR}")
|
|
|
|
endif(NOT GPSTK_FOUND OR ENABLE_OWN_GPSTK)
|
2017-02-15 21:10:06 +00:00
|
|
|
endif(ENABLE_UNIT_TESTING_EXTRA OR ENABLE_SYSTEM_TESTING_EXTRA OR ENABLE_FPGA)
|
2016-12-20 20:43:19 +00:00
|
|
|
|
2016-12-30 13:36:41 +00:00
|
|
|
|
2018-08-08 07:30:26 +00:00
|
|
|
if (ENABLE_UNIT_TESTING_EXTRA)
|
|
|
|
set(GNSS_SDR_TEST_OPTIONAL_LIBS ${GNSS_SDR_TEST_OPTIONAL_LIBS} ${gpstk_libs})
|
|
|
|
set(GNSS_SDR_TEST_OPTIONAL_HEADERS ${GNSS_SDR_TEST_OPTIONAL_HEADERS} ${GPSTK_INCLUDE_DIRS} ${GPSTK_INCLUDE_DIRS}/gpstk)
|
|
|
|
endif (ENABLE_UNIT_TESTING_EXTRA)
|
|
|
|
|
2017-01-28 15:49:46 +00:00
|
|
|
if(ENABLE_UNIT_TESTING_EXTRA)
|
|
|
|
add_definitions(-DEXTRA_TESTS)
|
|
|
|
if(NOT EXISTS ${CMAKE_SOURCE_DIR}/thirdparty/signal_samples/gps_l2c_m_prn7_5msps.dat)
|
|
|
|
message(STATUS "Downloading some data files for testing...")
|
|
|
|
file(DOWNLOAD https://sourceforge.net/projects/gnss-sdr/files/data/gps_l2c_m_prn7_5msps.dat ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/signal_samples/gps_l2c_m_prn7_5msps.dat
|
|
|
|
SHOW_PROGRESS
|
2017-06-21 13:41:04 +00:00
|
|
|
EXPECTED_HASH MD5=a6fcbefe155137945d3c33c5ef7bd0f9 )
|
2017-01-28 15:49:46 +00:00
|
|
|
endif(NOT EXISTS ${CMAKE_SOURCE_DIR}/thirdparty/signal_samples/gps_l2c_m_prn7_5msps.dat)
|
2018-01-26 12:40:52 +00:00
|
|
|
if(NOT EXISTS ${CMAKE_SOURCE_DIR}/thirdparty/signal_samples/Glonass_L1_CA_SIM_Fs_62Msps_4ms.dat)
|
|
|
|
message(STATUS "Downloading some data files for testing...")
|
|
|
|
file(DOWNLOAD https://sourceforge.net/projects/gnss-sdr/files/data/Glonass_L1_CA_SIM_Fs_62Msps_4ms.dat ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/signal_samples/Glonass_L1_CA_SIM_Fs_62Msps_4ms.dat
|
|
|
|
SHOW_PROGRESS
|
|
|
|
EXPECTED_HASH MD5=ffb72fc63c116be58d5e5ccb1daaed3a )
|
|
|
|
endif(NOT EXISTS ${CMAKE_SOURCE_DIR}/thirdparty/signal_samples/Glonass_L1_CA_SIM_Fs_62Msps_4ms.dat)
|
2018-03-26 13:06:14 +00:00
|
|
|
# if(NOT EXISTS ${CMAKE_SOURCE_DIR}/thirdparty/signal_samples/NT1065_GLONASS_L2_20160831_fs6625e6_if0e3_4ms.bin)
|
|
|
|
# message(STATUS "Downloading some data files for testing...")
|
|
|
|
# file(DOWNLOAD https://sourceforge.net/projects/gnss-sdr/files/data/NT1065_GLONASS_L2_20160831_fs6625e6_if0e3_4ms.bin ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/signal_samples/NT1065_GLONASS_L2_20160831_fs6625e6_if0e3_4ms.bin
|
|
|
|
# SHOW_PROGRESS
|
|
|
|
# EXPECTED_HASH MD5=d7055fc1dc931872b547a148af50a09b )
|
|
|
|
# endif(NOT EXISTS ${CMAKE_SOURCE_DIR}/thirdparty/signal_samples/NT1065_GLONASS_L2_20160831_fs6625e6_if0e3_4ms.bin)
|
2017-02-17 00:02:07 +00:00
|
|
|
if(ENABLE_INSTALL_TESTS)
|
2017-02-16 20:04:38 +00:00
|
|
|
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/signal_samples/gps_l2c_m_prn7_5msps.dat DESTINATION share/gnss-sdr/signal_samples)
|
2018-01-26 12:40:52 +00:00
|
|
|
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/signal_samples/Glonass_L1_CA_SIM_Fs_62Msps_4ms.dat DESTINATION share/gnss-sdr/signal_samples)
|
2018-03-26 13:06:14 +00:00
|
|
|
# install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/signal_samples/NT1065_GLONASS_L2_20160831_fs6625e6_if0e3_4ms.bin DESTINATION share/gnss-sdr/signal_samples)
|
2017-02-17 00:02:07 +00:00
|
|
|
endif(ENABLE_INSTALL_TESTS)
|
2017-01-28 15:49:46 +00:00
|
|
|
endif(ENABLE_UNIT_TESTING_EXTRA)
|
|
|
|
|
2017-02-17 00:02:07 +00:00
|
|
|
if(ENABLE_INSTALL_TESTS)
|
2017-02-16 18:41:11 +00:00
|
|
|
install(FILES ${CMAKE_SOURCE_DIR}/src/tests/signal_samples/GSoC_CTTC_capture_2012_07_26_4Msps_4ms.dat DESTINATION share/gnss-sdr/signal_samples)
|
|
|
|
install(FILES ${CMAKE_SOURCE_DIR}/src/tests/signal_samples/Galileo_E1_ID_1_Fs_4Msps_8ms.dat DESTINATION share/gnss-sdr/signal_samples)
|
|
|
|
install(FILES ${CMAKE_SOURCE_DIR}/src/tests/signal_samples/GPS_L1_CA_ID_1_Fs_4Msps_2ms.dat DESTINATION share/gnss-sdr/signal_samples)
|
2017-08-22 22:48:16 +00:00
|
|
|
install(FILES ${CMAKE_SOURCE_DIR}/src/tests/signal_samples/NT1065_GLONASS_L1_20160831_fs6625e6_if0e3_4ms.bin DESTINATION share/gnss-sdr/signal_samples)
|
2017-02-16 18:41:11 +00:00
|
|
|
add_definitions(-DTEST_PATH="${CMAKE_INSTALL_PREFIX}/share/gnss-sdr/")
|
2017-02-17 00:02:07 +00:00
|
|
|
else(ENABLE_INSTALL_TESTS)
|
2017-02-16 18:41:11 +00:00
|
|
|
file(COPY ${CMAKE_SOURCE_DIR}/src/tests/signal_samples/GSoC_CTTC_capture_2012_07_26_4Msps_4ms.dat DESTINATION ${CMAKE_SOURCE_DIR}/thirdparty/signal_samples)
|
|
|
|
file(COPY ${CMAKE_SOURCE_DIR}/src/tests/signal_samples/Galileo_E1_ID_1_Fs_4Msps_8ms.dat DESTINATION ${CMAKE_SOURCE_DIR}/thirdparty/signal_samples)
|
|
|
|
file(COPY ${CMAKE_SOURCE_DIR}/src/tests/signal_samples/GPS_L1_CA_ID_1_Fs_4Msps_2ms.dat DESTINATION ${CMAKE_SOURCE_DIR}/thirdparty/signal_samples)
|
2017-08-22 22:48:16 +00:00
|
|
|
file(COPY ${CMAKE_SOURCE_DIR}/src/tests/signal_samples/NT1065_GLONASS_L1_20160831_fs6625e6_if0e3_4ms.bin DESTINATION ${CMAKE_SOURCE_DIR}/thirdparty/signal_samples)
|
2017-02-16 18:41:11 +00:00
|
|
|
add_definitions(-DTEST_PATH="${CMAKE_SOURCE_DIR}/thirdparty/")
|
2017-02-17 00:02:07 +00:00
|
|
|
endif(ENABLE_INSTALL_TESTS)
|
2016-11-27 23:18:02 +00:00
|
|
|
|
2018-05-28 13:42:44 +00:00
|
|
|
set(LIST_INCLUDE_DIRS
|
2012-12-26 11:19:57 +00:00
|
|
|
${GTEST_INCLUDE_DIRECTORIES}
|
|
|
|
${CMAKE_SOURCE_DIR}/src/core/system_parameters
|
|
|
|
${CMAKE_SOURCE_DIR}/src/core/interfaces
|
|
|
|
${CMAKE_SOURCE_DIR}/src/core/receiver
|
2016-09-23 19:59:00 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/src/core/libs
|
2013-03-15 18:05:37 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/src/core/libs/supl
|
|
|
|
${CMAKE_SOURCE_DIR}/src/core/libs/supl/asn-rrlp
|
2013-07-04 13:47:40 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/src/core/libs/supl/asn-supl
|
2018-07-03 11:25:43 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/src/core/monitor
|
2012-12-26 11:19:57 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/src/algorithms/libs
|
2018-05-07 07:13:45 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/src/algorithms/libs/rtklib
|
2015-02-06 00:09:53 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/src/algorithms/data_type_adapter/adapters
|
|
|
|
${CMAKE_SOURCE_DIR}/src/algorithms/data_type_adapter/gnuradio_blocks
|
2018-02-03 09:49:03 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/src/algorithms/resampler/adapters
|
2012-12-26 11:19:57 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/src/algorithms/resampler/gnuradio_blocks
|
2013-02-17 09:54:41 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/src/algorithms/channel/adapters
|
|
|
|
${CMAKE_SOURCE_DIR}/src/algorithms/channel/libs
|
2012-12-26 11:19:57 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/src/algorithms/tracking/libs
|
2013-02-17 09:54:41 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/src/algorithms/tracking/adapters
|
|
|
|
${CMAKE_SOURCE_DIR}/src/algorithms/tracking/gnuradio_blocks
|
2014-09-05 16:51:08 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/src/algorithms/telemetry_decoder/adapters
|
|
|
|
${CMAKE_SOURCE_DIR}/src/algorithms/telemetry_decoder/gnuradio_blocks
|
|
|
|
${CMAKE_SOURCE_DIR}/src/algorithms/telemetry_decoder/libs
|
2017-04-12 15:04:51 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/src/algorithms/observables/adapters
|
|
|
|
${CMAKE_SOURCE_DIR}/src/algorithms/observables/gnuradio_blocks
|
2012-12-26 11:19:57 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/src/algorithms/signal_source/adapters
|
2015-10-01 19:55:33 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/src/algorithms/signal_source/gnuradio_blocks
|
2013-08-28 17:17:57 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/src/algorithms/signal_generator/adapters
|
|
|
|
${CMAKE_SOURCE_DIR}/src/algorithms/signal_generator/gnuradio_blocks
|
2012-12-26 11:19:57 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/src/algorithms/input_filter/adapters
|
2015-02-02 23:58:21 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/src/algorithms/input_filter/gnuradio_blocks
|
2017-05-05 14:15:27 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/src/algorithms/acquisition/libs
|
2012-12-26 11:19:57 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/src/algorithms/acquisition/adapters
|
|
|
|
${CMAKE_SOURCE_DIR}/src/algorithms/acquisition/gnuradio_blocks
|
2014-03-28 17:52:51 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/src/algorithms/PVT/libs
|
2017-02-01 18:24:25 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/src/tests/unit-tests/signal-processing-blocks/libs
|
2018-08-29 16:53:03 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/src/tests/system-tests/libs
|
2017-02-02 19:07:36 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/src/tests/common-files
|
2012-12-26 11:19:57 +00:00
|
|
|
${GLOG_INCLUDE_DIRS}
|
|
|
|
${GFlags_INCLUDE_DIRS}
|
|
|
|
${Boost_INCLUDE_DIRS}
|
2018-03-01 14:05:04 +00:00
|
|
|
${GNURADIO_RUNTIME_INCLUDE_DIRS}
|
2014-03-23 09:45:03 +00:00
|
|
|
${ARMADILLO_INCLUDE_DIRS}
|
2014-03-28 17:52:51 +00:00
|
|
|
${VOLK_INCLUDE_DIRS}
|
2014-11-07 17:23:59 +00:00
|
|
|
${VOLK_GNSSSDR_INCLUDE_DIRS}
|
2017-11-26 17:59:00 +00:00
|
|
|
${MATIO_INCLUDE_DIRS}
|
Improving handling of optional processing blocks and linking libraries.
New options ENABLE_GN3S, ENABLE_RTLSDR, ENABLE_OPENCL, ENABLE_ARRAY and
ENABLE_GPERFTOOLS, all set by default to OFF. Users can enable that
features by 'cmake -DENABLE_XXX=ON ../ '. OpenCL is now not used by
default since it was giving problems in some platforms. Old variables
(RTSDR_DRIVER, GN3S_DRIVER, RAW_ARRAY_DRIVER and DISABLE_OPENCL) are
still honored and can be used in the same way, but the new ENABLE_XXX
are recommended for the sake of more uniform naming. Main CMakeFile.txt
has been rearranged, putting options first, then searching for the
required libraries, and then the optional ones. If Gperftools is enabled
and found, binaries are linked to the tcmalloc and profiler libraries,
and using the adequate flags. Fixed building in Mac OSX if Armadillo and
OpenBLAS were not installed in the system.
2014-08-07 19:04:01 +00:00
|
|
|
${GNSS_SDR_TEST_OPTIONAL_HEADERS}
|
2012-12-26 11:19:57 +00:00
|
|
|
)
|
|
|
|
|
2018-05-28 13:42:44 +00:00
|
|
|
include_directories(${LIST_INCLUDE_DIRS})
|
2014-03-23 09:45:03 +00:00
|
|
|
|
2016-11-27 23:18:02 +00:00
|
|
|
################################################################################
|
|
|
|
# Unit testing
|
|
|
|
################################################################################
|
2016-10-01 23:59:12 +00:00
|
|
|
if(ENABLE_UNIT_TESTING)
|
|
|
|
add_executable(run_tests ${CMAKE_CURRENT_SOURCE_DIR}/test_main.cc)
|
2014-03-23 09:45:03 +00:00
|
|
|
|
2016-10-01 23:59:12 +00:00
|
|
|
target_link_libraries(run_tests ${CLANG_FLAGS}
|
2016-09-23 19:59:00 +00:00
|
|
|
${Boost_LIBRARIES}
|
2016-10-27 06:23:25 +00:00
|
|
|
${GFlags_LIBS}
|
2016-09-23 19:59:00 +00:00
|
|
|
${GLOG_LIBRARIES}
|
|
|
|
${GTEST_LIBRARIES}
|
|
|
|
${GNURADIO_RUNTIME_LIBRARIES}
|
|
|
|
${GNURADIO_BLOCKS_LIBRARIES}
|
|
|
|
${GNURADIO_FILTER_LIBRARIES}
|
|
|
|
${GNURADIO_ANALOG_LIBRARIES}
|
2014-03-23 09:45:03 +00:00
|
|
|
${ARMADILLO_LIBRARIES}
|
2014-03-28 17:52:51 +00:00
|
|
|
${VOLK_LIBRARIES}
|
2016-04-21 16:54:08 +00:00
|
|
|
channel_fsm
|
2016-09-23 19:59:00 +00:00
|
|
|
gnss_sp_libs
|
2015-07-16 12:55:52 +00:00
|
|
|
gnss_rx
|
2016-09-23 19:59:00 +00:00
|
|
|
gnss_system_parameters
|
2013-11-13 21:07:33 +00:00
|
|
|
signal_generator_blocks
|
2013-11-15 17:45:24 +00:00
|
|
|
signal_generator_adapters
|
2014-03-15 01:21:17 +00:00
|
|
|
pvt_gr_blocks
|
2017-02-05 19:07:34 +00:00
|
|
|
signal_processing_testing_lib
|
2016-10-27 06:23:25 +00:00
|
|
|
${VOLK_GNSSSDR_LIBRARIES}
|
2017-11-26 17:59:00 +00:00
|
|
|
${MATIO_LIBRARIES}
|
Improving handling of optional processing blocks and linking libraries.
New options ENABLE_GN3S, ENABLE_RTLSDR, ENABLE_OPENCL, ENABLE_ARRAY and
ENABLE_GPERFTOOLS, all set by default to OFF. Users can enable that
features by 'cmake -DENABLE_XXX=ON ../ '. OpenCL is now not used by
default since it was giving problems in some platforms. Old variables
(RTSDR_DRIVER, GN3S_DRIVER, RAW_ARRAY_DRIVER and DISABLE_OPENCL) are
still honored and can be used in the same way, but the new ENABLE_XXX
are recommended for the sake of more uniform naming. Main CMakeFile.txt
has been rearranged, putting options first, then searching for the
required libraries, and then the optional ones. If Gperftools is enabled
and found, binaries are linked to the tcmalloc and profiler libraries,
and using the adequate flags. Fixed building in Mac OSX if Armadillo and
OpenBLAS were not installed in the system.
2014-08-07 19:04:01 +00:00
|
|
|
${GNSS_SDR_TEST_OPTIONAL_LIBS}
|
2016-10-01 23:59:12 +00:00
|
|
|
)
|
2016-11-27 12:44:43 +00:00
|
|
|
if(NOT ${GTEST_DIR_LOCAL})
|
2017-11-04 18:22:40 +00:00
|
|
|
add_dependencies(run_tests gtest-${GNSSSDR_GTEST_LOCAL_VERSION})
|
2016-11-27 12:44:43 +00:00
|
|
|
endif(NOT ${GTEST_DIR_LOCAL})
|
2017-06-21 13:41:04 +00:00
|
|
|
|
2017-02-17 00:02:07 +00:00
|
|
|
if(ENABLE_INSTALL_TESTS)
|
|
|
|
if(EXISTS ${CMAKE_SOURCE_DIR}/install/run_tests)
|
|
|
|
file(REMOVE ${CMAKE_SOURCE_DIR}/install/run_tests)
|
|
|
|
endif(EXISTS ${CMAKE_SOURCE_DIR}/install/run_tests)
|
2017-02-16 18:41:11 +00:00
|
|
|
install(TARGETS run_tests RUNTIME DESTINATION bin COMPONENT "run_tests")
|
2017-02-17 00:02:07 +00:00
|
|
|
else(ENABLE_INSTALL_TESTS)
|
|
|
|
add_custom_command(TARGET run_tests POST_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:run_tests>
|
|
|
|
${CMAKE_SOURCE_DIR}/install/$<TARGET_FILE_NAME:run_tests>)
|
|
|
|
endif(ENABLE_INSTALL_TESTS)
|
2016-10-01 23:59:12 +00:00
|
|
|
endif(ENABLE_UNIT_TESTING)
|
2012-12-28 15:40:03 +00:00
|
|
|
|
2017-02-15 21:10:06 +00:00
|
|
|
if(ENABLE_FPGA)
|
|
|
|
add_executable(gps_l1_ca_dll_pll_tracking_test_fpga
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/single_test_main.cc
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test_fpga.cc )
|
|
|
|
target_link_libraries(gps_l1_ca_dll_pll_tracking_test_fpga
|
|
|
|
${Boost_LIBRARIES}
|
|
|
|
${GFlags_LIBS}
|
|
|
|
${GLOG_LIBRARIES}
|
|
|
|
${GTEST_LIBRARIES}
|
|
|
|
${GNURADIO_RUNTIME_LIBRARIES}
|
|
|
|
${GNURADIO_BLOCKS_LIBRARIES}
|
|
|
|
${ARMADILLO_LIBRARIES}
|
|
|
|
${VOLK_LIBRARIES}
|
2017-11-26 17:59:00 +00:00
|
|
|
${MATIO_LIBRARIES}
|
2017-02-15 21:10:06 +00:00
|
|
|
channel_fsm
|
|
|
|
gnss_sp_libs
|
|
|
|
gnss_rx
|
|
|
|
gnss_system_parameters
|
|
|
|
signal_processing_testing_lib
|
|
|
|
)
|
|
|
|
install(TARGETS gps_l1_ca_dll_pll_tracking_test_fpga
|
|
|
|
RUNTIME DESTINATION bin
|
2017-02-17 00:02:07 +00:00
|
|
|
COMPONENT "fpga-test" )
|
2017-02-15 21:10:06 +00:00
|
|
|
endif(ENABLE_FPGA)
|
|
|
|
|
2016-11-27 23:18:02 +00:00
|
|
|
|
|
|
|
|
2017-02-25 20:13:16 +00:00
|
|
|
################################################################################
|
|
|
|
# System testing
|
|
|
|
################################################################################
|
2018-05-28 13:42:44 +00:00
|
|
|
function(add_system_test executable)
|
|
|
|
## Please call this function with variables OPT_INCLUDES_ and OPT_LIBS_
|
|
|
|
## already defined.
|
|
|
|
set(SYSTEM_TEST_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/system-tests/${executable}.cc)
|
|
|
|
# Ensure that executable is rebuilt if it was previously built and then removed
|
|
|
|
if(NOT EXISTS ${CMAKE_SOURCE_DIR}/install/${executable})
|
|
|
|
execute_process(COMMAND ${CMAKE_COMMAND} -E touch ${SYSTEM_TEST_SOURCES})
|
|
|
|
endif(NOT EXISTS ${CMAKE_SOURCE_DIR}/install/${executable})
|
|
|
|
add_executable(${executable} ${SYSTEM_TEST_SOURCES})
|
|
|
|
|
|
|
|
if(NOT ${GTEST_DIR_LOCAL})
|
|
|
|
add_dependencies(${executable} gtest-${GNSSSDR_GTEST_LOCAL_VERSION} )
|
|
|
|
else(NOT ${GTEST_DIR_LOCAL})
|
|
|
|
add_dependencies(${executable} gtest)
|
|
|
|
endif(NOT ${GTEST_DIR_LOCAL})
|
|
|
|
|
|
|
|
include_directories(${OPT_INCLUDES_})
|
|
|
|
target_link_libraries(${executable} ${OPT_LIBS_} )
|
|
|
|
|
|
|
|
if(ENABLE_INSTALL_TESTS)
|
|
|
|
if(EXISTS ${CMAKE_SOURCE_DIR}/install/${executable})
|
|
|
|
file(REMOVE ${CMAKE_SOURCE_DIR}/install/${executable})
|
|
|
|
endif(EXISTS ${CMAKE_SOURCE_DIR}/install/${executable})
|
|
|
|
install(TARGETS ${executable} RUNTIME DESTINATION bin COMPONENT "${executable}_test")
|
|
|
|
else(ENABLE_INSTALL_TESTS)
|
|
|
|
add_custom_command(TARGET ${executable} POST_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:${executable}>
|
|
|
|
${CMAKE_SOURCE_DIR}/install/$<TARGET_FILE_NAME:${executable}> )
|
|
|
|
endif(ENABLE_INSTALL_TESTS)
|
|
|
|
endfunction(add_system_test)
|
|
|
|
|
|
|
|
|
2017-02-25 20:13:16 +00:00
|
|
|
if(ENABLE_SYSTEM_TESTING)
|
|
|
|
set(HOST_SYSTEM "Unknown")
|
|
|
|
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
|
|
|
set(HOST_SYSTEM "GNU/Linux ${LINUX_DISTRIBUTION} ${LINUX_VER} ${ARCH_}")
|
2017-08-12 11:22:54 +00:00
|
|
|
string(REPLACE "\n" "" HOST_SYSTEM "${HOST_SYSTEM}")
|
2017-02-25 20:13:16 +00:00
|
|
|
endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
|
|
|
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
|
|
|
set(HOST_SYSTEM "MacOS")
|
|
|
|
endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
|
|
|
add_definitions(-DHOST_SYSTEM="${HOST_SYSTEM}")
|
2017-11-20 10:21:23 +00:00
|
|
|
|
2018-05-28 13:42:44 +00:00
|
|
|
#### TTFF
|
|
|
|
set(OPT_LIBS_ ${Boost_LIBRARIES} ${GFlags_LIBS} ${GLOG_LIBRARIES}
|
|
|
|
${GNURADIO_RUNTIME_LIBRARIES} ${GTEST_LIBRARIES}
|
|
|
|
${GNURADIO_BLOCKS_LIBRARIES} ${GNURADIO_FILTER_LIBRARIES}
|
|
|
|
${GNURADIO_ANALOG_LIBRARIES} gnss_sp_libs
|
|
|
|
gnss_rx gnss_system_parameters )
|
2017-11-20 10:21:23 +00:00
|
|
|
|
2018-05-28 13:42:44 +00:00
|
|
|
add_system_test(ttff)
|
2017-02-25 20:13:16 +00:00
|
|
|
|
|
|
|
if(ENABLE_SYSTEM_TESTING_EXTRA)
|
2018-05-28 13:42:44 +00:00
|
|
|
#### POSITION_TEST
|
|
|
|
set(OPT_LIBS_ ${Boost_LIBRARIES} ${GFlags_LIBS} ${GLOG_LIBRARIES}
|
|
|
|
${GTEST_LIBRARIES} ${GNURADIO_RUNTIME_LIBRARIES}
|
|
|
|
${GNURADIO_BLOCKS_LIBRARIES} ${GNURADIO_FILTER_LIBRARIES}
|
|
|
|
${GNURADIO_ANALOG_LIBRARIES} ${VOLK_GNSSSDR_LIBRARIES}
|
2018-08-29 16:53:03 +00:00
|
|
|
gnss_sp_libs gnss_rx gnss_system_parameters
|
|
|
|
system_testing_lib)
|
2018-05-28 13:42:44 +00:00
|
|
|
|
|
|
|
add_system_test(position_test)
|
2017-06-21 13:41:04 +00:00
|
|
|
|
2018-08-29 08:45:02 +00:00
|
|
|
#if(GPSTK_FOUND OR OWN_GPSTK)
|
2018-05-28 13:42:44 +00:00
|
|
|
## OBS_SYSTEM_TEST and OBS_GPS_L1_SYSTEM_TEST
|
2018-08-29 08:45:02 +00:00
|
|
|
# set(OPT_LIBS_ ${GFlags_LIBS} ${GLOG_LIBRARIES} ${GTEST_LIBRARIES}
|
|
|
|
# gnss_sp_libs gnss_rx ${gpstk_libs} )
|
|
|
|
# set(OPT_INCLUDES_ ${GPSTK_INCLUDE_DIRS} ${GPSTK_INCLUDE_DIRS}/gpstk)
|
|
|
|
# add_system_test(obs_gps_l1_system_test)
|
|
|
|
# add_system_test(obs_system_test)
|
|
|
|
#endif(GPSTK_FOUND OR OWN_GPSTK)
|
2017-11-10 11:34:20 +00:00
|
|
|
else(ENABLE_SYSTEM_TESTING_EXTRA)
|
|
|
|
# Avoid working with old executables if they were switched ON and then OFF
|
|
|
|
if(EXISTS ${CMAKE_SOURCE_DIR}/install/position_test)
|
|
|
|
file(REMOVE ${CMAKE_SOURCE_DIR}/install/position_test)
|
|
|
|
endif(EXISTS ${CMAKE_SOURCE_DIR}/install/position_test)
|
2017-02-25 20:13:16 +00:00
|
|
|
endif(ENABLE_SYSTEM_TESTING_EXTRA)
|
2017-11-10 11:34:20 +00:00
|
|
|
else(ENABLE_SYSTEM_TESTING)
|
|
|
|
# Avoid working with old executables if they were switched ON and then OFF
|
|
|
|
if(EXISTS ${CMAKE_SOURCE_DIR}/install/ttff)
|
|
|
|
file(REMOVE ${CMAKE_SOURCE_DIR}/install/ttff)
|
2017-11-20 10:21:23 +00:00
|
|
|
endif(EXISTS ${CMAKE_SOURCE_DIR}/install/ttff)
|
2017-11-10 11:34:20 +00:00
|
|
|
if(EXISTS ${CMAKE_SOURCE_DIR}/install/position_test)
|
|
|
|
file(REMOVE ${CMAKE_SOURCE_DIR}/install/position_test)
|
|
|
|
endif(EXISTS ${CMAKE_SOURCE_DIR}/install/position_test)
|
2017-02-25 20:13:16 +00:00
|
|
|
endif(ENABLE_SYSTEM_TESTING)
|
|
|
|
|
|
|
|
|
2012-12-28 15:40:03 +00:00
|
|
|
#########################################################
|
|
|
|
# Adding Tests to Ctest
|
|
|
|
#########################################################
|
2014-12-19 22:19:50 +00:00
|
|
|
set(CMAKE_CTEST_COMMAND ctest -V)
|
|
|
|
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND})
|
|
|
|
|
2018-03-01 16:30:47 +00:00
|
|
|
add_executable(flowgraph_test ${CMAKE_CURRENT_SOURCE_DIR}/single_test_main.cc
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/control-plane/gnss_flowgraph_test.cc )
|
2018-03-01 18:37:29 +00:00
|
|
|
|
2018-03-01 16:30:47 +00:00
|
|
|
target_link_libraries(flowgraph_test ${Boost_LIBRARIES}
|
|
|
|
${GFlags_LIBS}
|
|
|
|
${GLOG_LIBRARIES}
|
|
|
|
${GNURADIO_RUNTIME_LIBRARIES}
|
|
|
|
${GTEST_LIBRARIES}
|
|
|
|
gnss_sp_libs
|
|
|
|
gnss_rx
|
|
|
|
gnss_system_parameters
|
|
|
|
${VOLK_GNSSSDR_LIBRARIES} )
|
|
|
|
add_test(flowgraph_test flowgraph_test)
|
|
|
|
if(NOT ${GTEST_DIR_LOCAL})
|
|
|
|
add_dependencies(flowgraph_test gtest-${GNSSSDR_GTEST_LOCAL_VERSION})
|
|
|
|
else(NOT ${GTEST_DIR_LOCAL})
|
|
|
|
add_dependencies(flowgraph_test gtest)
|
|
|
|
endif(NOT ${GTEST_DIR_LOCAL})
|
|
|
|
set_property(TEST flowgraph_test PROPERTY TIMEOUT 30)
|
2014-12-24 10:26:36 +00:00
|
|
|
|
2018-03-01 16:30:47 +00:00
|
|
|
#########################################################
|
|
|
|
|
|
|
|
add_executable(gnss_block_test ${CMAKE_CURRENT_SOURCE_DIR}/single_test_main.cc
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/sources/file_signal_source_test.cc
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/filter/fir_filter_test.cc
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/filter/pulse_blanking_filter_test.cc
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/filter/notch_filter_test.cc
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/filter/notch_filter_lite_test.cc
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/adapter/pass_through_test.cc
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/adapter/adapter_test.cc
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/control-plane/gnss_block_factory_test.cc )
|
|
|
|
target_link_libraries(gnss_block_test ${Boost_LIBRARIES}
|
|
|
|
${GFlags_LIBS}
|
|
|
|
${GLOG_LIBRARIES}
|
|
|
|
${GTEST_LIBRARIES}
|
|
|
|
${GNURADIO_RUNTIME_LIBRARIES}
|
|
|
|
${GNURADIO_BLOCKS_LIBRARIES}
|
|
|
|
${GNURADIO_FILTER_LIBRARIES}
|
|
|
|
${GNURADIO_ANALOG_LIBRARIES}
|
|
|
|
gnss_sp_libs
|
|
|
|
gnss_rx
|
|
|
|
gnss_system_parameters
|
|
|
|
${VOLK_GNSSSDR_LIBRARIES} )
|
|
|
|
add_test(gnss_block_test gnss_block_test)
|
|
|
|
if(NOT ${GTEST_DIR_LOCAL})
|
|
|
|
add_dependencies(gnss_block_test gtest-${GNSSSDR_GTEST_LOCAL_VERSION})
|
|
|
|
else(NOT ${GTEST_DIR_LOCAL})
|
|
|
|
add_dependencies(gnss_block_test gtest)
|
|
|
|
endif(NOT ${GTEST_DIR_LOCAL})
|
|
|
|
|
|
|
|
#########################################################
|
2015-10-01 19:55:33 +00:00
|
|
|
|
2017-04-13 18:29:56 +00:00
|
|
|
add_executable(gnuradio_block_test ${CMAKE_CURRENT_SOURCE_DIR}/single_test_main.cc
|
2018-03-01 16:30:47 +00:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/sources/unpack_2bit_samples_test.cc )
|
2015-10-01 19:55:33 +00:00
|
|
|
target_link_libraries(gnuradio_block_test ${Boost_LIBRARIES}
|
2017-04-13 18:29:56 +00:00
|
|
|
${GFlags_LIBS}
|
|
|
|
${GLOG_LIBRARIES}
|
|
|
|
${GTEST_LIBRARIES}
|
|
|
|
${GNURADIO_RUNTIME_LIBRARIES}
|
|
|
|
${GNURADIO_BLOCKS_LIBRARIES}
|
|
|
|
${GNURADIO_FILTER_LIBRARIES}
|
|
|
|
${GNURADIO_ANALOG_LIBRARIES}
|
|
|
|
gnss_sp_libs
|
|
|
|
gnss_rx
|
|
|
|
gnss_system_parameters
|
2018-03-01 16:30:47 +00:00
|
|
|
${VOLK_GNSSSDR_LIBRARIES} )
|
2015-10-01 19:55:33 +00:00
|
|
|
add_test(gnuradio_block_test gnuradio_block_test)
|
|
|
|
if(NOT ${GTEST_DIR_LOCAL})
|
2017-11-04 18:22:40 +00:00
|
|
|
add_dependencies(gnuradio_block_test gtest-${GNSSSDR_GTEST_LOCAL_VERSION})
|
2015-10-01 19:55:33 +00:00
|
|
|
else(NOT ${GTEST_DIR_LOCAL})
|
|
|
|
add_dependencies(gnuradio_block_test gtest)
|
|
|
|
endif(NOT ${GTEST_DIR_LOCAL})
|
2018-03-01 16:30:47 +00:00
|
|
|
|
|
|
|
#########################################################
|
2015-10-01 19:55:33 +00:00
|
|
|
|
2018-02-23 23:13:35 +00:00
|
|
|
add_executable(matio_test ${CMAKE_CURRENT_SOURCE_DIR}/single_test_main.cc
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/arithmetic/matio_test.cc )
|
|
|
|
|
|
|
|
target_link_libraries(matio_test ${Boost_LIBRARIES}
|
|
|
|
${GFlags_LIBS}
|
|
|
|
${GLOG_LIBRARIES}
|
|
|
|
${GTEST_LIBRARIES}
|
|
|
|
${MATIO_LIBRARIES}
|
|
|
|
gnss_system_parameters )
|
|
|
|
add_test(matio_test matio_test)
|
|
|
|
if(NOT ${GTEST_DIR_LOCAL})
|
2018-02-23 23:40:31 +00:00
|
|
|
if(MATIO_FOUND)
|
|
|
|
add_dependencies(matio_test gtest-${GNSSSDR_GTEST_LOCAL_VERSION})
|
|
|
|
else(MATIO_FOUND)
|
|
|
|
add_dependencies(matio_test gtest-${GNSSSDR_GTEST_LOCAL_VERSION} matio-${GNSSSDR_MATIO_LOCAL_VERSION})
|
|
|
|
endif(MATIO_FOUND)
|
2018-02-23 23:13:35 +00:00
|
|
|
else(NOT ${GTEST_DIR_LOCAL})
|
2018-02-23 23:40:31 +00:00
|
|
|
if(MATIO_FOUND)
|
|
|
|
add_dependencies(matio_test gtest)
|
|
|
|
else(MATIO_FOUND)
|
2018-03-01 14:05:04 +00:00
|
|
|
add_dependencies(matio_test gtest matio-${GNSSSDR_MATIO_LOCAL_VERSION})
|
2018-02-23 23:40:31 +00:00
|
|
|
endif(MATIO_FOUND)
|
2018-02-23 23:13:35 +00:00
|
|
|
endif(NOT ${GTEST_DIR_LOCAL})
|
2018-03-01 16:30:47 +00:00
|
|
|
|
|
|
|
#########################################################
|
2018-03-01 14:05:04 +00:00
|
|
|
|
2018-02-23 22:44:57 +00:00
|
|
|
add_executable(acq_test
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/single_test_main.cc
|
2018-03-01 16:30:47 +00:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_test.cc )
|
2018-02-23 22:44:57 +00:00
|
|
|
target_link_libraries(acq_test ${Boost_LIBRARIES}
|
2018-03-01 20:02:48 +00:00
|
|
|
${GFlags_LIBS}
|
|
|
|
${GLOG_LIBRARIES}
|
|
|
|
${GTEST_LIBRARIES}
|
|
|
|
${GNURADIO_RUNTIME_LIBRARIES}
|
|
|
|
${GNURADIO_BLOCKS_LIBRARIES}
|
|
|
|
${GNURADIO_FILTER_LIBRARIES}
|
|
|
|
${GNURADIO_ANALOG_LIBRARIES}
|
|
|
|
gnss_sp_libs
|
|
|
|
gnss_rx
|
|
|
|
gnss_system_parameters
|
|
|
|
signal_generator_blocks
|
|
|
|
signal_processing_testing_lib
|
|
|
|
${VOLK_GNSSSDR_LIBRARIES} )
|
2018-02-23 22:44:57 +00:00
|
|
|
add_test(acq_test acq_test)
|
|
|
|
if(NOT ${GTEST_DIR_LOCAL})
|
|
|
|
add_dependencies(acq_test acq_test gtest-${GNSSSDR_GTEST_LOCAL_VERSION})
|
|
|
|
else(NOT ${GTEST_DIR_LOCAL})
|
|
|
|
add_dependencies(acq_test acq_test gtest)
|
|
|
|
endif(NOT ${GTEST_DIR_LOCAL})
|
|
|
|
|
2018-03-01 16:30:47 +00:00
|
|
|
#########################################################
|
2014-12-21 21:46:57 +00:00
|
|
|
|
2017-04-13 18:29:56 +00:00
|
|
|
add_executable(trk_test ${CMAKE_CURRENT_SOURCE_DIR}/single_test_main.cc
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/tracking/galileo_e1_dll_pll_veml_tracking_test.cc
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/tracking/tracking_loop_filter_test.cc
|
2018-08-14 04:54:00 +00:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/tracking/cpu_multicorrelator_real_codes_test.cc
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/tracking/bayesian_estimation_test.cc )
|
2018-02-23 22:44:57 +00:00
|
|
|
|
2014-12-21 21:46:57 +00:00
|
|
|
target_link_libraries(trk_test ${Boost_LIBRARIES}
|
2016-10-27 06:23:25 +00:00
|
|
|
${GFlags_LIBS}
|
2016-09-23 19:59:00 +00:00
|
|
|
${GLOG_LIBRARIES}
|
2014-12-21 21:46:57 +00:00
|
|
|
${GTEST_LIBRARIES}
|
2016-09-23 19:59:00 +00:00
|
|
|
${GNURADIO_RUNTIME_LIBRARIES}
|
|
|
|
${GNURADIO_BLOCKS_LIBRARIES}
|
|
|
|
${GNURADIO_FILTER_LIBRARIES}
|
|
|
|
${GNURADIO_ANALOG_LIBRARIES}
|
|
|
|
gnss_sp_libs
|
2014-12-21 21:46:57 +00:00
|
|
|
gnss_rx
|
|
|
|
gnss_system_parameters
|
|
|
|
signal_generator_blocks
|
2018-03-01 16:30:47 +00:00
|
|
|
${VOLK_GNSSSDR_LIBRARIES} )
|
2014-12-21 21:46:57 +00:00
|
|
|
add_test(trk_test trk_test)
|
2014-12-24 10:26:36 +00:00
|
|
|
if(NOT ${GTEST_DIR_LOCAL})
|
2017-11-04 18:22:40 +00:00
|
|
|
add_dependencies(trk_test gtest-${GNSSSDR_GTEST_LOCAL_VERSION})
|
2014-12-24 10:26:36 +00:00
|
|
|
else(NOT ${GTEST_DIR_LOCAL})
|
|
|
|
add_dependencies(trk_test gtest)
|
2016-09-23 19:59:00 +00:00
|
|
|
endif(NOT ${GTEST_DIR_LOCAL})
|
2017-04-13 18:29:56 +00:00
|
|
|
|
2018-03-01 20:02:48 +00:00
|
|
|
#########################################################
|
|
|
|
|
|
|
|
if(NOT ENABLE_PACKAGING)
|
|
|
|
add_executable(control_thread_test ${CMAKE_CURRENT_SOURCE_DIR}/single_test_main.cc
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/control-plane/control_message_factory_test.cc
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/control-plane/control_thread_test.cc )
|
|
|
|
|
|
|
|
target_link_libraries(control_thread_test ${Boost_LIBRARIES}
|
|
|
|
${GFlags_LIBS}
|
|
|
|
${GLOG_LIBRARIES}
|
|
|
|
${GTEST_LIBRARIES}
|
|
|
|
gnss_rx )
|
|
|
|
|
|
|
|
add_test(control_thread_test control_thread_test)
|
|
|
|
if(NOT ${GTEST_DIR_LOCAL})
|
|
|
|
add_dependencies(control_thread_test gtest-${GNSSSDR_GTEST_LOCAL_VERSION})
|
|
|
|
else(NOT ${GTEST_DIR_LOCAL})
|
|
|
|
add_dependencies(control_thread_test gtest)
|
|
|
|
endif(NOT ${GTEST_DIR_LOCAL})
|
|
|
|
set_property(TEST control_thread_test PROPERTY TIMEOUT 30)
|
|
|
|
endif(NOT ENABLE_PACKAGING)
|
|
|
|
|
|
|
|
#########################################################
|
|
|
|
|
|
|
|
if(ENABLE_PACKAGING)
|
|
|
|
add_dependencies(check flowgraph_test gnss_block_test
|
|
|
|
gnuradio_block_test acq_test trk_test matio_test)
|
|
|
|
else(ENABLE_PACKAGING)
|
|
|
|
add_dependencies(check control_thread_test flowgraph_test gnss_block_test
|
|
|
|
gnuradio_block_test acq_test trk_test matio_test)
|
2018-03-26 13:06:14 +00:00
|
|
|
endif(ENABLE_PACKAGING)
|