2015-01-08 18:49:59 +00:00
|
|
|
# Copyright (C) 2010-2015 (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
|
|
|
|
# along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
#
|
|
|
|
|
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()
|
2014-12-07 19:42:52 +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
|
|
|
|
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
|
2013-10-18 18:26:06 +00:00
|
|
|
set(gtest_RELEASE 1.7.0)
|
2014-10-18 10:39:58 +00:00
|
|
|
if(OS_IS_MACOSX)
|
2013-11-09 10:51:11 +00:00
|
|
|
ExternalProject_Add(
|
|
|
|
gtest-${gtest_RELEASE}
|
|
|
|
URL http://googletest.googlecode.com/files/gtest-${gtest_RELEASE}.zip
|
|
|
|
DOWNLOAD_DIR ${CMAKE_CURRENT_BINARY_DIR}/../../download/gtest-${gtest_RELEASE}
|
|
|
|
URL_MD5 "2d6ec8ccdf5c46b05ba54a9fd1d130d7"
|
|
|
|
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gtest/gtest-${gtest_RELEASE}
|
|
|
|
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/../../gtest-${gtest_RELEASE}
|
2014-10-18 10:39:58 +00:00
|
|
|
CMAKE_ARGS -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
|
2013-11-09 10:51:11 +00:00
|
|
|
UPDATE_COMMAND ""
|
|
|
|
PATCH_COMMAND ""
|
|
|
|
INSTALL_COMMAND ""
|
|
|
|
)
|
2014-10-18 10:39:58 +00:00
|
|
|
else(OS_IS_MACOSX)
|
2013-11-09 10:51:11 +00:00
|
|
|
ExternalProject_Add(
|
|
|
|
gtest-${gtest_RELEASE}
|
|
|
|
URL http://googletest.googlecode.com/files/gtest-${gtest_RELEASE}.zip
|
|
|
|
DOWNLOAD_DIR ${CMAKE_CURRENT_BINARY_DIR}/../../download/gtest-${gtest_RELEASE}
|
|
|
|
URL_MD5 "2d6ec8ccdf5c46b05ba54a9fd1d130d7"
|
|
|
|
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gtest/gtest-${gtest_RELEASE}
|
|
|
|
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/../../gtest-${gtest_RELEASE}
|
|
|
|
UPDATE_COMMAND ""
|
|
|
|
PATCH_COMMAND ""
|
|
|
|
INSTALL_COMMAND ""
|
|
|
|
)
|
2014-10-18 10:39:58 +00:00
|
|
|
endif(OS_IS_MACOSX)
|
2012-12-26 11:19:57 +00:00
|
|
|
# Set up variables
|
|
|
|
# Set recently downloaded and build Googletest root folder
|
|
|
|
set(GTEST_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gtest/gtest-${gtest_RELEASE}")
|
|
|
|
# Source code
|
|
|
|
ExternalProject_Get_Property(gtest-${gtest_RELEASE} source_dir)
|
|
|
|
set(GTEST_INCLUDE_DIR ${source_dir}/include)
|
|
|
|
set(GTEST_INCLUDE_DIRECTORIES ${GTEST_DIR}/include ${GTEST_DIR} ${GTEST_DIR}/src)
|
|
|
|
# Library
|
|
|
|
ExternalProject_Get_Property(gtest-${gtest_RELEASE} 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)
|
2012-12-26 11:19:57 +00:00
|
|
|
set(GTEST_LIBRARY_PATH "${binary_dir}/${CMAKE_FIND_LIBRARY_PREFIXES}gtest.a;${binary_dir}/${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main.a")
|
|
|
|
set(GTEST_LIBRARY gtest-${gtest_RELEASE})
|
|
|
|
set(GTEST_LIBRARIES
|
|
|
|
${binary_dir}/${CMAKE_FIND_LIBRARY_PREFIXES}gtest.a
|
|
|
|
${binary_dir}/${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main.a
|
|
|
|
)
|
|
|
|
set(GTEST_LIB_DIR "${CMAKE_CURRENT_BINARY_DIR}/../../gtest-${gtest_RELEASE}")
|
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
|
|
|
|
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 "")
|
|
|
|
|
|
|
|
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)
|
2012-12-26 11:19:57 +00:00
|
|
|
|
|
|
|
include_directories(
|
|
|
|
${GTEST_INCLUDE_DIRECTORIES}
|
|
|
|
${CMAKE_SOURCE_DIR}/src/core/system_parameters
|
|
|
|
${CMAKE_SOURCE_DIR}/src/core/interfaces
|
|
|
|
${CMAKE_SOURCE_DIR}/src/core/receiver
|
|
|
|
${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
|
2012-12-26 11:19:57 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/src/algorithms/libs
|
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
|
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
|
2012-12-26 11:19:57 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/src/algorithms/signal_source/adapters
|
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
|
2012-12-26 11:19:57 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/src/algorithms/acquisition/adapters
|
|
|
|
${CMAKE_SOURCE_DIR}/src/algorithms/acquisition/gnuradio_blocks
|
|
|
|
${CMAKE_SOURCE_DIR}/src/algorithms/output_filter/adapters
|
2014-03-28 17:52:51 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/src/algorithms/PVT/libs
|
2012-12-26 11:19:57 +00:00
|
|
|
${GLOG_INCLUDE_DIRS}
|
|
|
|
${GFlags_INCLUDE_DIRS}
|
2013-10-18 18:26:06 +00:00
|
|
|
${GNURADIO_RUNTIME_INCLUDE_DIRS}
|
2012-12-26 11:19:57 +00:00
|
|
|
${Boost_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}
|
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}
|
2015-02-15 13:49:17 +00:00
|
|
|
${GNSS_SDR_TEST_OPTIONAL_HEADERS}
|
2012-12-26 11:19:57 +00:00
|
|
|
)
|
|
|
|
|
2013-11-13 21:07:33 +00:00
|
|
|
|
2014-10-18 10:39:58 +00:00
|
|
|
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
2014-11-09 14:31:35 +00:00
|
|
|
set(CLANG_FLAGS "-stdlib=libc++ -std=c++11 -lc++")
|
2014-10-18 10:39:58 +00:00
|
|
|
endif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
|
|
|
|
2013-07-04 13:47:40 +00:00
|
|
|
|
2014-03-15 01:21:17 +00:00
|
|
|
if(OPENCL_FOUND)
|
|
|
|
add_definitions(-DOPENCL_BLOCKS_TEST=1)
|
|
|
|
endif(OPENCL_FOUND)
|
|
|
|
|
2014-03-23 09:45:03 +00:00
|
|
|
add_definitions(-DTEST_PATH="${CMAKE_SOURCE_DIR}/src/tests/")
|
|
|
|
|
|
|
|
|
2012-12-26 11:19:57 +00:00
|
|
|
add_executable(run_tests ${CMAKE_CURRENT_SOURCE_DIR}/test_main.cc)
|
2013-11-15 17:45:24 +00:00
|
|
|
|
2014-11-04 20:28:01 +00:00
|
|
|
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>)
|
|
|
|
|
2014-10-18 10:39:58 +00:00
|
|
|
target_link_libraries(run_tests ${CLANG_FLAGS}
|
2013-11-13 21:07:33 +00:00
|
|
|
${Boost_LIBRARIES}
|
|
|
|
${GFLAGS_LIBS}
|
|
|
|
${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}
|
2013-11-13 21:07:33 +00:00
|
|
|
gnss_sp_libs
|
2015-07-16 12:55:52 +00:00
|
|
|
gnss_rx
|
|
|
|
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
|
|
|
out_adapters
|
|
|
|
pvt_gr_blocks
|
2014-11-07 17:23:59 +00:00
|
|
|
${VOLK_GNSSSDR_LIBRARIES} ${ORC_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}
|
2013-11-15 17:45:24 +00:00
|
|
|
)
|
2013-01-01 11:24:42 +00:00
|
|
|
|
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})
|
|
|
|
|
2014-12-24 10:26:36 +00:00
|
|
|
add_executable(control_thread_test
|
2012-12-28 15:40:03 +00:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/single_test_main.cc
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/control_thread/control_message_factory_test.cc
|
2014-12-21 21:46:57 +00:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/control_thread/control_thread_test.cc
|
2012-12-28 15:40:03 +00:00
|
|
|
)
|
2014-12-24 10:26:36 +00:00
|
|
|
if(NOT ${ENABLE_PACKAGING})
|
|
|
|
set_property(TARGET control_thread_test PROPERTY EXCLUDE_FROM_ALL TRUE)
|
|
|
|
endif(NOT ${ENABLE_PACKAGING})
|
2014-11-04 20:28:01 +00:00
|
|
|
|
2013-11-13 21:07:33 +00:00
|
|
|
target_link_libraries(control_thread_test ${Boost_LIBRARIES}
|
|
|
|
${GFLAGS_LIBS}
|
|
|
|
${GLOG_LIBRARIES}
|
|
|
|
${GTEST_LIBRARIES}
|
2015-07-16 13:46:01 +00:00
|
|
|
gnss_sp_libs
|
|
|
|
gnss_system_parameters
|
2013-11-13 21:07:33 +00:00
|
|
|
gnss_rx
|
2014-12-19 22:19:50 +00:00
|
|
|
${VOLK_GNSSSDR_LIBRARIES} ${ORC_LIBRARIES}
|
2013-11-13 21:07:33 +00:00
|
|
|
)
|
|
|
|
|
2013-08-28 17:17:57 +00:00
|
|
|
add_test(control_thread_test control_thread_test)
|
2014-12-24 10:26:36 +00:00
|
|
|
if(NOT ${GTEST_DIR_LOCAL})
|
|
|
|
add_dependencies(control_thread_test gtest-${gtest_RELEASE})
|
|
|
|
else(NOT ${GTEST_DIR_LOCAL})
|
|
|
|
add_dependencies(control_thread_test gtest)
|
|
|
|
endif(NOT ${GTEST_DIR_LOCAL})
|
2015-01-08 18:49:59 +00:00
|
|
|
set_property(TEST control_thread_test PROPERTY TIMEOUT 30)
|
2012-12-26 11:19:57 +00:00
|
|
|
|
2014-12-24 10:26:36 +00:00
|
|
|
add_executable(flowgraph_test
|
2014-12-21 21:46:57 +00:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/single_test_main.cc
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/flowgraph/gnss_flowgraph_test.cc
|
|
|
|
)
|
2014-12-24 10:26:36 +00:00
|
|
|
if(NOT ${ENABLE_PACKAGING})
|
|
|
|
set_property(TARGET flowgraph_test PROPERTY EXCLUDE_FROM_ALL TRUE)
|
|
|
|
endif(NOT ${ENABLE_PACKAGING})
|
2014-12-21 21:46:57 +00:00
|
|
|
|
|
|
|
target_link_libraries(flowgraph_test ${Boost_LIBRARIES}
|
|
|
|
${GFLAGS_LIBS}
|
|
|
|
${GLOG_LIBRARIES}
|
|
|
|
${GTEST_LIBRARIES}
|
|
|
|
gnss_sp_libs
|
|
|
|
gnss_rx
|
2015-07-16 13:46:01 +00:00
|
|
|
gnss_system_parameters
|
2014-12-21 21:46:57 +00:00
|
|
|
${VOLK_GNSSSDR_LIBRARIES} ${ORC_LIBRARIES}
|
|
|
|
)
|
|
|
|
|
|
|
|
add_test(flowgraph_test flowgraph_test)
|
2014-12-24 10:26:36 +00:00
|
|
|
if(NOT ${GTEST_DIR_LOCAL})
|
|
|
|
add_dependencies(flowgraph_test gtest-${gtest_RELEASE})
|
|
|
|
else(NOT ${GTEST_DIR_LOCAL})
|
|
|
|
add_dependencies(flowgraph_test gtest)
|
|
|
|
endif(NOT ${GTEST_DIR_LOCAL})
|
2015-01-08 18:49:59 +00:00
|
|
|
set_property(TEST flowgraph_test PROPERTY TIMEOUT 30)
|
2014-12-19 22:19:50 +00:00
|
|
|
|
2014-12-24 10:26:36 +00:00
|
|
|
add_executable(gnss_block_test
|
2012-12-28 15:40:03 +00:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/single_test_main.cc
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/gnss_block/file_signal_source_test.cc
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/gnss_block/fir_filter_test.cc
|
2014-12-21 21:46:57 +00:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/flowgraph/pass_through_test.cc
|
2012-12-28 15:40:03 +00:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/gnss_block/file_output_filter_test.cc
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/gnss_block/gnss_block_factory_test.cc
|
|
|
|
)
|
2014-12-24 10:26:36 +00:00
|
|
|
if(NOT ${ENABLE_PACKAGING})
|
|
|
|
set_property(TARGET gnss_block_test PROPERTY EXCLUDE_FROM_ALL TRUE)
|
|
|
|
endif(NOT ${ENABLE_PACKAGING})
|
|
|
|
|
2013-11-13 21:07:33 +00:00
|
|
|
target_link_libraries(gnss_block_test ${Boost_LIBRARIES}
|
|
|
|
${GFLAGS_LIBS}
|
|
|
|
${GLOG_LIBRARIES}
|
2014-12-19 22:19:50 +00:00
|
|
|
${GTEST_LIBRARIES}
|
|
|
|
${GNURADIO_RUNTIME_LIBRARIES}
|
|
|
|
${GNURADIO_BLOCKS_LIBRARIES}
|
|
|
|
${GNURADIO_FILTER_LIBRARIES}
|
|
|
|
${GNURADIO_ANALOG_LIBRARIES}
|
2013-11-13 21:07:33 +00:00
|
|
|
gnss_sp_libs
|
2014-12-19 22:19:50 +00:00
|
|
|
gnss_rx
|
|
|
|
gnss_system_parameters
|
2014-12-21 21:46:57 +00:00
|
|
|
# signal_generator_blocks
|
2014-03-15 01:21:17 +00:00
|
|
|
out_adapters
|
2014-12-19 22:19:50 +00:00
|
|
|
${VOLK_GNSSSDR_LIBRARIES} ${ORC_LIBRARIES}
|
2013-11-13 21:07:33 +00:00
|
|
|
)
|
|
|
|
|
2013-08-28 17:17:57 +00:00
|
|
|
add_test(gnss_block_test gnss_block_test)
|
2014-12-24 10:26:36 +00:00
|
|
|
if(NOT ${GTEST_DIR_LOCAL})
|
|
|
|
add_dependencies(gnss_block_test gtest-${gtest_RELEASE})
|
|
|
|
else(NOT ${GTEST_DIR_LOCAL})
|
|
|
|
add_dependencies(gnss_block_test gtest)
|
|
|
|
endif(NOT ${GTEST_DIR_LOCAL})
|
2014-12-21 21:46:57 +00:00
|
|
|
|
2014-12-24 10:26:36 +00:00
|
|
|
# add_executable(acq_test ${EXCLUDE}
|
2014-12-21 21:46:57 +00:00
|
|
|
# ${CMAKE_CURRENT_SOURCE_DIR}/single_test_main.cc
|
|
|
|
# ${CMAKE_CURRENT_SOURCE_DIR}/gnss_block/gps_l1_ca_pcps_acquisition_test.cc
|
|
|
|
# ${CMAKE_CURRENT_SOURCE_DIR}/gnss_block/galileo_e1_pcps_ambiguous_acquisition_test.cc
|
|
|
|
# )
|
|
|
|
# target_link_libraries(acq_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
|
|
|
|
# signal_generator_blocks
|
|
|
|
# out_adapters
|
|
|
|
# ${VOLK_GNSSSDR_LIBRARIES} ${ORC_LIBRARIES}
|
|
|
|
# )
|
|
|
|
# add_test(acq_test acq_test)
|
|
|
|
|
2014-12-24 10:26:36 +00:00
|
|
|
add_executable(trk_test
|
2014-12-21 21:46:57 +00:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/single_test_main.cc
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/gnss_block/galileo_e1_dll_pll_veml_tracking_test.cc
|
|
|
|
)
|
2014-12-24 10:26:36 +00:00
|
|
|
if(NOT ${ENABLE_PACKAGING})
|
|
|
|
set_property(TARGET trk_test PROPERTY EXCLUDE_FROM_ALL TRUE)
|
|
|
|
endif(NOT ${ENABLE_PACKAGING})
|
|
|
|
|
2014-12-21 21:46:57 +00:00
|
|
|
target_link_libraries(trk_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
|
|
|
|
signal_generator_blocks
|
|
|
|
out_adapters
|
|
|
|
${VOLK_GNSSSDR_LIBRARIES} ${ORC_LIBRARIES}
|
|
|
|
)
|
|
|
|
|
|
|
|
add_test(trk_test trk_test)
|
2014-12-24 10:26:36 +00:00
|
|
|
if(NOT ${GTEST_DIR_LOCAL})
|
|
|
|
add_dependencies(trk_test gtest-${gtest_RELEASE})
|
|
|
|
else(NOT ${GTEST_DIR_LOCAL})
|
|
|
|
add_dependencies(trk_test gtest)
|
|
|
|
endif(NOT ${GTEST_DIR_LOCAL})
|
2014-12-21 21:46:57 +00:00
|
|
|
|
|
|
|
add_dependencies(check control_thread_test flowgraph_test gnss_block_test trk_test)
|
2014-12-24 10:26:36 +00:00
|
|
|
|