STYLE: Fix typo in GetFilenameLastExtension docs
[cmake.git] / Source / cmVersion.cxx
bloba81ee45154a360755ae5915a244a22ad0556727d
1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmVersion.cxx,v $
5 Language: C++
6 Date: $Date: 2008-06-13 14:15:13 $
7 Version: $Revision: 1.1028 $
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 # ifdef CMake_VERSION_RC
27 return "patch " CMAKE_TO_STRING(CMake_VERSION_PATCH) " RC-"
28 CMAKE_TO_STRING(CMake_VERSION_RC);
29 # else
30 return "patch " CMAKE_TO_STRING(CMake_VERSION_PATCH);
31 # endif
32 #endif
35 std::string cmVersion::GetCMakeVersion()
37 cmOStringStream str;
38 str << CMake_VERSION_MAJOR << "." << CMake_VERSION_MINOR
39 << "-"
40 << cmVersion::GetReleaseVersion();
41 return str.str();