Skip to content

Commit

Permalink
Put verbose debug output behind a cmake flag
Browse files Browse the repository at this point in the history
  • Loading branch information
nirosys committed Oct 9, 2023
1 parent d4d25ef commit a090c96
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ else()
endif()

set(IONC_FORCE_SANITIZERS OFF CACHE BOOL "Force use of compiler sanitizers")
set(IONC_ENABLE_VERBOSE_DEBUG OFF CACHE BOOL "Enable verbose logging for ion-c")

## Build Type Settings
if (CMAKE_BUILD_TYPE STREQUAL "Release")
Expand All @@ -37,7 +38,9 @@ elseif (CMAKE_BUILD_TYPE STREQUAL "Debug")
add_link_options(-fsanitize=address,undefined -fsanitize-recover=address)
endif()
add_compile_options(-g -fno-omit-frame-pointer -fno-optimize-sibling-calls)
add_compile_definitions(DEBUG=1)
if (IONC_ENABLE_VERBOSE_DEBUG)
add_compile_definitions(DEBUG=1)
endif()
elseif (CMAKE_BUILD_TYPE STREQUAL "Profiling")
add_compile_options(
-O3 -march=native
Expand Down

0 comments on commit a090c96

Please sign in to comment.