|
1 | 1 | #–– Options.cmake –– user‐facing toggles |
2 | 2 |
|
3 | 3 | # — Build Targets — |
4 | | -option(ENABLE_TESTING "Build unit tests" ON) |
5 | | -option(ENABLE_BENCHMARKS "Build benchmarks" OFF) |
6 | | -option(BUILD_APP "Build the demo application" OFF) |
| 4 | +option(ENABLE_TESTING "Build unit tests" ON) |
| 5 | +option(ENABLE_BENCHMARKS "Build benchmarks" OFF) |
| 6 | +option(BUILD_APP "Build the demo application" OFF) |
7 | 7 |
|
8 | 8 | # — Quality Checks — |
9 | | -option(ENABLE_WARNINGS "Enable compiler warnings" ON) |
10 | | -option(ENABLE_STRICT_WARNINGS "Treat warnings as errors" ON) |
11 | | -option(ENABLE_COVERAGE "Enable coverage instrumentation" OFF) |
12 | | -option(ENABLE_SANITIZERS "Enable ASan / UBSan" OFF) |
13 | | -option(ENABLE_ASAN "Enable AddressSanitizer" OFF) |
14 | | -option(ENABLE_UBSAN "Enable UndefinedBehaviorSanitizer" OFF) |
| 9 | +option(ENABLE_WARNINGS "Enable compiler warnings" ON) |
| 10 | +option(ENABLE_STRICT_WARNINGS "Treat warnings as errors" ON) |
| 11 | +option(ENABLE_COVERAGE "Enable coverage instrumentation" OFF) |
| 12 | +option(ENABLE_SANITIZERS "Enable ASan / UBSan" OFF) |
| 13 | +option(ENABLE_ASAN "Enable AddressSanitizer" OFF) |
| 14 | +option(ENABLE_UBSAN "Enable UndefinedBehaviorSanitizer" OFF) |
15 | 15 |
|
16 | 16 | # — Static Analysis — |
17 | | -option(ENABLE_CPPCHECK "Enable Cppcheck integration" ON) |
18 | | -option(ENABLE_CLANG_TIDY "Enable clang-tidy integration" ON) |
19 | | -option(ENABLE_CLANG_FORMAT "Enable clang-format integration" ON) |
| 17 | +option(ENABLE_CPPCHECK "Enable Cppcheck integration" ON) |
| 18 | +option(ENABLE_CLANG_TIDY "Enable clang-tidy integration" ON) |
| 19 | +option(ENABLE_CLANG_FORMAT "Enable clang-format integration" ON) |
20 | 20 |
|
21 | | -if(ENABLE_COVERAGE AND NOT CMAKE_BUILD_TYPE STREQUAL "Debug") |
22 | | - message(WARNING "Coverage instrumentation is best used with Debug builds.") |
23 | | -endif() |
| 21 | +option(ENABLE_CACHE "Enable ccache to speed up compilation" OFF) |
24 | 22 |
|
25 | 23 | # If someone turns on the “global” sanitizer switch, enable each one |
26 | 24 | if(ENABLE_SANITIZERS) |
27 | 25 | set(ENABLE_ASAN ON) |
28 | 26 | set(ENABLE_UBSAN ON) |
29 | 27 | endif() |
| 28 | + |
| 29 | + |
0 commit comments