From 31a21fdf9fd9bd02d1935d944b925dfd1c17f118 Mon Sep 17 00:00:00 2001 From: Alex Zolotarev Date: Wed, 25 Sep 2013 19:32:39 +0200 Subject: [PATCH] Added CONFIG+=debug and CONFIG+=release support --- builder/genindex/genindex.pro | 1 + defines.pri | 7 +++++++ env/env.pro | 2 ++ storage/storage.pro | 2 ++ 4 files changed, 12 insertions(+) create mode 100644 defines.pri diff --git a/builder/genindex/genindex.pro b/builder/genindex/genindex.pro index fef7076..a8485f4 100644 --- a/builder/genindex/genindex.pro +++ b/builder/genindex/genindex.pro @@ -5,6 +5,7 @@ CONFIG -= app_bundle INCLUDEPATH += ../../3rdparty/boost +include (../../defines.pri) SOURCES += \ main.cpp \ diff --git a/defines.pri b/defines.pri new file mode 100644 index 0000000..6512cfb --- /dev/null +++ b/defines.pri @@ -0,0 +1,7 @@ +# Common file for all projects, to avoid copy-paste + +CONFIG(release, debug|release) { + DEFINES *= RELEASE _RELEASE NDEBUG +} else { + DEFINES *= DEBUG _DEBUG +} diff --git a/env/env.pro b/env/env.pro index de0b668..43ec04f 100644 --- a/env/env.pro +++ b/env/env.pro @@ -5,6 +5,8 @@ CONFIG -= app_bundle INCLUDEPATH += ../3rdparty/boost ../3rdparty/googletest/include +include(../defines.pri) + HEADERS += \ assert.hpp \ condition.hpp \ diff --git a/storage/storage.pro b/storage/storage.pro index 6ef31d2..bda05e3 100644 --- a/storage/storage.pro +++ b/storage/storage.pro @@ -5,6 +5,8 @@ CONFIG -= app_bundle INCLUDEPATH += ../3rdparty/boost ../3rdparty/googletest/include +include (../defines.pri) + HEADERS += \ article_info.hpp \ distance.hpp \