diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index afe871fdd..196ec6913 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -404,6 +404,14 @@ if(ENABLE_UNIT_TESTING) ) endif() endif() + if(ENABLE_CLANG_TIDY) + if(CLANG_TIDY_EXE) + set_target_properties(run_tests + PROPERTIES + CXX_CLANG_TIDY "${DO_CLANG_TIDY}" + ) + endif() + endif() if(ENABLE_CUDA) target_link_libraries(run_tests PUBLIC @@ -476,6 +484,14 @@ function(add_system_test executable) COMMAND ${CMAKE_COMMAND} -E copy $ ${CMAKE_SOURCE_DIR}/install/$) endif() + if(ENABLE_CLANG_TIDY) + if(CLANG_TIDY_EXE) + set_target_properties(${executable} + PROPERTIES + CXX_CLANG_TIDY "${DO_CLANG_TIDY}" + ) + endif() + endif() endfunction() diff --git a/src/tests/common-files/gnuplot_i.h b/src/tests/common-files/gnuplot_i.h index 983ca0870..afdc47c3a 100644 --- a/src/tests/common-files/gnuplot_i.h +++ b/src/tests/common-files/gnuplot_i.h @@ -2003,7 +2003,7 @@ void Gnuplot::init() // whose name is specified as argument. If the requested variable is not // part of the environment list, the function returns a NULL pointer. #if (defined(unix) || defined(__unix) || defined(__unix__)) && !defined(__APPLE__) - if (std::getenv("DISPLAY") == NULL) + if (std::getenv("DISPLAY") == nullptr) { valid = false; throw GnuplotException("Can't find DISPLAY variable"); diff --git a/src/tests/system-tests/libs/CMakeLists.txt b/src/tests/system-tests/libs/CMakeLists.txt index 921d3cbf0..d29962cdf 100644 --- a/src/tests/system-tests/libs/CMakeLists.txt +++ b/src/tests/system-tests/libs/CMakeLists.txt @@ -41,6 +41,15 @@ target_link_libraries(system_testing_lib Matio::matio ) +if(ENABLE_CLANG_TIDY) + if(CLANG_TIDY_EXE) + set_target_properties(system_testing_lib + PROPERTIES + CXX_CLANG_TIDY "${DO_CLANG_TIDY}" + ) + endif() +endif() + set_property(TARGET system_testing_lib APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES $ diff --git a/src/tests/unit-tests/signal-processing-blocks/libs/CMakeLists.txt b/src/tests/unit-tests/signal-processing-blocks/libs/CMakeLists.txt index b98390b27..1935b7eda 100644 --- a/src/tests/unit-tests/signal-processing-blocks/libs/CMakeLists.txt +++ b/src/tests/unit-tests/signal-processing-blocks/libs/CMakeLists.txt @@ -48,6 +48,15 @@ target_link_libraries(signal_processing_testing_lib Glog::glog ) +if(ENABLE_CLANG_TIDY) + if(CLANG_TIDY_EXE) + set_target_properties(signal_processing_testing_lib + PROPERTIES + CXX_CLANG_TIDY "${DO_CLANG_TIDY}" + ) + endif() +endif() + set_property(TARGET signal_processing_testing_lib APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES $ diff --git a/src/utils/front-end-cal/CMakeLists.txt b/src/utils/front-end-cal/CMakeLists.txt index 061ecbaee..821009d47 100644 --- a/src/utils/front-end-cal/CMakeLists.txt +++ b/src/utils/front-end-cal/CMakeLists.txt @@ -46,6 +46,15 @@ target_link_libraries(front_end_cal_lib Boost::thread ) +if(ENABLE_CLANG_TIDY) + if(CLANG_TIDY_EXE) + set_target_properties(front_end_cal_lib + PROPERTIES + CXX_CLANG_TIDY "${DO_CLANG_TIDY}" + ) + endif() +endif() + add_executable(front-end-cal ${CMAKE_CURRENT_SOURCE_DIR}/main.cc) target_link_libraries(front-end-cal @@ -65,6 +74,15 @@ target_compile_definitions(front-end-cal PUBLIC -DGNSSSDR_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}" ) +if(ENABLE_CLANG_TIDY) + if(CLANG_TIDY_EXE) + set_target_properties(front-end-cal + PROPERTIES + CXX_CLANG_TIDY "${DO_CLANG_TIDY}" + ) + endif() +endif() + add_custom_command(TARGET front-end-cal POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $ ${CMAKE_SOURCE_DIR}/install/$) diff --git a/src/utils/rinex2assist/CMakeLists.txt b/src/utils/rinex2assist/CMakeLists.txt index d42b379b5..9f2c6b911 100644 --- a/src/utils/rinex2assist/CMakeLists.txt +++ b/src/utils/rinex2assist/CMakeLists.txt @@ -86,6 +86,15 @@ if(Boost_FOUND) add_dependencies(rinex2assist gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}) endif() + if(ENABLE_CLANG_TIDY) + if(CLANG_TIDY_EXE) + set_target_properties(rinex2assist + PROPERTIES + CXX_CLANG_TIDY "${DO_CLANG_TIDY}" + ) + endif() + endif() + add_custom_command(TARGET rinex2assist POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $ ${CMAKE_SOURCE_DIR}/install/$