1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmVersion.cxx,v $
6 Date: $Date: 2007-05-01 08:20:03 $
7 Version: $Revision: 1.845 $
9 Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
10 See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
12 This software is distributed WITHOUT ANY WARRANTY; without even
13 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 PURPOSE. See the above copyright notices for more information.
16 =========================================================================*/
17 #include "cmVersion.h"
19 std::string
cmVersion::GetReleaseVersion()
21 #if CMake_VERSION_MINOR & 1
22 std::string cver
= "$Date: 2007-05-01 08:20:03 $";
24 std::string::size_type cc
, len
= cver
.size();
25 bool aftercol
= false;
27 for ( cc
= 0; cc
< len
; cc
++ )
51 if ( cver
[cc
] == ':' )
59 # if CMake_VERSION_PATCH == 1
62 # ifdef CMake_VERSION_RC
63 return "patch " CMAKE_TO_STRING(CMake_VERSION_PATCH
) " RC-"
64 CMAKE_TO_STRING(CMake_VERSION_RC
);
66 return "patch " CMAKE_TO_STRING(CMake_VERSION_PATCH
);
72 std::string
cmVersion::GetCMakeVersion()
75 str
<< CMake_VERSION_MAJOR
<< "." << CMake_VERSION_MINOR
77 << cmVersion::GetReleaseVersion();