File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,10 @@ target_compile_features(errors PRIVATE cxx_std_20)
16
16
if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR )
17
17
option (BUILD_DOCS "Enable documentations build" OFF )
18
18
19
+ # Statically analyze code by checking for warnings
20
+ cpmaddpackage (gh:threeal/CheckWarning.cmake@2.0.1 )
21
+ add_check_warning ()
22
+
19
23
# Import Format.cmake to format source code
20
24
cpmaddpackage (
21
25
GITHUB_REPOSITORY TheLartians/Format.cmake
@@ -51,15 +55,6 @@ if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
51
55
catch_discover_tests (errors_test )
52
56
endif ()
53
57
54
- # Get all targets in this directory
55
- get_property (TARGETS DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY BUILDSYSTEM_TARGETS )
56
-
57
- cpmaddpackage (gh:threeal/CheckWarning.cmake@1.1.0 )
58
- foreach (TARGET IN LISTS TARGETS )
59
- # Statically analyze code by checking for warnings
60
- target_check_warning (${TARGET} )
61
- endforeach ()
62
-
63
58
# Build XML documentation
64
59
if (BUILD_DOCS )
65
60
include (cmake/add_xml_docs.cmake )
You can’t perform that action at this time.
0 commit comments