@@ -14,16 +14,10 @@ target_compile_features(errors PRIVATE cxx_std_20)
1414
1515# Check if this project is the main project
1616if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR )
17- option (CHECK_FORMAT "Enable source code formatting check" OFF )
18- option (CHECK_WARNING "Enable static analysis warning check" OFF )
19- option (CHECK_COVERAGE "Enable test coverage check" OFF )
2017 option (BUILD_DOCS "Enable documentations build" OFF )
2118
2219 # Import Format.cmake to format source code
23- if (CHECK_FORMAT)
24- cpmaddpackage("gh:threeal/Format.cmake#auto-install-cmake-format" )
25- add_dependencies (errors fix-format)
26- endif ()
20+ cpmaddpackage("gh:threeal/Format.cmake#auto-install-cmake-format" )
2721
2822 if (BUILD_TESTING)
2923 enable_testing ()
@@ -43,16 +37,14 @@ if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
4337
4438 foreach (TARGET IN LISTS TARGETS)
4539 # Statically analyze code by checking for warnings
46- if (CHECK_WARNING)
47- if (MSVC )
48- target_compile_options (${TARGET} PRIVATE /WX /permissive- /W4 /w14640 /EHsc)
49- else ()
50- target_compile_options (${TARGET} PRIVATE -Werror -Wall -Wextra -Wnon-virtual-dtor -Wpedantic)
51- endif ()
40+ if (MSVC )
41+ target_compile_options (${TARGET} PRIVATE /WX /permissive- /W4 /w14640 /EHsc)
42+ else ()
43+ target_compile_options (${TARGET} PRIVATE -Werror -Wall -Wextra -Wnon-virtual-dtor -Wpedantic)
5244 endif ()
5345
5446 # Enable support to check for test coverage
55- if (BUILD_TESTING AND CHECK_COVERAGE AND NOT MSVC )
47+ if (BUILD_TESTING AND NOT MSVC )
5648 target_compile_options (${TARGET} PRIVATE --coverage -O0)
5749 target_link_options (${TARGET} PRIVATE --coverage)
5850 endif ()
0 commit comments