2020-01-13 00:49:00 +00:00
|
|
|
# Copyright (C) 2012-2020 (see AUTHORS file for a list of contributors)
|
2012-12-24 02:33:50 +00:00
|
|
|
#
|
2020-02-11 23:04:29 +00:00
|
|
|
# GNSS-SDR is a software-defined Global Navigation Satellite Systems receiver
|
|
|
|
#
|
2012-12-24 02:33:50 +00:00
|
|
|
# This file is part of GNSS-SDR.
|
|
|
|
#
|
2020-02-08 00:20:02 +00:00
|
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
2012-12-24 02:33:50 +00:00
|
|
|
#
|
|
|
|
|
2015-07-22 16:16:54 +00:00
|
|
|
|
2018-03-01 14:05:04 +00:00
|
|
|
set(TRACKING_LIB_SOURCES
|
2018-11-21 23:35:21 +00:00
|
|
|
cpu_multicorrelator.cc
|
|
|
|
cpu_multicorrelator_real_codes.cc
|
|
|
|
cpu_multicorrelator_16sc.cc
|
|
|
|
lock_detectors.cc
|
|
|
|
tcp_communication.cc
|
|
|
|
tcp_packet_data.cc
|
|
|
|
tracking_2nd_DLL_filter.cc
|
|
|
|
tracking_2nd_PLL_filter.cc
|
|
|
|
tracking_discriminators.cc
|
|
|
|
tracking_FLL_PLL_filter.cc
|
|
|
|
tracking_loop_filter.cc
|
|
|
|
dll_pll_conf.cc
|
|
|
|
bayesian_estimation.cc
|
2019-04-25 06:50:21 +00:00
|
|
|
exponential_smoother.cc
|
2012-12-24 02:33:50 +00:00
|
|
|
)
|
|
|
|
|
2018-10-04 20:35:44 +00:00
|
|
|
set(TRACKING_LIB_HEADERS
|
2018-11-21 23:35:21 +00:00
|
|
|
cpu_multicorrelator.h
|
|
|
|
cpu_multicorrelator_real_codes.h
|
|
|
|
cpu_multicorrelator_16sc.h
|
|
|
|
lock_detectors.h
|
|
|
|
tcp_communication.h
|
|
|
|
tcp_packet_data.h
|
|
|
|
tracking_2nd_DLL_filter.h
|
|
|
|
tracking_2nd_PLL_filter.h
|
|
|
|
tracking_discriminators.h
|
|
|
|
tracking_FLL_PLL_filter.h
|
|
|
|
tracking_loop_filter.h
|
|
|
|
dll_pll_conf.h
|
|
|
|
bayesian_estimation.h
|
2019-04-25 06:50:21 +00:00
|
|
|
exponential_smoother.h
|
2018-10-04 20:35:44 +00:00
|
|
|
)
|
|
|
|
|
2019-06-24 18:02:19 +00:00
|
|
|
|
|
|
|
if(ENABLE_CUDA)
|
|
|
|
if(CMAKE_VERSION VERSION_GREATER 3.11)
|
|
|
|
set(TRACKING_LIB_SOURCES ${TRACKING_LIB_SOURCES} cuda_multicorrelator.cu)
|
|
|
|
set(TRACKING_LIB_HEADERS ${TRACKING_LIB_HEADERS} cuda_multicorrelator.h)
|
|
|
|
else()
|
|
|
|
list(APPEND CUDA_NVCC_FLAGS "-gencode arch=compute_30,code=sm_30; -std=c++11;-O3; -use_fast_math -default-stream per-thread")
|
|
|
|
set(CUDA_PROPAGATE_HOST_FLAGS OFF)
|
|
|
|
cuda_include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
|
|
|
set(LIB_TYPE STATIC) #set the lib type
|
|
|
|
cuda_add_library(CUDA_CORRELATOR_LIB ${LIB_TYPE} cuda_multicorrelator.h cuda_multicorrelator.cu)
|
|
|
|
set(OPT_TRACKING_LIBRARIES ${OPT_TRACKING_LIBRARIES} CUDA_CORRELATOR_LIB)
|
|
|
|
set(OPT_TRACKING_INCLUDES ${OPT_TRACKING_INCLUDES} ${CUDA_INCLUDE_DIRS})
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2019-06-15 08:11:11 +00:00
|
|
|
if(ARMADILLO_VERSION_STRING VERSION_GREATER 7.400)
|
|
|
|
# sqrtmat_sympd() requires 7.400
|
2019-06-14 16:22:07 +00:00
|
|
|
set(TRACKING_LIB_SOURCES ${TRACKING_LIB_SOURCES} nonlinear_tracking.cc)
|
|
|
|
set(TRACKING_LIB_HEADERS ${TRACKING_LIB_HEADERS} nonlinear_tracking.h)
|
|
|
|
endif()
|
|
|
|
|
2017-02-13 16:20:49 +00:00
|
|
|
if(ENABLE_FPGA)
|
2018-10-04 20:35:44 +00:00
|
|
|
set(TRACKING_LIB_SOURCES ${TRACKING_LIB_SOURCES} fpga_multicorrelator.cc dll_pll_conf_fpga.cc)
|
|
|
|
set(TRACKING_LIB_HEADERS ${TRACKING_LIB_HEADERS} fpga_multicorrelator.h dll_pll_conf_fpga.h)
|
2018-11-24 17:40:34 +00:00
|
|
|
endif()
|
2017-02-13 16:20:49 +00:00
|
|
|
|
2016-05-23 17:51:59 +00:00
|
|
|
list(SORT TRACKING_LIB_HEADERS)
|
2018-10-04 20:35:44 +00:00
|
|
|
list(SORT TRACKING_LIB_SOURCES)
|
|
|
|
|
2014-06-28 01:55:57 +00:00
|
|
|
source_group(Headers FILES ${TRACKING_LIB_HEADERS})
|
2018-11-21 23:35:21 +00:00
|
|
|
|
2019-02-10 17:34:28 +00:00
|
|
|
add_library(tracking_libs ${TRACKING_LIB_SOURCES} ${TRACKING_LIB_HEADERS})
|
2019-02-04 21:44:45 +00:00
|
|
|
|
2019-02-10 17:34:28 +00:00
|
|
|
target_link_libraries(tracking_libs
|
2019-02-03 18:24:44 +00:00
|
|
|
PUBLIC
|
|
|
|
Armadillo::armadillo
|
2019-09-07 10:36:19 +00:00
|
|
|
Boost::headers
|
2019-02-03 18:24:44 +00:00
|
|
|
Gnuradio::runtime
|
|
|
|
Volkgnsssdr::volkgnsssdr
|
2019-02-10 17:34:28 +00:00
|
|
|
core_system_parameters
|
2019-06-14 16:22:07 +00:00
|
|
|
algorithms_libs
|
2019-02-03 18:24:44 +00:00
|
|
|
${OPT_TRACKING_LIBRARIES}
|
|
|
|
PRIVATE
|
2020-02-10 18:51:33 +00:00
|
|
|
gnss_sdr_flags
|
2019-02-03 18:24:44 +00:00
|
|
|
Gflags::gflags
|
|
|
|
Glog::glog
|
2018-11-21 23:35:21 +00:00
|
|
|
)
|
2016-01-19 18:43:09 +00:00
|
|
|
|
2019-06-24 18:02:19 +00:00
|
|
|
if(NOT CMAKE_VERSION VERSION_GREATER 3.11)
|
|
|
|
target_link_libraries(tracking_libs
|
|
|
|
PUBLIC
|
|
|
|
${OPT_TRACKING_LIBRARIES}
|
|
|
|
)
|
|
|
|
target_include_directories(tracking_libs
|
|
|
|
PUBLIC
|
|
|
|
${OPT_TRACKING_INCLUDES}
|
|
|
|
)
|
|
|
|
endif()
|
2019-05-08 17:31:13 +00:00
|
|
|
|
2019-07-22 12:13:57 +00:00
|
|
|
if(Boost_VERSION_STRING VERSION_GREATER 1.65.99)
|
2019-05-08 14:15:59 +00:00
|
|
|
target_compile_definitions(tracking_libs
|
|
|
|
PUBLIC
|
|
|
|
-DBOOST_GREATER_1_65
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2019-05-26 00:09:53 +00:00
|
|
|
# Fix for Boost Asio < 1.70
|
2020-01-13 00:49:00 +00:00
|
|
|
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
2019-07-22 12:13:57 +00:00
|
|
|
if((CMAKE_CXX_COMPILER_ID MATCHES "Clang") AND (Boost_VERSION_STRING VERSION_LESS 1.70.0))
|
2019-05-26 00:09:53 +00:00
|
|
|
if(${has_string_view})
|
|
|
|
target_compile_definitions(tracking_libs
|
|
|
|
PUBLIC
|
|
|
|
-DBOOST_ASIO_HAS_STD_STRING_VIEW=1
|
|
|
|
)
|
|
|
|
else()
|
|
|
|
target_compile_definitions(tracking_libs
|
|
|
|
PUBLIC
|
|
|
|
-DBOOST_ASIO_HAS_STD_STRING_VIEW=0
|
|
|
|
)
|
|
|
|
endif()
|
2019-02-20 21:21:53 +00:00
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2019-08-12 09:33:51 +00:00
|
|
|
if(ENABLE_ARMA_NO_DEBUG)
|
2019-07-29 19:22:44 +00:00
|
|
|
target_compile_definitions(tracking_libs
|
|
|
|
PUBLIC -DARMA_NO_BOUND_CHECKING=1
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2019-02-21 08:59:06 +00:00
|
|
|
if(ENABLE_CLANG_TIDY)
|
|
|
|
if(CLANG_TIDY_EXE)
|
|
|
|
set_target_properties(tracking_libs
|
|
|
|
PROPERTIES
|
|
|
|
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2019-02-10 17:34:28 +00:00
|
|
|
set_property(TARGET tracking_libs
|
2019-02-03 18:24:44 +00:00
|
|
|
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
|
|
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
|
|
|
)
|