diff options
-rw-r--r-- | CMakeLists.txt | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index ed26d05..1654333 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,7 +40,14 @@ macro(wlproto var_basename proto_xml_basename) include_directories(${CMAKE_CURRENT_BINARY_DIR}) endmacro() -add_definitions(-D_GNU_SOURCE -DDEBUG_OUTPUT) +set(ENABLE_DEBUG_OUTPUT OFF CACHE BOOL "Enable debug logging") +if(ENABLE_DEBUG_OUTPUT) + add_definitions(-DDEBUG_OUTPUT) +else() + remove_definitions(-DDEBUG_OUTPUT) +endif() + +add_definitions(-D_GNU_SOURCE) set(CMAKE_C_FLAGS "-Wall -Wextra -Wno-comment -Wno-unused-parameter -fvisibility=hidden -std=c99 ${CMAKE_C_FLAGS}") set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-comment -Wno-unused-parameter -fvisibility=hidden -std=c++14 ${CMAKE_CXX_FLAGS}") |