Mercurial > hg > orthanc
changeset 1488:c8763b603b0e
flag for plugins
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 04 Aug 2015 10:54:13 +0200 |
parents | 23083810d543 |
children | 1389834e130f |
files | CMakeLists.txt Core/Logging.cpp Core/Logging.h |
diffstat | 3 files changed, 12 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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}
--- 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
--- 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 <stdlib.h> // This fixes a problem in glog for recent releases of MinGW #include <glog/logging.h> @@ -50,3 +52,5 @@ void EnableTraceLevel(bool enabled); } } + +#endif