1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-15 04:30:33 +00:00
gnss-sdr/tests/unit-tests/signal-processing-blocks/libs/CMakeLists.txt

109 lines
3.1 KiB
CMake
Raw Normal View History

# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2010-2020 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
set(SIGNAL_PROCESSING_TESTING_LIB_SOURCES
2017-10-28 16:15:59 +00:00
acquisition_dump_reader.cc
acquisition_msg_rx.cc
tracking_dump_reader.cc
2018-11-24 17:40:34 +00:00
tlm_dump_reader.cc
observables_dump_reader.cc
tracking_true_obs_reader.cc
true_observables_reader.cc
)
file(GLOB SIGNAL_PROCESSING_TESTING_LIB_HEADERS "*.h")
list(SORT SIGNAL_PROCESSING_TESTING_LIB_HEADERS)
2018-11-24 17:40:34 +00:00
if(USE_CMAKE_TARGET_SOURCES)
add_library(signal_processing_testing_lib STATIC)
target_sources(signal_processing_testing_lib
PRIVATE
${SIGNAL_PROCESSING_TESTING_LIB_SOURCES}
PUBLIC
${SIGNAL_PROCESSING_TESTING_LIB_HEADERS}
)
else()
source_group(Headers FILES ${SIGNAL_PROCESSING_TESTING_LIB_HEADERS})
add_library(signal_processing_testing_lib
${SIGNAL_PROCESSING_TESTING_LIB_SOURCES}
${SIGNAL_PROCESSING_TESTING_LIB_HEADERS}
)
endif()
2019-02-03 18:24:44 +00:00
target_link_libraries(signal_processing_testing_lib
PUBLIC
Armadillo::armadillo
Gnuradio::runtime
Gnuradio::pmt
2019-02-03 18:24:44 +00:00
PRIVATE
Boost::headers
2019-02-03 18:24:44 +00:00
Matio::matio
)
if(ENABLE_GLOG_AND_GFLAGS)
target_link_libraries(signal_processing_testing_lib PRIVATE Gflags::gflags Glog::glog)
target_compile_definitions(signal_processing_testing_lib PRIVATE -DUSE_GLOG_AND_GFLAGS=1)
else()
target_link_libraries(signal_processing_testing_lib PRIVATE absl::flags absl::log)
endif()
target_include_directories(signal_processing_testing_lib
PUBLIC
${GNSSSDR_SOURCE_DIR}/src/core/interfaces
INTERFACE
${GNSSSDR_SOURCE_DIR}/tests/common-files
)
if(USE_GENERIC_LAMBDAS)
set(has_generic_lambdas HAS_GENERIC_LAMBDA=1)
set(no_has_generic_lambdas HAS_GENERIC_LAMBDA=0)
target_compile_definitions(signal_processing_testing_lib
PRIVATE
"$<$<COMPILE_FEATURES:cxx_generic_lambdas>:${has_generic_lambdas}>"
"$<$<NOT:$<COMPILE_FEATURES:cxx_generic_lambdas>>:${no_has_generic_lambdas}>"
)
else()
target_compile_definitions(signal_processing_testing_lib
PRIVATE
-DHAS_GENERIC_LAMBDA=0
)
endif()
if(USE_BOOST_BIND_PLACEHOLDERS)
2020-05-18 20:50:34 +00:00
target_compile_definitions(signal_processing_testing_lib
PRIVATE
-DUSE_BOOST_BIND_PLACEHOLDERS=1
2020-05-18 20:50:34 +00:00
)
endif()
if(GNURADIO_USES_STD_POINTERS)
target_compile_definitions(signal_processing_testing_lib
PUBLIC -DGNURADIO_USES_STD_POINTERS=1
)
endif()
if(PMT_USES_BOOST_ANY)
target_compile_definitions(signal_processing_testing_lib
PRIVATE
-DPMT_USES_BOOST_ANY=1
)
endif()
if(ENABLE_CLANG_TIDY)
if(CLANG_TIDY_EXE)
set_target_properties(signal_processing_testing_lib
PROPERTIES
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
)
endif()
endif()
2019-02-03 18:24:44 +00:00
set_property(TARGET signal_processing_testing_lib
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)