Initial commit.
[CMakeLuaTailorHgBridge.git] / CMakeLua / Source / cmVersion.cxx
blob6fd5eb750fc8f2b2531e757671d73c6d9f520624
1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmVersion.cxx,v $
5 Language: C++
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;
25 #else
26 # if CMake_VERSION_PATCH == 1
27 return "1-beta";
28 # else
29 # ifdef CMake_VERSION_RC
30 return "patch " CMAKE_TO_STRING(CMake_VERSION_PATCH) " RC-"
31 CMAKE_TO_STRING(CMake_VERSION_RC);
32 # else
33 return "patch " CMAKE_TO_STRING(CMake_VERSION_PATCH);
34 # endif
35 # endif
36 #endif
39 std::string cmVersion::GetCMakeVersion()
41 cmOStringStream str;
42 str << CMake_VERSION_MAJOR << "." << CMake_VERSION_MINOR
43 << "-"
44 << cmVersion::GetReleaseVersion();
45 return str.str();