From 209b953754c190fd6ae922db9fd03774e07bbf88 Mon Sep 17 00:00:00 2001 From: Martchus Date: Sun, 3 Jul 2016 22:13:04 +0200 Subject: [PATCH] Add CMake variable to control logging --- cmake/modules/BasicConfig.cmake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmake/modules/BasicConfig.cmake b/cmake/modules/BasicConfig.cmake index d1256a1..2c80d74 100644 --- a/cmake/modules/BasicConfig.cmake +++ b/cmake/modules/BasicConfig.cmake @@ -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()