enable clang-tidy for srslte_upper library

master
Andre Puschmann 6 years ago
parent 34535c7efb
commit 7572299615

@ -359,7 +359,7 @@ if(NOT CLANG_TIDY_BIN)
message(STATUS "clang-tidy not found.") message(STATUS "clang-tidy not found.")
else() else()
message(STATUS "clang-tidy found: ${CLANG_TIDY_BIN}") message(STATUS "clang-tidy found: ${CLANG_TIDY_BIN}")
set(DO_CLANG_TIDY "${CLANG_TIDY_BIN}" "-checks=*,-clang-analyzer-alpha.*") set(DO_CLANG_TIDY "${CLANG_TIDY_BIN}" "-checks=*,-clang-analyzer-alpha.*,-modernize-*,-cppcoreguidelines-pro-type-vararg,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-cppcoreguidelines-pro-bounds-constant-array-index")
endif() endif()

@ -22,3 +22,8 @@ file(GLOB SOURCES "*.cc")
add_library(srslte_upper STATIC ${SOURCES}) add_library(srslte_upper STATIC ${SOURCES})
target_link_libraries(srslte_upper srslte_common srslte_asn1) target_link_libraries(srslte_upper srslte_common srslte_asn1)
install(TARGETS srslte_upper DESTINATION ${LIBRARY_DIR}) install(TARGETS srslte_upper DESTINATION ${LIBRARY_DIR})
# Run clang-tidy if available
if(CLANG_TIDY_BIN)
set_target_properties(srslte_upper PROPERTIES CXX_CLANG_TIDY "${DO_CLANG_TIDY}")
endif()

@ -36,6 +36,11 @@ add_test(rlc_am_stress_test rlc_stress_test --mode=AM --loglevel 1 --sdu_gen_del
add_test(rlc_um_stress_test rlc_stress_test --mode=UM --loglevel 1) add_test(rlc_um_stress_test rlc_stress_test --mode=UM --loglevel 1)
add_test(rlc_tm_stress_test rlc_stress_test --mode=TM --loglevel 1 --opp_sdu_ratio=1.0) add_test(rlc_tm_stress_test rlc_stress_test --mode=TM --loglevel 1 --opp_sdu_ratio=1.0)
# Run clang-tidy if available
if(CLANG_TIDY_BIN)
set_target_properties(rlc_stress_test PROPERTIES CXX_CLANG_TIDY "${DO_CLANG_TIDY}")
endif()
add_executable(rlc_um_data_test rlc_um_data_test.cc) add_executable(rlc_um_data_test rlc_um_data_test.cc)
target_link_libraries(rlc_um_data_test srslte_upper srslte_phy srslte_common) target_link_libraries(rlc_um_data_test srslte_upper srslte_phy srslte_common)
add_test(rlc_um_data_test rlc_um_data_test) add_test(rlc_um_data_test rlc_um_data_test)

Loading…
Cancel
Save