summaryrefslogtreecommitdiffstats
path: root/Source/cmDocumentVariables.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-01-15 13:57:44 (GMT)
committerBrad King <brad.king@kitware.com>2009-01-15 13:57:44 (GMT)
commit35e391c93b20af085610639dc6a938b4dfaa2ba5 (patch)
treee79b9dbd40ff0c88a6fe7c2c79f56d445e516cce /Source/cmDocumentVariables.cxx
parent004cdfe6ff01999eeebd3dea088f7f2c8180a7dc (diff)
downloadCMake-35e391c93b20af085610639dc6a938b4dfaa2ba5.zip
CMake-35e391c93b20af085610639dc6a938b4dfaa2ba5.tar.gz
CMake-35e391c93b20af085610639dc6a938b4dfaa2ba5.tar.bz2
ENH: Provide variable CMAKE_VERSION
This creates the variable CMAKE_VERSION containing the full version of cmake in "major.minor.patch" format. It is particularly useful with the component-wise version comparison provided by the if() command.
Diffstat (limited to 'Source/cmDocumentVariables.cxx')
-rw-r--r--Source/cmDocumentVariables.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/cmDocumentVariables.cxx b/Source/cmDocumentVariables.cxx
index b8520a4..fb7f116 100644
--- a/Source/cmDocumentVariables.cxx
+++ b/Source/cmDocumentVariables.cxx
@@ -214,6 +214,14 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"This specifies the patch version of the CMake"
" executable being run.",false,
"Variables that Provide Information");
+ cm->DefineProperty
+ ("CMAKE_VERSION", cmProperty::VARIABLE,
+ "The full version of cmake in major.minor.patch format.",
+ "This specifies the full version of the CMake executable being run. "
+ "This variable is defined by versions 2.6.3 and higher. "
+ "See variables CMAKE_MAJOR_VERSION, CMAKE_MINOR_VERSION, and "
+ "CMAKE_PATCH_VERSION for individual version components.", false,
+ "Variables that Provide Information");
cm->DefineProperty
("CMAKE_PARENT_LIST_FILE", cmProperty::VARIABLE,