File tree Expand file tree Collapse file tree 6 files changed +37
-21
lines changed Expand file tree Collapse file tree 6 files changed +37
-21
lines changed Original file line number Diff line number Diff line change @@ -102,6 +102,10 @@ include(cmake/CompileOptions.cmake)
102102# Project Health Check Setup
103103#
104104
105+ # Add cmake-init template check cmake targets
106+ add_check_template_target(${META_CMAKE_INIT_SHA} )
107+
108+ # Configure health check tools
105109enable_cppcheck(On )
106110enable_clang_tidy(On )
107111
Original file line number Diff line number Diff line change @@ -14,5 +14,10 @@ function(perform_clang_tidy check_target target)
1414 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
1515 )
1616
17+ set_target_properties (${check_target}
18+ PROPERTIES
19+ FOLDER "Maintenance"
20+ )
21+
1722 add_dependencies (${check_target} ${target} )
1823endfunction ()
Original file line number Diff line number Diff line change @@ -18,5 +18,10 @@ function(perform_cppcheck check_target target)
1818 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
1919 )
2020
21+ set_target_properties (${check_target}
22+ PROPERTIES
23+ FOLDER "Maintenance"
24+ )
25+
2126 add_dependencies (${check_target} ${target} )
2227endfunction ()
Original file line number Diff line number Diff line change @@ -9,6 +9,11 @@ set(OPTION_CLANG_TIDY_ENABLED Off)
99function (perform_health_checks target )
1010 if (NOT TARGET check-all )
1111 add_custom_target (check-all )
12+
13+ set_target_properties (check-all
14+ PROPERTIES
15+ FOLDER "Maintenance"
16+ )
1217 endif ()
1318
1419 add_custom_target (check-${target} )
@@ -71,3 +76,21 @@ function(enable_clang_tidy status)
7176
7277 set (CMAKE_EXPORT_COMPILE_COMMANDS On PARENT_SCOPE)
7378endfunction ()
79+
80+ # Configure cmake target to check for cmake-init template
81+ function (add_check_template_target current_template_sha)
82+ add_custom_target (
83+ check-template
84+ COMMAND ${CMAKE_COMMAND}
85+ -DPROJECT_SOURCE_DIR=${PROJECT_SOURCE_DIR}
86+ -DPROJECT_BINARY_DIR =${PROJECT_BINARY_DIR}
87+ -DAPPLIED_CMAKE_INIT_SHA=${current_template_sha}
88+ -P ${PROJECT_SOURCE_DIR} /cmake/CheckTemplate.cmake
89+ WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
90+ )
91+
92+ set_target_properties (check-template
93+ PROPERTIES
94+ FOLDER "Maintenance"
95+ )
96+ endfunction ()
Original file line number Diff line number Diff line change @@ -33,10 +33,3 @@ endif()
3333
3434# Deploy generated headers
3535install (DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} /include /${META_PROJECT_NAME} DESTINATION include COMPONENT dev)
36-
37-
38- #
39- # Project Health
40- #
41-
42- add_subdirectory (scripts)
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments