ENH: add rc to version stuff

This commit is contained in:
Bill Hoffman 2006-11-28 16:09:21 -05:00
parent 07fe0176d2
commit e9a80cd8a9
3 changed files with 15 additions and 5 deletions

View File

@ -11,5 +11,5 @@
#define CMake_VERSION_MAJOR @CMake_VERSION_MAJOR@ #define CMake_VERSION_MAJOR @CMake_VERSION_MAJOR@
#define CMake_VERSION_MINOR @CMake_VERSION_MINOR@ #define CMake_VERSION_MINOR @CMake_VERSION_MINOR@
#define CMake_VERSION_PATCH @CMake_VERSION_PATCH@ #define CMake_VERSION_PATCH @CMake_VERSION_PATCH@
#cmakedefine CMake_VERSION_RC @CMake_VERSION_RC@
#define CMAKE_DATA_DIR "@CMAKE_DATA_DIR@" #define CMAKE_DATA_DIR "@CMAKE_DATA_DIR@"

View File

@ -138,11 +138,16 @@ const char* cmMakefile::GetReleaseVersion()
#if CMake_VERSION_MINOR & 1 #if CMake_VERSION_MINOR & 1
return "development"; return "development";
#else #else
# if CMake_VERSION_PATCH == 0 # if CMake_VERSION_PATCH == 1
return "beta"; return "1-beta";
# else # 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); return "patch " CMAKE_TO_STRING(CMake_VERSION_PATCH);
# endif # endif
# endif
#endif #endif
} }

View File

@ -56,10 +56,15 @@ std::string cmVersion::GetReleaseVersion()
} }
return res; return res;
#else #else
# if CMake_VERSION_PATCH == 0 # if CMake_VERSION_PATCH == 1
return "beta"; return "1-beta";
# else # 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); return "patch " CMAKE_TO_STRING(CMake_VERSION_PATCH);
# endif
# endif # endif
#endif #endif
} }