Enable tracing in debug builds by default

This commit is contained in:
Piotr Wójcik 2024-01-30 18:08:08 +01:00
commit fde4588dcb

View file

@ -134,6 +134,12 @@ if(NANO_STACKTRACE_BACKTRACE)
endif()
option(NANO_TRACING "Enable trace logging" OFF)
# Check if the build type is Debug, and if so, enable NANO_TRACING by default
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
set(NANO_TRACING
ON
CACHE BOOL "Enable trace logging" FORCE)
endif()
if(NANO_TRACING)
message(STATUS "Using trace logging")
add_compile_definitions(NANO_TRACING)