summaryrefslogtreecommitdiff
path: root/Source/cmPolicies.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-01-29 09:28:01 -0500
committerBrad King <brad.king@kitware.com>2014-01-29 09:45:18 -0500
commit7e142c5ac2be11097f7ff905b1606179803043d7 (patch)
treed7565d46f43fa420270d0111bd30e5279c58c9dc /Source/cmPolicies.cxx
parent16d040c958c68c38b2c0642b4094245af28c1910 (diff)
downloadcmake-7e142c5ac2be11097f7ff905b1606179803043d7.tar.gz
project: Manage VERSION variables
Teach the project() command to set variables {PROJECT,<PROJECT-NAME>}_VERSION{,_MAJOR,_MINOR,_PATCH,_TWEAK} holding the project version number and its components. Add project() command option "VERSION" to specify the version explicitly, and default to the empty string when it is not given. Since this clears variables when no VERSION is given, this may change behavior for existing projects that set the version variables themselves prior to calling project(). Add policy CMP0048 for compatibility. Suggested-by: Alex Neundorf <neundorf@kde.org>
Diffstat (limited to 'Source/cmPolicies.cxx')
-rw-r--r--Source/cmPolicies.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx
index a1451f17f1..e191256d3e 100644
--- a/Source/cmPolicies.cxx
+++ b/Source/cmPolicies.cxx
@@ -341,6 +341,11 @@ cmPolicies::cmPolicies()
CMP0047, "CMP0047",
"Use QCC compiler id for the qcc drivers on QNX.",
3,0,0,0, cmPolicies::WARN);
+
+ this->DefinePolicy(
+ CMP0048, "CMP0048",
+ "project() command manages VERSION variables.",
+ 3,0,0,0, cmPolicies::WARN);
}
cmPolicies::~cmPolicies()