From 2a1b4e231ea9720d27fd30b6fe0614b2accac983 Mon Sep 17 00:00:00 2001 From: skal Date: Sat, 31 Jan 2026 14:46:17 +0100 Subject: 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. --- CMakeLists.txt | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'CMakeLists.txt') 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 -- cgit v1.2.3