@@ -130,6 +130,8 @@ endif()
130130
131131find_package (Threads REQUIRED )
132132
133+ include (cmake/clang-tidy.cmake ) # Static analysis with clang-tidy
134+
133135#-------------------------------
134136# SOURCE FILES CONFIGURATION
135137#-------------------------------
@@ -265,26 +267,6 @@ if(SDBUSCPP_BUILD_DOCS)
265267 add_subdirectory ("${CMAKE_CURRENT_SOURCE_DIR } /docs" )
266268endif ()
267269
268- #----------------------------------
269- # STATIC ANALYSIS
270- #----------------------------------
271-
272- if (SDBUSCPP_CLANG_TIDY)
273- message (STATUS "Building with static analysis" )
274- find_program (CLANG_TIDY NAMES clang-tidy )
275- if (NOT CLANG_TIDY)
276- message (WARNING "clang-tidy not found" )
277- else ()
278- message (STATUS "clang-tidy found: ${CLANG_TIDY} " )
279- # TODO: Check what happens if the targets don't exist
280- set_target_properties (sdbus-c++-objlib PROPERTIES CXX_CLANG_TIDY "${CLANG_TIDY} " )
281- set_target_properties (sdbus-c++ PROPERTIES CXX_CLANG_TIDY "${CLANG_TIDY} " )
282- set_target_properties (sdbus-c++-unit-tests PROPERTIES CXX_CLANG_TIDY "${CLANG_TIDY} " )
283- #set_target_properties(sdbus-c++-integration-tests PROPERTIES CXX_CLANG_TIDY "${CLANG_TIDY}")
284- set_target_properties (sdbus-c++-stress-tests PROPERTIES CXX_CLANG_TIDY "${CLANG_TIDY} " )
285- endif ()
286- endif ()
287-
288270#----------------------------------
289271# CMAKE CONFIG & PACKAGE CONFIG
290272#----------------------------------
0 commit comments