Skip to content

Commit

Permalink
Enable tracing in debug builds by default
Browse files Browse the repository at this point in the history
  • Loading branch information
pwojcikdev committed Feb 1, 2024
1 parent 7452def commit fde4588
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit fde4588

Please sign in to comment.