mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-05-04 16:34:12 +00:00
Deploy a new option -DENABLE_CLANG_TIDY to integrate clang-tidy checks and fixes into the compilation process, if found. It defaults to OFF
This commit is contained in:
parent
0715c4de45
commit
9bc771bed6
@ -41,7 +41,7 @@ endif()
|
||||
|
||||
########################################################################
|
||||
# Determine optional blocks/libraries to be built (default: not built)
|
||||
# Enable them at the command line by doing 'cmake -DENABLE_XXX=ON ../'
|
||||
# Enable them at the command line by doing 'cmake -DENABLE_XXX=ON ..'
|
||||
########################################################################
|
||||
# Support of optional RF front-ends
|
||||
option(ENABLE_UHD "Enable the use of UHD (driver for all USRP devices)" ON)
|
||||
@ -58,6 +58,9 @@ option(ENABLE_RAW_UDP "Enable the use of high-optimized custom UDP packet sample
|
||||
option(ENABLE_GPERFTOOLS "Enable linking to Gperftools libraries (tcmalloc and profiler)" OFF)
|
||||
option(ENABLE_GPROF "Enable the use of the GNU profiler tool 'gprof'" OFF)
|
||||
|
||||
# Code correctness
|
||||
option(ENABLE_CLANG_TIDY "Enable the use of clang-tidy when compiling" OFF)
|
||||
|
||||
# Acceleration
|
||||
option(ENABLE_PROFILING "Enable execution of volk_gnsssdr_profile at the end of the building" OFF)
|
||||
option(ENABLE_OPENCL "Enable building of processing blocks implemented with OpenCL (experimental)" OFF)
|
||||
@ -1529,8 +1532,8 @@ endif()
|
||||
find_package(Doxygen)
|
||||
if(DOXYGEN_FOUND)
|
||||
message(STATUS "Doxygen found.")
|
||||
message(STATUS "You can build the documentation with '${CMAKE_MAKE_PROGRAM_PRETTY_NAME} doc'.")
|
||||
message(STATUS "When done, point your browser to ${CMAKE_BINARY_DIR}/html/index.html")
|
||||
message(STATUS " You can build the documentation with '${CMAKE_MAKE_PROGRAM_PRETTY_NAME} doc'.")
|
||||
message(STATUS " When done, point your browser to ${CMAKE_BINARY_DIR}/html/index.html")
|
||||
set(HAVE_DOT ${DOXYGEN_DOT_FOUND})
|
||||
file(TO_NATIVE_PATH ${CMAKE_SOURCE_DIR} top_srcdir)
|
||||
file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR} top_builddir)
|
||||
@ -1552,7 +1555,7 @@ if(DOXYGEN_FOUND)
|
||||
COMMENT "Generating API documentation with Doxygen." VERBATIM
|
||||
)
|
||||
if(LATEX_COMPILER)
|
||||
message(STATUS "'${CMAKE_MAKE_PROGRAM_PRETTY_NAME} pdfmanual' will generate a manual at ${CMAKE_BINARY_DIR}/docs/GNSS-SDR_manual.pdf")
|
||||
message(STATUS " '${CMAKE_MAKE_PROGRAM_PRETTY_NAME} pdfmanual' will generate a manual at ${CMAKE_BINARY_DIR}/docs/GNSS-SDR_manual.pdf")
|
||||
add_custom_target(pdfmanual
|
||||
COMMAND ${CMAKE_MAKE_PROGRAM}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy refman.pdf ${CMAKE_BINARY_DIR}/docs/GNSS-SDR_manual.pdf
|
||||
@ -1562,7 +1565,7 @@ if(DOXYGEN_FOUND)
|
||||
COMMENT "Generating PDF manual with Doxygen." VERBATIM
|
||||
)
|
||||
endif()
|
||||
message(STATUS "'${CMAKE_MAKE_PROGRAM_PRETTY_NAME} doc-clean' will clean the documentation.")
|
||||
message(STATUS " '${CMAKE_MAKE_PROGRAM_PRETTY_NAME} doc-clean' will clean the documentation.")
|
||||
add_custom_target(doc-clean
|
||||
COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_BINARY_DIR}/docs/html
|
||||
COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_BINARY_DIR}/docs/latex
|
||||
@ -1600,7 +1603,7 @@ if(ENABLE_OPENCL)
|
||||
else()
|
||||
if(OPENCL_FOUND)
|
||||
message(STATUS "OpenCL has been found and will be used by some processing blocks")
|
||||
message(STATUS "You can disable OpenCL use by doing 'cmake -DENABLE_OPENCL=OFF ../' ")
|
||||
message(STATUS " You can disable OpenCL use by doing 'cmake -DENABLE_OPENCL=OFF ..' ")
|
||||
endif()
|
||||
endif()
|
||||
if(ENABLE_GENERIC_ARCH)
|
||||
@ -1627,10 +1630,10 @@ endif()
|
||||
if(ENABLE_CUDA)
|
||||
find_package(CUDA REQUIRED)
|
||||
message(STATUS "NVIDIA CUDA GPU Acceleration will be enabled.")
|
||||
message(STATUS "You can disable it with 'cmake -DENABLE_CUDA=OFF ../'")
|
||||
message(STATUS " You can disable it with 'cmake -DENABLE_CUDA=OFF ..'")
|
||||
else()
|
||||
message(STATUS "NVIDIA CUDA GPU Acceleration will be not enabled.")
|
||||
message(STATUS "Enable it with 'cmake -DENABLE_CUDA=ON ../' to add support for GPU-based acceleration using CUDA.")
|
||||
message(STATUS " Enable it with 'cmake -DENABLE_CUDA=ON ..' to add support for GPU-based acceleration using CUDA.")
|
||||
endif()
|
||||
|
||||
|
||||
@ -1640,7 +1643,7 @@ endif()
|
||||
###############################################################################
|
||||
if(ENABLE_RAW_UDP)
|
||||
message(STATUS "High-optimized custom UDP IP packet source is enabled.")
|
||||
message(STATUS "You can disable it with 'cmake -DENABLE_RAW_UDP=OFF ../'")
|
||||
message(STATUS " You can disable it with 'cmake -DENABLE_RAW_UDP=OFF ..'")
|
||||
find_package(PCAP)
|
||||
if(NOT PCAP_FOUND)
|
||||
message(FATAL_ERROR "PCAP required to compile custom UDP packet sample source (with ENABLE_RAW_UDP=ON)")
|
||||
@ -1654,10 +1657,10 @@ endif()
|
||||
###############################################################################
|
||||
if(ENABLE_FPGA)
|
||||
message(STATUS "FPGA Acceleration will be enabled.")
|
||||
message(STATUS "You can disable it with 'cmake -DENABLE_FPGA=OFF ../'")
|
||||
message(STATUS " You can disable it with 'cmake -DENABLE_FPGA=OFF ..'")
|
||||
else()
|
||||
message(STATUS "Fpga Acceleration will be not enabled.")
|
||||
message(STATUS "Enable it with 'cmake -DENABLE_FPGA=ON ../' to add support for GPU-based acceleration using the FPGA.")
|
||||
message(STATUS " Enable it with 'cmake -DENABLE_FPGA=ON ..' to add support for GPU-based acceleration using the FPGA.")
|
||||
endif()
|
||||
|
||||
|
||||
@ -1707,7 +1710,7 @@ if(ENABLE_OSMOSDR)
|
||||
find_package(GROSMOSDR)
|
||||
if(GROSMOSDR_FOUND)
|
||||
message(STATUS "The driver for OsmoSDR and other front-ends (HackRF, bladeRF, Realtek's RTL2832U-based dongles, etc.) will be compiled.")
|
||||
message(STATUS "You can disable it with 'cmake -DENABLE_OSMOSDR=OFF ../'")
|
||||
message(STATUS " You can disable it with 'cmake -DENABLE_OSMOSDR=OFF ..'")
|
||||
else()
|
||||
if(ENABLE_PACKAGING)
|
||||
message(WARNING "gr-osmosdr has not been found. Source blocks depending on it will NOT be built.")
|
||||
@ -1717,7 +1720,7 @@ if(ENABLE_OSMOSDR)
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "The (optional) driver for OsmoSDR and related front-ends is not enabled.")
|
||||
message(STATUS "Enable it with 'cmake -DENABLE_OSMOSDR=ON ../' to add support for OsmoSDR and other front-ends (HackRF, bladeRF, Realtek's RTL2832U-based USB dongles, etc.)")
|
||||
message(STATUS " Enable it with 'cmake -DENABLE_OSMOSDR=ON ..' to add support for OsmoSDR and other front-ends (HackRF, bladeRF, Realtek's RTL2832U-based USB dongles, etc.)")
|
||||
endif()
|
||||
|
||||
|
||||
@ -1755,10 +1758,10 @@ endif()
|
||||
|
||||
if(ENABLE_FLEXIBAND)
|
||||
message(STATUS "The Teleorbit Flexiband front-end source will be compiled.")
|
||||
message(STATUS "You can disable it with 'cmake -DENABLE_FLEXIBAND=OFF ../'")
|
||||
message(STATUS " You can disable it with 'cmake -DENABLE_FLEXIBAND=OFF ..'")
|
||||
else()
|
||||
message(STATUS "The (optional) Teleorbit Flexiband front-end driver adapter is not enabled.")
|
||||
message(STATUS "Enable it with 'cmake -DENABLE_FLEXIBAND=ON ../' to add support for the Teleorbit Flexiband front-end.")
|
||||
message(STATUS " Enable it with 'cmake -DENABLE_FLEXIBAND=ON ..' to add support for the Teleorbit Flexiband front-end.")
|
||||
endif()
|
||||
if(ENABLE_FLEXIBAND)
|
||||
find_package(TELEORBIT)
|
||||
@ -1780,11 +1783,11 @@ if(GN3S_DRIVER)
|
||||
endif()
|
||||
if(ENABLE_GN3S)
|
||||
message(STATUS "The GN3S driver will be compiled.")
|
||||
message(STATUS "You can disable it with 'cmake -DENABLE_GN3S=OFF ../'")
|
||||
message(STATUS " You can disable it with 'cmake -DENABLE_GN3S=OFF ..'")
|
||||
find_package(GRGN3S QUIET)
|
||||
else()
|
||||
message(STATUS "The (optional and experimental) GN3S driver is not enabled.")
|
||||
message(STATUS "Enable it with 'cmake -DENABLE_GN3S=ON ../' to add support for the GN3S dongle.")
|
||||
message(STATUS " Enable it with 'cmake -DENABLE_GN3S=ON ..' to add support for the GN3S dongle.")
|
||||
endif()
|
||||
|
||||
|
||||
@ -1802,11 +1805,11 @@ endif()
|
||||
|
||||
if(ENABLE_ARRAY)
|
||||
message(STATUS "CTTC's Antenna Array front-end driver will be compiled.")
|
||||
message(STATUS "You can disable it with 'cmake -DENABLE_ARRAY=OFF ../'")
|
||||
message(STATUS " You can disable it with 'cmake -DENABLE_ARRAY=OFF ..'")
|
||||
find_package(GRDBFCTTC QUIET)
|
||||
else()
|
||||
message(STATUS "The (optional) CTTC's Antenna Array front-end driver is not enabled.")
|
||||
message(STATUS "Enable it with 'cmake -DENABLE_ARRAY=ON ../' to add support for the CTTC experimental array front-end.")
|
||||
message(STATUS " Enable it with 'cmake -DENABLE_ARRAY=ON ..' to add support for the CTTC experimental array front-end.")
|
||||
endif()
|
||||
|
||||
|
||||
@ -1818,11 +1821,11 @@ if(ENABLE_GPERFTOOLS)
|
||||
find_package(GPERFTOOLS)
|
||||
if(NOT GPERFTOOLS_FOUND)
|
||||
message(STATUS "Although ENABLE_GPERFTOOLS has been set to ON, GPerftools has not been found.")
|
||||
message(STATUS "Binaries will be compiled without 'tcmalloc' and 'profiler' libraries.")
|
||||
message(STATUS "You can install GPerftools from https://github.com/gperftools/gperftools")
|
||||
message(STATUS " Binaries will be compiled without 'tcmalloc' and 'profiler' libraries.")
|
||||
message(STATUS " You can install GPerftools from https://github.com/gperftools/gperftools")
|
||||
else()
|
||||
message(STATUS "GPerftools libraries found.")
|
||||
message(STATUS "Binaries will be compiled with 'tcmalloc' and 'profiler' libraries.")
|
||||
message(STATUS " Binaries will be compiled with 'tcmalloc' and 'profiler' libraries.")
|
||||
endif()
|
||||
endif()
|
||||
if(ENABLE_GPERFTOOLS)
|
||||
@ -1900,7 +1903,12 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
message(STATUS "clang-tidy not found.")
|
||||
else()
|
||||
message(STATUS "clang-tidy found: ${CLANG_TIDY_EXE}")
|
||||
set(DO_CLANG_TIDY "${CLANG_TIDY_EXE}" "-checks=*")
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
message(STATUS " clang-tidy will be used in compilation. You can disable it with 'cmake -DENABLE_CLANG_TIDY=OFF ..'")
|
||||
else()
|
||||
message(STATUS " You can enable clang-tidy usage in compilation with 'cmake -DENABLE_CLANG_TIDY=ON ..'")
|
||||
endif()
|
||||
set(DO_CLANG_TIDY "${CLANG_TIDY_EXE}" "-fix")
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
endif()
|
||||
endif()
|
||||
|
@ -49,6 +49,15 @@ if(Boost_VERSION LESS 105800)
|
||||
target_compile_definitions(pvt_adapters PRIVATE -DOLD_BOOST=1)
|
||||
endif()
|
||||
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(pvt_adapters
|
||||
PROPERTIES
|
||||
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_property(TARGET pvt_adapters
|
||||
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
|
@ -41,6 +41,15 @@ target_link_libraries(pvt_gr_blocks
|
||||
core_system_parameters
|
||||
)
|
||||
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(pvt_gr_blocks
|
||||
PROPERTIES
|
||||
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
target_include_directories(pvt_gr_blocks
|
||||
PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/src/algorithms/PVT/libs
|
||||
|
@ -79,6 +79,15 @@ target_include_directories(pvt_libs
|
||||
|
||||
target_compile_definitions(pvt_libs PRIVATE -DGNSS_SDR_VERSION="${VERSION}")
|
||||
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(pvt_libs
|
||||
PROPERTIES
|
||||
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_property(TARGET pvt_libs APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src/algorithms/libs>
|
||||
|
@ -110,6 +110,15 @@ target_include_directories(acquisition_adapters
|
||||
${CMAKE_SOURCE_DIR}/src/core/interfaces
|
||||
)
|
||||
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(acquisition_adapters
|
||||
PROPERTIES
|
||||
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_property(TARGET acquisition_adapters
|
||||
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
|
@ -94,6 +94,15 @@ if(OPENCL_FOUND)
|
||||
target_include_directories(acquisition_gr_blocks PUBLIC ${OPENCL_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(acquisition_gr_blocks
|
||||
PROPERTIES
|
||||
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_property(TARGET acquisition_gr_blocks
|
||||
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
|
@ -45,6 +45,15 @@ target_link_libraries(acquisition_libs
|
||||
core_system_parameters
|
||||
)
|
||||
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(acquisition_libs
|
||||
PROPERTIES
|
||||
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_property(TARGET acquisition_libs
|
||||
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
|
@ -41,6 +41,15 @@ target_include_directories(channel_adapters
|
||||
${CMAKE_SOURCE_DIR}/src/core/interfaces
|
||||
)
|
||||
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(channel_adapters
|
||||
PROPERTIES
|
||||
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_property(TARGET channel_adapters
|
||||
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
|
@ -43,6 +43,15 @@ target_link_libraries(channel_libs
|
||||
core_receiver
|
||||
)
|
||||
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(channel_libs
|
||||
PROPERTIES
|
||||
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_property(TARGET channel_libs
|
||||
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
|
@ -47,6 +47,15 @@ target_include_directories(conditioner_adapters
|
||||
${CMAKE_SOURCE_DIR}/src/core/interfaces
|
||||
)
|
||||
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(conditioner_adapters
|
||||
PROPERTIES
|
||||
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_property(TARGET conditioner_adapters
|
||||
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
|
@ -63,6 +63,15 @@ target_include_directories(data_type_adapters
|
||||
${CMAKE_SOURCE_DIR}/src/core/interfaces
|
||||
)
|
||||
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(data_type_adapters
|
||||
PROPERTIES
|
||||
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_property(TARGET data_type_adapters
|
||||
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
|
@ -64,6 +64,15 @@ if(${PC_GNURADIO_RUNTIME_VERSION} VERSION_GREATER "3.7.13.4")
|
||||
target_compile_definitions(input_filter_adapters PUBLIC -DGR_GREATER_38=1)
|
||||
endif()
|
||||
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(input_filter_adapters
|
||||
PROPERTIES
|
||||
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_property(TARGET input_filter_adapters
|
||||
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
|
@ -51,6 +51,15 @@ target_link_libraries(input_filter_gr_blocks
|
||||
Log4cpp::log4cpp
|
||||
)
|
||||
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(input_filter_gr_blocks
|
||||
PROPERTIES
|
||||
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_property(TARGET input_filter_gr_blocks
|
||||
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
|
@ -148,6 +148,15 @@ if(OS_IS_MACOSX)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(algorithms_libs
|
||||
PROPERTIES
|
||||
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
###############################################################################
|
||||
|
||||
source_group(Headers FILES gnss_sdr_flags.h)
|
||||
@ -169,6 +178,15 @@ target_compile_definitions(gnss_sdr_flags
|
||||
PRIVATE -DGNSSSDR_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}"
|
||||
)
|
||||
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(gnss_sdr_flags
|
||||
PROPERTIES
|
||||
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_property(TARGET gnss_sdr_flags
|
||||
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
|
@ -43,6 +43,15 @@ target_link_libraries(obs_adapters
|
||||
Glog::glog
|
||||
)
|
||||
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(obs_adapters
|
||||
PROPERTIES
|
||||
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_property(TARGET obs_adapters
|
||||
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
|
@ -46,6 +46,15 @@ target_link_libraries(obs_gr_blocks
|
||||
algorithms_libs
|
||||
)
|
||||
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(obs_gr_blocks
|
||||
PROPERTIES
|
||||
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_property(TARGET obs_gr_blocks
|
||||
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
|
@ -56,6 +56,15 @@ if(${PC_GNURADIO_RUNTIME_VERSION} VERSION_GREATER "3.7.13.4")
|
||||
target_compile_definitions(resampler_adapters PUBLIC -DGR_GREATER_38=1)
|
||||
endif()
|
||||
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(resampler_adapters
|
||||
PROPERTIES
|
||||
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_property(TARGET resampler_adapters
|
||||
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
|
@ -48,6 +48,15 @@ target_link_libraries(resampler_gr_blocks
|
||||
Glog::glog
|
||||
)
|
||||
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(resampler_gr_blocks
|
||||
PROPERTIES
|
||||
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_property(TARGET resampler_gr_blocks
|
||||
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
|
@ -29,7 +29,7 @@ add_library(signal_generator_adapters
|
||||
target_link_libraries(signal_generator_adapters
|
||||
PUBLIC
|
||||
Gnuradio::blocks
|
||||
signal_generator_blocks
|
||||
signal_generator_gr_blocks
|
||||
PRIVATE
|
||||
Gflags::gflags
|
||||
Glog::glog
|
||||
@ -41,6 +41,15 @@ target_include_directories(signal_generator_adapters
|
||||
${CMAKE_SOURCE_DIR}/src/core/interfaces
|
||||
)
|
||||
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(signal_generator_adapters
|
||||
PROPERTIES
|
||||
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_property(TARGET signal_generator_adapters
|
||||
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
|
@ -21,12 +21,12 @@ set(SIGNAL_GENERATOR_BLOCK_HEADERS signal_generator_c.h)
|
||||
|
||||
source_group(Headers FILES ${SIGNAL_GENERATOR_BLOCK_HEADERS})
|
||||
|
||||
add_library(signal_generator_blocks
|
||||
add_library(signal_generator_gr_blocks
|
||||
${SIGNAL_GENERATOR_BLOCK_SOURCES}
|
||||
${SIGNAL_GENERATOR_BLOCK_HEADERS}
|
||||
)
|
||||
|
||||
target_link_libraries(signal_generator_blocks
|
||||
target_link_libraries(signal_generator_gr_blocks
|
||||
PUBLIC
|
||||
Boost::boost
|
||||
Gnuradio::runtime
|
||||
@ -36,12 +36,21 @@ target_link_libraries(signal_generator_blocks
|
||||
algorithms_libs
|
||||
)
|
||||
|
||||
target_include_directories(signal_generator_blocks
|
||||
target_include_directories(signal_generator_gr_blocks
|
||||
PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/src/algorithms/libs
|
||||
)
|
||||
|
||||
set_property(TARGET signal_generator_blocks
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(signal_generator_gr_blocks
|
||||
PROPERTIES
|
||||
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_property(TARGET signal_generator_gr_blocks
|
||||
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
)
|
||||
|
@ -253,6 +253,15 @@ target_compile_definitions(signal_source_adapters
|
||||
PRIVATE -DGNSSSDR_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}"
|
||||
)
|
||||
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(signal_source_adapters
|
||||
PROPERTIES
|
||||
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_property(TARGET signal_source_adapters APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
)
|
||||
|
@ -84,6 +84,15 @@ if(OS_IS_MACOSX)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(signal_source_gr_blocks
|
||||
PROPERTIES
|
||||
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_property(TARGET signal_source_gr_blocks APPEND PROPERTY
|
||||
INTERFACE_INCLUDE_DIRECTORIES $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
)
|
||||
|
@ -93,6 +93,15 @@ if(ENABLE_FMCOMMS2 OR ENABLE_AD9361)
|
||||
)
|
||||
endif()
|
||||
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(signal_source_libs
|
||||
PROPERTIES
|
||||
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_property(TARGET signal_source_libs APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
)
|
||||
|
@ -67,6 +67,15 @@ target_include_directories(telemetry_decoder_adapters
|
||||
${CMAKE_SOURCE_DIR}/src/core/interfaces
|
||||
)
|
||||
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(telemetry_decoder_adapters
|
||||
PROPERTIES
|
||||
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_property(TARGET telemetry_decoder_adapters
|
||||
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
|
@ -61,6 +61,15 @@ target_link_libraries(telemetry_decoder_gr_blocks
|
||||
Glog::glog
|
||||
)
|
||||
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(telemetry_decoder_gr_blocks
|
||||
PROPERTIES
|
||||
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_property(TARGET telemetry_decoder_gr_blocks
|
||||
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
|
@ -44,6 +44,15 @@ target_link_libraries(telemetry_decoder_libs
|
||||
Glog::glog
|
||||
)
|
||||
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(telemetry_decoder_libs
|
||||
PROPERTIES
|
||||
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_property(TARGET telemetry_decoder_libs
|
||||
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
|
@ -116,6 +116,15 @@ if(ENABLE_CUDA)
|
||||
)
|
||||
endif()
|
||||
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(tracking_adapters
|
||||
PROPERTIES
|
||||
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_property(TARGET tracking_adapters
|
||||
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
|
@ -102,6 +102,15 @@ if(ENABLE_CUDA)
|
||||
)
|
||||
endif()
|
||||
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(tracking_gr_blocks
|
||||
PROPERTIES
|
||||
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_property(TARGET tracking_gr_blocks
|
||||
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
|
@ -100,6 +100,15 @@ if(OS_IS_MACOSX)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(tracking_libs
|
||||
PROPERTIES
|
||||
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_property(TARGET tracking_libs
|
||||
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
|
@ -51,6 +51,15 @@ target_link_libraries(core_libs
|
||||
Pugixml::pugixml
|
||||
)
|
||||
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(core_libs
|
||||
PROPERTIES
|
||||
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_property(TARGET core_libs
|
||||
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
|
@ -44,8 +44,6 @@ target_link_libraries(core_monitor
|
||||
Gnuradio::runtime
|
||||
core_system_parameters
|
||||
PRIVATE
|
||||
Gflags::gflags
|
||||
Glog::glog
|
||||
Gnuradio::pmt
|
||||
)
|
||||
|
||||
@ -58,6 +56,15 @@ if(OS_IS_MACOSX)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(core_monitor
|
||||
PROPERTIES
|
||||
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_property(TARGET core_monitor
|
||||
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
|
@ -33,15 +33,11 @@
|
||||
|
||||
#include "gnss_synchro_monitor.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include <glog/logging.h>
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
#include <utility>
|
||||
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
|
||||
gnss_synchro_monitor_sptr gnss_synchro_make_monitor(unsigned int n_channels,
|
||||
int decimation_factor,
|
||||
int udp_port,
|
||||
|
@ -168,6 +168,15 @@ if(OS_IS_MACOSX)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(core_receiver
|
||||
PROPERTIES
|
||||
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_property(TARGET core_receiver APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
||||
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src/core/receiver>
|
||||
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src/core/interfaces>
|
||||
|
@ -1051,7 +1051,7 @@ void ControlThread::sysv_queue_listener()
|
||||
{
|
||||
typedef struct
|
||||
{
|
||||
long mtype; // required by SysV queue messaging
|
||||
long mtype; // NOLINT(google-runtime-int) required by SysV queue messaging
|
||||
double stop_message;
|
||||
} stop_msgbuf;
|
||||
|
||||
|
@ -117,6 +117,15 @@ target_link_libraries(core_system_parameters
|
||||
Gflags::gflags
|
||||
)
|
||||
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(core_system_parameters
|
||||
PROPERTIES
|
||||
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_property(TARGET core_system_parameters
|
||||
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
|
@ -68,6 +68,15 @@ if(OS_IS_MACOSX)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(gnss-sdr
|
||||
PROPERTIES
|
||||
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_custom_command(TARGET gnss-sdr
|
||||
POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:gnss-sdr>
|
||||
${CMAKE_SOURCE_DIR}/install/$<TARGET_FILE_NAME:gnss-sdr>
|
||||
|
@ -701,7 +701,7 @@ if(NOT ENABLE_PACKAGING)
|
||||
GTest::GTest
|
||||
GTest::Main
|
||||
Volkgnsssdr::volkgnsssdr
|
||||
signal_generator_blocks
|
||||
signal_generator_gr_blocks
|
||||
signal_source_gr_blocks
|
||||
signal_source_libs
|
||||
acquisition_adapters
|
||||
@ -746,7 +746,7 @@ if(NOT ENABLE_PACKAGING)
|
||||
signal_source_libs
|
||||
algorithms_libs
|
||||
tracking_adapters
|
||||
signal_generator_blocks
|
||||
signal_generator_gr_blocks
|
||||
core_receiver
|
||||
core_system_parameters
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user