diff options
| author | skal <pascal.massimino@gmail.com> | 2026-01-31 14:46:17 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-01-31 14:46:17 +0100 |
| commit | 2a1b4e231ea9720d27fd30b6fe0614b2accac983 (patch) | |
| tree | 00f89218653d4f51546e228683e0a26946f86c99 /CMakeLists.txt | |
| parent | 063052bd84ad12ae47584687eb4826366d34af70 (diff) | |
build: Add DEMO_ALL_OPTIONS to activate all build flags at once
This adds a single CMake toggle to enable tools, tests, size optimizations, and code stripping, simplifying the development and verification workflow.
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index b793b05..81103f8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,6 +15,17 @@ endif() option(DEMO_SIZE_OPT "Enable size optimization flags" OFF) option(DEMO_STRIP_ALL "Strip all unnecessary code for final build" OFF) +option(DEMO_BUILD_TESTS "Build tests" OFF) +option(DEMO_BUILD_TOOLS "Build tools" OFF) + +option(DEMO_ALL_OPTIONS "Activate all options at once (tools, tests, optimizations, stripping)" OFF) + +if (DEMO_ALL_OPTIONS) + set(DEMO_SIZE_OPT ON) + set(DEMO_STRIP_ALL ON) + set(DEMO_BUILD_TESTS ON) + set(DEMO_BUILD_TOOLS ON) +endif() if (DEMO_STRIP_ALL) add_definitions(-DSTRIP_ALL) @@ -177,7 +188,6 @@ if (DEMO_SIZE_OPT) endif() # Tests -option(DEMO_BUILD_TESTS "Build tests" OFF) enable_testing() if(DEMO_BUILD_TESTS) @@ -237,7 +247,6 @@ if(DEMO_BUILD_TESTS) endif() # Tools -option(DEMO_BUILD_TOOLS "Build tools" OFF) if(DEMO_BUILD_TOOLS OR DEMO_BUILD_TESTS) add_executable(spectool tools/spectool.cc |
