From 72ff847d4cd167d9c19237aaea55ecd49973eaee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9F=D0=B5=D0=BB=D0=B8=D0=BF=D0=B5=D0=BD=D0=BA=D0=BE=20?= =?UTF-8?q?=D0=98=D0=B2=D0=B0=D0=BD?= Date: Thu, 26 Oct 2017 21:26:28 +0000 Subject: [PATCH] git-svn-id: svn://db.shs.com.ru/pip@549 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5 --- CMakeLists.txt | 12 ++++++++++-- src_main/piversion.h | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e4bc29bf..9b0a555b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -69,8 +69,16 @@ math(EXPR SL '${SL}-1') string(SUBSTRING ${VERSION_REVISION} 0 ${SL} VERSION_REVISION) set(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REVISION}") set(SOVERSION ${VERSION}) -message(STATUS "Building PIP version ${VERSION}${VERSION_SUFFIX}") -file(WRITE "${PIP_SRC_MAIN}/pip_version_str.h" "// This file was generated by PIP CMake, don`t edit it!\n#define __PIP_VERSION_STR__ \"${VERSION}${VERSION_SUFFIX}\"\n") +set(_PIP_VERSION_CHANGED 0) +if ((NOT _PIP_FULL_VERSION) OR (NOT "x${_PIP_FULL_VERSION}" STREQUAL "x${VERSION}${VERSION_SUFFIX}")) + set(_PIP_VERSION_CHANGED 1) + set(_PIP_FULL_VERSION "${VERSION}${VERSION_SUFFIX}" CACHE STRING "pip_full_version" FORCE) +endif() +#message("${_PIP_VERSION_CHANGED}") +message(STATUS "Building PIP version ${_PIP_FULL_VERSION}") +if (_PIP_VERSION_CHANGED) + file(WRITE "${PIP_SRC_MAIN}/pip_version_str.h" "// This file was generated by PIP CMake, don`t edit it!\n#define __PIP_VERSION_STR__ \"${_PIP_FULL_VERSION}\"\n") +endif() # Sources diff --git a/src_main/piversion.h b/src_main/piversion.h index b5dc3ca9..d223d1b9 100644 --- a/src_main/piversion.h +++ b/src_main/piversion.h @@ -5,6 +5,6 @@ #define PIP_VERSION_MAJOR 1 #define PIP_VERSION_MINOR 0 #define PIP_VERSION_REVISION 0 -#define PIP_VERSION_SUFFIX "_rc6" +#define PIP_VERSION_SUFFIX "_rc7" #endif // PIVERSION_H