From ed60faf7217fca059852b840f4cf585e14ceea79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Wo=CC=81jcik?= <3044353+pwojcikdev@users.noreply.github.com> Date: Mon, 5 Feb 2024 21:31:49 +0100 Subject: [PATCH] Better handling of debug build check --- CMakeLists.txt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ee95085841..0123485cdf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -133,12 +133,11 @@ if(NANO_STACKTRACE_BACKTRACE) endif() endif() -option(NANO_TRACING "Enable trace logging" OFF) -# Check if the build type is Debug, and if so, enable NANO_TRACING by default +# Enable NANO_TRACING by default in Debug builds if(CMAKE_BUILD_TYPE STREQUAL "Debug") - set(NANO_TRACING - ON - CACHE BOOL "Enable trace logging" FORCE) + option(NANO_TRACING "Enable trace logging" ON) +else() + option(NANO_TRACING "Enable trace logging" OFF) endif() if(NANO_TRACING) message(STATUS "Using trace logging")