From 48b76f7bd1242d67f2393cecf041840221ba2c18 Mon Sep 17 00:00:00 2001 From: Jan Vidar Krey Date: Wed, 30 Jul 2014 11:46:03 +0200 Subject: [PATCH] The DEBUG macro never got set, causes verbose log messages to never be compiled in. --- CMakeLists.txt | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b02d9a7..6a3d1eb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,6 +32,10 @@ if (BIGENDIAN) add_definitions(-DARCH_BIGENDIAN) endif() +if (NOT RELEASE) + add_definitions(-DDEBUG) +endif() + if (SSL_SUPPORT) if (USE_OPENSSL) find_package(OpenSSL) @@ -205,14 +209,14 @@ endif() configure_file ("${PROJECT_SOURCE_DIR}/version.h.in" "${PROJECT_SOURCE_DIR}/version.h") -mark_as_advanced(FORCE CMAKE_BUILD_TYPE) -if (RELEASE) - set(CMAKE_BUILD_TYPE Release) - add_definitions(-DNDEBUG) -else() - set(CMAKE_BUILD_TYPE Debug) - add_definitions(-DDEBUG) -endif() +# mark_as_advanced(FORCE CMAKE_BUILD_TYPE) +# if (RELEASE) +# set(CMAKE_BUILD_TYPE Release) +# add_definitions(-DNDEBUG) +#else() +# set(CMAKE_BUILD_TYPE Debug) +# add_definitions(-DDEBUG) +#endif() if (LOWLEVEL_DEBUG) add_definitions(-DLOWLEVEL_DEBUG)