2018-05-13 20:49:11 +00:00
|
|
|
# Copyright (C) 2012-2018 (see AUTHORS file for a list of contributors)
|
2012-12-24 02:33:50 +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
|
2014-06-28 01:55:57 +00:00
|
|
|
# (at your option) any later version.
|
2012-12-24 02:33:50 +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 02:33:50 +00:00
|
|
|
#
|
|
|
|
|
2015-07-22 16:16:54 +00:00
|
|
|
|
|
|
|
if(ENABLE_CUDA)
|
2015-11-26 17:44:04 +00:00
|
|
|
# Append current NVCC flags by something, eg comput capability
|
|
|
|
# set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} --gpu-architecture sm_30)
|
|
|
|
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} )
|
2015-07-22 16:16:54 +00:00
|
|
|
endif(ENABLE_CUDA)
|
|
|
|
|
|
|
|
|
2018-03-01 14:05:04 +00:00
|
|
|
set(TRACKING_LIB_SOURCES
|
2015-11-17 18:14:55 +00:00
|
|
|
cpu_multicorrelator.cc
|
2017-09-11 14:21:05 +00:00
|
|
|
cpu_multicorrelator_real_codes.cc
|
2018-03-01 14:05:04 +00:00
|
|
|
cpu_multicorrelator_16sc.cc
|
2012-12-24 02:33:50 +00:00
|
|
|
lock_detectors.cc
|
|
|
|
tcp_communication.cc
|
|
|
|
tcp_packet_data.cc
|
|
|
|
tracking_2nd_DLL_filter.cc
|
|
|
|
tracking_2nd_PLL_filter.cc
|
|
|
|
tracking_discriminators.cc
|
2015-07-22 16:16:54 +00:00
|
|
|
tracking_FLL_PLL_filter.cc
|
2015-10-24 08:42:04 +00:00
|
|
|
tracking_loop_filter.cc
|
2018-06-19 09:36:15 +00:00
|
|
|
dll_pll_conf.cc
|
2018-07-09 15:46:34 +00:00
|
|
|
bayesian_estimation.cc
|
2012-12-24 02:33:50 +00:00
|
|
|
)
|
|
|
|
|
2018-10-04 20:35:44 +00:00
|
|
|
set(TRACKING_LIB_HEADERS
|
|
|
|
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
|
|
|
|
)
|
|
|
|
|
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)
|
2017-02-13 16:20:49 +00:00
|
|
|
endif(ENABLE_FPGA)
|
|
|
|
|
2012-12-24 02:33:50 +00:00
|
|
|
include_directories(
|
2017-06-21 06:54:47 +00:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
2012-12-24 02:33:50 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/src/core/system_parameters
|
|
|
|
${CMAKE_SOURCE_DIR}/src/core/interfaces
|
|
|
|
${CMAKE_SOURCE_DIR}/src/core/receiver
|
2018-03-02 16:40:13 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/src/algorithms/libs
|
2018-07-20 11:19:41 +00:00
|
|
|
${ARMADILLO_INCLUDE_DIRS}
|
2012-12-24 02:33:50 +00:00
|
|
|
${VOLK_INCLUDE_DIRS}
|
2015-11-30 18:02:56 +00:00
|
|
|
${GLOG_INCLUDE_DIRS}
|
|
|
|
${GFlags_INCLUDE_DIRS}
|
2015-11-26 17:44:04 +00:00
|
|
|
${OPT_TRACKING_INCLUDES}
|
2016-01-12 17:58:00 +00:00
|
|
|
${VOLK_GNSSSDR_INCLUDE_DIRS}
|
2012-12-24 02:33:50 +00:00
|
|
|
)
|
|
|
|
|
2014-09-07 17:35:41 +00:00
|
|
|
if(ENABLE_GENERIC_ARCH)
|
|
|
|
add_definitions( -DGENERIC_ARCH=1 )
|
|
|
|
endif(ENABLE_GENERIC_ARCH)
|
|
|
|
|
2014-09-17 14:50:44 +00:00
|
|
|
if (SSE3_AVAILABLE)
|
|
|
|
add_definitions( -DHAVE_SSE3=1 )
|
|
|
|
endif(SSE3_AVAILABLE)
|
|
|
|
|
2015-07-22 16:16:54 +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
|
|
|
add_library(tracking_lib ${TRACKING_LIB_SOURCES} ${TRACKING_LIB_HEADERS})
|
|
|
|
source_group(Headers FILES ${TRACKING_LIB_HEADERS})
|
2018-03-01 14:05:04 +00:00
|
|
|
target_link_libraries(tracking_lib ${OPT_TRACKING_LIBRARIES} ${VOLK_LIBRARIES} ${VOLK_GNSSSDR_LIBRARIES} ${Boost_LIBRARIES} ${GNURADIO_RUNTIME_LIBRARIES})
|
2016-01-19 18:43:09 +00:00
|
|
|
|
|
|
|
if(VOLK_GNSSSDR_FOUND)
|
|
|
|
add_dependencies(tracking_lib glog-${glog_RELEASE})
|
|
|
|
else(VOLK_GNSSSDR_FOUND)
|
|
|
|
add_dependencies(tracking_lib glog-${glog_RELEASE} volk_gnsssdr_module)
|
|
|
|
endif()
|