Add CMake variable to control logging

This commit is contained in:
Martchus 2016-07-03 22:13:04 +02:00
parent 46edfccc8f
commit 209b953754
1 changed files with 6 additions and 0 deletions

View File

@ -57,3 +57,9 @@ if(CMAKE_BUILD_TYPE STREQUAL "Debug")
add_definitions(-DDEBUG_BUILD)
message(STATUS "Debug build enabled.")
endif()
# enable logging when option is set
set(LOGGING_ENABLED "no" CACHE STRING "specifies whether logging is enabled")
if(${LOGGING_ENABLED} STREQUAL "yes")
add_definitions(-DLOGGING_ENABLED)
endif()