From 390e48cddbe9f7153e547b853b7d9e4a78e8440d Mon Sep 17 00:00:00 2001 From: dismine Date: Wed, 25 Jun 2014 15:26:44 +0300 Subject: [PATCH] Calculate revision number only in release mode. --HG-- branch : develop --- src/app/app.pro | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/app/app.pro b/src/app/app.pro index 02d64b309..a4905884d 100644 --- a/src/app/app.pro +++ b/src/app/app.pro @@ -540,6 +540,10 @@ CONFIG(debug, debug|release){ QMAKE_CXXFLAGS += -O0 -Wall -Wextra -pedantic } } + + #Calculate revision number only in release mode. Change revision number each time need recompilation + #precompiled headers file. + DEFINES += LOCAL_REVISION=\\\"0\\\" }else{ # Release *-g++{ @@ -547,6 +551,14 @@ CONFIG(debug, debug|release){ } DEFINES += QT_NO_DEBUG_OUTPUT + #local revision number for using in version + !system(hg) { + DEFINES += LOCAL_REVISION=\\\"0\\\" + } + else + { + DEFINES += LOCAL_REVISION=$$system(hg parents --template '{rev}') + } } message(Qt version: $$[QT_VERSION]) @@ -562,15 +574,6 @@ message(Translation files: $$[QT_INSTALL_TRANSLATIONS]) message(Settings: $$[QT_INSTALL_SETTINGS]) message(Examples: $$[QT_INSTALL_EXAMPLES]) -#local revision number for using in version -!system(hg) { - DEFINES += LOCAL_REVISION=\\\"0\\\" -} -else -{ - DEFINES += LOCAL_REVISION=$$system(hg parents --template '{rev}') -} - win32:RC_FILE = share/resources/valentina.rc # Remove generated files at cleaning