summaryrefslogtreecommitdiff
path: root/Source/cmPolicies.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-03-26 18:08:29 +0100
committerBrad King <brad.king@kitware.com>2013-05-21 14:59:17 -0400
commiteabefa8b02b399b00aea83185b6b364ab5b6aa3d (patch)
treed704dd000578415ab3be7b88248488d4d06caf73 /Source/cmPolicies.cxx
parent272431a84ff13eb17cf04389428f57c7fe13e3a2 (diff)
downloadcmake-eabefa8b02b399b00aea83185b6b364ab5b6aa3d.tar.gz
Error on relative path in INCLUDE_DIRECTORIES target property.
Add policy CMP0021 to preserve existing behavior in projects expecting it from earlier CMake versions.
Diffstat (limited to 'Source/cmPolicies.cxx')
-rw-r--r--Source/cmPolicies.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx
index 831e92e925..09e1051543 100644
--- a/Source/cmPolicies.cxx
+++ b/Source/cmPolicies.cxx
@@ -529,6 +529,20 @@ cmPolicies::cmPolicies()
"The NEW behavior for this policy is to link executables to "
"qtmain.lib automatically when they link to QtCore IMPORTED target.",
2,8,11,0, cmPolicies::WARN);
+
+ this->DefinePolicy(
+ CMP0021, "CMP0021",
+ "Fatal error on relative paths in INCLUDE_DIRECTORIES target property.",
+ "CMake 2.8.10.2 and lower allowed the INCLUDE_DIRECTORIES target "
+ "property to contain relative paths. The base path for such relative "
+ "entries is not well defined. CMake 2.8.12 issues a FATAL_ERROR if the "
+ "INCLUDE_DIRECTORIES property contains a relative path."
+ "\n"
+ "The OLD behavior for this policy is not to warn about relative paths in "
+ "the INCLUDE_DIRECTORIES target property. "
+ "The NEW behavior for this policy is to issue a FATAL_ERROR if "
+ "INCLUDE_DIRECTORIES contains a relative path.",
+ 2,8,11,20130516, cmPolicies::WARN);
}
cmPolicies::~cmPolicies()