Commit 04280871 authored by Bill Hoffman's avatar Bill Hoffman
Browse files

ENH: add release candidate to versions

parent 9789fe0e
......@@ -5,7 +5,9 @@ MARK_AS_ADVANCED(CMAKE_BACKWARDS_COMPATIBILITY)
# The CMake version number.
SET(CMake_VERSION_MAJOR 2)
SET(CMake_VERSION_MINOR 4)
SET(CMake_VERSION_PATCH 4)
SET(CMake_VERSION_PATCH 5)
# for an actual release this should not be defined
SET(CMake_VERSION_RC 1)
SET(CMake_VERSION "${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}")
SET(CMake_VERSION_FULL "${CMake_VERSION}.${CMake_VERSION_PATCH}")
......@@ -355,6 +357,10 @@ IF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CMake ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}")
SET(CPACK_SOURCE_PACKAGE_FILE_NAME
"cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}.${CMake_VERSION_PATCH}")
IF(CMake_VERSION_RC)
SET(CPACK_SOURCE_PACKAGE_FILE_NAME
"${CPACK_SOURCE_PACKAGE_FILE_NAME}-RC-${CMake_VERSION_RC}")
ENDIF(CMake_VERSION_RC)
IF(NOT DEFINED CPACK_SYSTEM_NAME)
SET(CPACK_SYSTEM_NAME ${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR})
ENDIF(NOT DEFINED CPACK_SYSTEM_NAME)
......
......@@ -11,5 +11,5 @@
#define CMake_VERSION_MAJOR @CMake_VERSION_MAJOR@
#define CMake_VERSION_MINOR @CMake_VERSION_MINOR@
#define CMake_VERSION_PATCH @CMake_VERSION_PATCH@
#cmakedefine CMake_VERSION_RC @CMake_VERSION_RC@
#define CMAKE_DATA_DIR "@CMAKE_DATA_DIR@"
......@@ -141,7 +141,12 @@ const char* cmMakefile::GetReleaseVersion()
# if CMake_VERSION_PATCH == 1
return "1-beta";
# else
# ifdef CMake_VERSION_RC
return "patch " CMAKE_TO_STRING(CMake_VERSION_PATCH) " RC-"
CMAKE_TO_STRING(CMake_VERSION_RC);
# else
return "patch " CMAKE_TO_STRING(CMake_VERSION_PATCH);
# endif
# endif
#endif
}
......
......@@ -59,7 +59,12 @@ std::string cmVersion::GetReleaseVersion()
# if CMake_VERSION_PATCH == 1
return "1-beta";
# else
# ifdef CMake_VERSION_RC
return "patch " CMAKE_TO_STRING(CMake_VERSION_PATCH) " RC-"
CMAKE_TO_STRING(CMake_VERSION_RC);
# else
return "patch " CMAKE_TO_STRING(CMake_VERSION_PATCH);
# endif
# endif
#endif
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment