mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-16 04:05:46 +00:00
Extend clang-tidy checking to tests and utils
This commit is contained in:
parent
78afe4834d
commit
b617213784
@ -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 $<TARGET_FILE:${executable}>
|
||||
${CMAKE_SOURCE_DIR}/install/$<TARGET_FILE_NAME:${executable}>)
|
||||
endif()
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(${executable}
|
||||
PROPERTIES
|
||||
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
|
||||
|
@ -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");
|
||||
|
@ -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
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
|
@ -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
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
|
@ -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 $<TARGET_FILE:front-end-cal>
|
||||
${CMAKE_SOURCE_DIR}/install/$<TARGET_FILE_NAME:front-end-cal>)
|
||||
|
@ -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 $<TARGET_FILE:rinex2assist>
|
||||
${CMAKE_SOURCE_DIR}/install/$<TARGET_FILE_NAME:rinex2assist>
|
||||
|
Loading…
Reference in New Issue
Block a user