From 6d2e0e80502ee438b2b33710ab5886930cea062e Mon Sep 17 00:00:00 2001 From: Tsuda Kageyu Date: Mon, 10 Jun 2013 01:19:47 +0900 Subject: [PATCH] Moved a macro from taglib_config.h to config.h --- CMakeLists.txt | 2 +- config.h.cmake | 3 +++ taglib/taglib_config.h.cmake | 2 -- taglib/toolkit/tdebug.cpp | 5 ++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 80bc2dd3..91e1901d 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -92,7 +92,7 @@ endif() option(TRACE_IN_RELEASE "Output debug messages even in release mode" OFF) if(TRACE_IN_RELEASE) - set(TAGLIB_TRACE_IN_RELEASE TRUE) + set(TRACE_IN_RELEASE TRUE) endif() configure_file(taglib/taglib_config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/taglib_config.h) diff --git a/config.h.cmake b/config.h.cmake index 15d2f997..f8dcbbde 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -31,4 +31,7 @@ /* Defined if you have libz */ #cmakedefine HAVE_ZLIB 1 +/* Indicates whether debug messages are shown even in release mode */ +#cmakedefine TRACE_IN_RELEASE 1 + #cmakedefine TESTS_DIR "@TESTS_DIR@" diff --git a/taglib/taglib_config.h.cmake b/taglib/taglib_config.h.cmake index 4ccb0158..0f499e2c 100644 --- a/taglib/taglib_config.h.cmake +++ b/taglib/taglib_config.h.cmake @@ -2,5 +2,3 @@ #define TAGLIB_WITH_ASF 1 #define TAGLIB_WITH_MP4 1 - -#cmakedefine TAGLIB_TRACE_IN_RELEASE 1 diff --git a/taglib/toolkit/tdebug.cpp b/taglib/toolkit/tdebug.cpp index f4025e9b..c838d57a 100644 --- a/taglib/toolkit/tdebug.cpp +++ b/taglib/toolkit/tdebug.cpp @@ -24,7 +24,6 @@ ***************************************************************************/ #include "config.h" -#include "taglib_config.h" #include "tdebug.h" #include "tstring.h" @@ -68,7 +67,7 @@ namespace void TagLib::debug(const String &s) { -#if !defined(NDEBUG) || defined(TAGLIB_TRACE_IN_RELEASE) +#if !defined(NDEBUG) || defined(TRACE_IN_RELEASE) getDebugListener()->printMessage("TagLib: " + s + "\n"); @@ -77,7 +76,7 @@ void TagLib::debug(const String &s) void TagLib::debugData(const ByteVector &v) { -#if !defined(NDEBUG) || defined(TAGLIB_TRACE_IN_RELEASE) +#if !defined(NDEBUG) || defined(TRACE_IN_RELEASE) for(size_t i = 0; i < v.size(); ++i) { -- 2.40.0