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