summaryrefslogtreecommitdiffstats
path: root/Source/cmPolicies.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-11-05 17:01:09 (GMT)
committerStephen Kelly <steveire@gmail.com>2013-11-07 10:06:39 (GMT)
commit301bb5cdda081f0bef0702e41ae4b47102b235df (patch)
tree2ee1e6000296f3db1358d70145daeafc36139e08 /Source/cmPolicies.cxx
parent05f5fde0eb83c0e49aab3214f28a098861aa3313 (diff)
downloadCMake-301bb5cdda081f0bef0702e41ae4b47102b235df.zip
CMake-301bb5cdda081f0bef0702e41ae4b47102b235df.tar.gz
CMake-301bb5cdda081f0bef0702e41ae4b47102b235df.tar.bz2
Disallow link-to-self (#13947).
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 db23f1e..af33d0b 100644
--- a/Source/cmPolicies.cxx
+++ b/Source/cmPolicies.cxx
@@ -291,6 +291,11 @@ cmPolicies::cmPolicies()
CMP0037, "CMP0037",
"Target names should match a validity pattern.",
3,0,0,0, cmPolicies::WARN);
+
+ this->DefinePolicy(
+ CMP0038, "CMP0038",
+ "Targets may not link directly to themselves.",
+ 3,0,0,0, cmPolicies::WARN);
}
cmPolicies::~cmPolicies()