summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-01-31 14:46:17 +0100
committerskal <pascal.massimino@gmail.com>2026-01-31 14:46:17 +0100
commit2a1b4e231ea9720d27fd30b6fe0614b2accac983 (patch)
tree00f89218653d4f51546e228683e0a26946f86c99
parent063052bd84ad12ae47584687eb4826366d34af70 (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.
-rw-r--r--CMakeLists.txt13
-rw-r--r--HOWTO.md10
2 files changed, 21 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
diff --git a/HOWTO.md b/HOWTO.md
index 1a3ec6d..f9cce91 100644
--- a/HOWTO.md
+++ b/HOWTO.md
@@ -40,6 +40,15 @@ cmake --build build
```
In this mode, the demo will always start in fullscreen.
+### Developer Build (All Options)
+
+To enable all features at once (tests, tools, size optimizations, and stripping) for a comprehensive check:
+
+```bash
+cmake -S . -B build -DDEMO_ALL_OPTIONS=ON
+cmake --build build
+```
+
### Windows (Wine)
If you are on macOS and want to test the Windows build:
@@ -48,6 +57,7 @@ If you are on macOS and want to test the Windows build:
2. Run it: `./scripts/run_win.sh`
Note: WebGPU support in Wine requires a Vulkan-capable backend (like MoltenVK on macOS).
+Note2: make sure you run the script `./scripts/fetch_win_deps.sh` before, to install Win64 dependencies.
## Testing