Skip to content

Commit

Permalink
Better handling of debug build check
Browse files Browse the repository at this point in the history
  • Loading branch information
pwojcikdev committed Feb 5, 2024
1 parent 4b1408f commit ed60faf
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit ed60faf

Please sign in to comment.