# HG changeset patch # User Sebastien Jodogne # Date 1438678453 -7200 # Node ID c8763b603b0ecd357a2d53dd688322476facd3bc # Parent 23083810d54312ae59236ef3c8cec30429e972b4 flag for plugins diff -r 23083810d543 -r c8763b603b0e CMakeLists.txt --- a/CMakeLists.txt Tue Aug 04 10:45:58 2015 +0200 +++ b/CMakeLists.txt Tue Aug 04 10:54:13 2015 +0200 @@ -356,6 +356,7 @@ add_definitions( -DORTHANC_VERSION="${ORTHANC_VERSION}" -DORTHANC_DATABASE_VERSION=${ORTHANC_DATABASE_VERSION} + -DORTHANC_ENABLE_LOGGING=1 ) list(LENGTH OPENSSL_SOURCES OPENSSL_SOURCES_LENGTH) @@ -426,7 +427,10 @@ add_definitions(-DUNIT_TESTS_WITH_HTTP_CONNEXIONS=0) endif() -add_definitions(-DORTHANC_BUILD_UNIT_TESTS=1) +add_definitions( + -DORTHANC_BUILD_UNIT_TESTS=1 + ) + include(${CMAKE_SOURCE_DIR}/Resources/CMake/GoogleTestConfiguration.cmake) add_executable(UnitTests ${GTEST_SOURCES} diff -r 23083810d543 -r c8763b603b0e Core/Logging.cpp --- a/Core/Logging.cpp Tue Aug 04 10:45:58 2015 +0200 +++ b/Core/Logging.cpp Tue Aug 04 10:54:13 2015 +0200 @@ -33,6 +33,7 @@ #include "PrecompiledHeaders.h" #include "Logging.h" +#if ORTHANC_ENABLE_LOGGING == 1 namespace Orthanc { @@ -74,3 +75,5 @@ #endif } } + +#endif diff -r 23083810d543 -r c8763b603b0e Core/Logging.h --- a/Core/Logging.h Tue Aug 04 10:45:58 2015 +0200 +++ b/Core/Logging.h Tue Aug 04 10:54:13 2015 +0200 @@ -32,6 +32,8 @@ #pragma once +#if ORTHANC_ENABLE_LOGGING == 1 + #if ORTHANC_ENABLE_GOOGLE_LOG == 1 #include // This fixes a problem in glog for recent releases of MinGW #include @@ -50,3 +52,5 @@ void EnableTraceLevel(bool enabled); } } + +#endif