1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmVersion.cxx,v $
6 Date: $Date: 2007/11/15 02:17:53 $
7 Version: $Revision: 1.1027 $
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 #include <cmsys/DateStamp.h>
21 std::string
cmVersion::GetReleaseVersion()
23 #if CMake_VERSION_MINOR & 1
24 return cmsys_DATE_STAMP_STRING_FULL
;
26 # if CMake_VERSION_PATCH == 1
29 # ifdef CMake_VERSION_RC
30 return "patch " CMAKE_TO_STRING(CMake_VERSION_PATCH
) " RC-"
31 CMAKE_TO_STRING(CMake_VERSION_RC
);
33 return "patch " CMAKE_TO_STRING(CMake_VERSION_PATCH
);
39 std::string
cmVersion::GetCMakeVersion()
42 str
<< CMake_VERSION_MAJOR
<< "." << CMake_VERSION_MINOR
44 << cmVersion::GetReleaseVersion();