From ea4cc85aab0d36493d0ceb2b49f0ccc147891ffe Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 12 Nov 2026 13:01:38 +0000 Subject: [PATCH] fix(cmake): force -Og Debug flags only in standalone builds The toolbox force-set CMAKE_C_FLAGS_DEBUG and CMAKE_CXX_FLAGS_DEBUG to "-Og -g" in the cache whenever it was configured, overriding the Debug level of every project that includes it as a subdirectory. Set them only when the toolbox is the top-level project, as e-foc-protocol does. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_014WUWh4dQHyG8TdpC793zk4 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 705b1a47..47be46bc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -68,7 +68,7 @@ project(numerical-toolbox LANGUAGES C CXX ASM VERSION 3.1.2) # x-release-please- set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED On) -if(CMAKE_C_COMPILER_ID MATCHES "GNU|Clang") +if(NUMERICAL_TOOLBOX_STANDALONE AND CMAKE_C_COMPILER_ID MATCHES "GNU|Clang") set(CMAKE_C_FLAGS_DEBUG "-Og -g" CACHE STRING "C Debug flags" FORCE) set(CMAKE_CXX_FLAGS_DEBUG "-Og -g" CACHE STRING "C++ Debug flags" FORCE) endif()