diff options
author | Brad King <brad.king@kitware.com> | 2007-11-15 02:17:53 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2007-11-15 02:17:53 (GMT) |
commit | 0ea6a8d1a4988273199d968c35a7f486faedfbc8 (patch) | |
tree | 944e6d7020bf11d1e1532d3e4ba4b8dcacdaa0a5 /Source/cmVersion.cxx | |
parent | 45e974791f7d90cd7946716f002b59be84bdce13 (diff) | |
download | CMake-0ea6a8d1a4988273199d968c35a7f486faedfbc8.zip CMake-0ea6a8d1a4988273199d968c35a7f486faedfbc8.tar.gz CMake-0ea6a8d1a4988273199d968c35a7f486faedfbc8.tar.bz2 |
ENH: Simplified CMake version information using KWSys DateStamp feature. Reduced duplicate code in bootstrap script.
Diffstat (limited to 'Source/cmVersion.cxx')
-rw-r--r-- | Source/cmVersion.cxx | 39 |
1 files changed, 3 insertions, 36 deletions
diff --git a/Source/cmVersion.cxx b/Source/cmVersion.cxx index 8802fba..3ac02e0 100644 --- a/Source/cmVersion.cxx +++ b/Source/cmVersion.cxx @@ -16,45 +16,12 @@ =========================================================================*/ #include "cmVersion.h" +#include <cmsys/DateStamp.h> + std::string cmVersion::GetReleaseVersion() { #if CMake_VERSION_MINOR & 1 - std::string cver = "Date: 2007-11-14 04:13:18 +0000"; - std::string res = ""; - std::string::size_type cc, len = cver.size(); - bool aftercol = false; - int cnt = 0; - for ( cc = 0; cc < len; cc ++ ) - { - if ( aftercol ) - { - char ch = cver[cc]; - switch ( ch ) - { - case ' ': - case ':': - case '/': - case '-': - case '$': - break; - default: - res += ch; - cnt ++; - } - if ( cnt >= 8 ) - { - return res; - } - } - else - { - if ( cver[cc] == ':' ) - { - aftercol = true; - } - } - } - return res; + return cmsys_DATE_STAMP_STRING_FULL; #else # if CMake_VERSION_PATCH == 1 return "1-beta"; |