summaryrefslogtreecommitdiffstats
path: root/Source/cmPolicies.h
diff options
context:
space:
mode:
authorRaul Tambre <raul@tambre.ee>2020-08-08 10:17:05 (GMT)
committerBrad King <brad.king@kitware.com>2020-08-21 12:38:39 (GMT)
commit359c500a2466ffc2507b81c0089bce18fd5debbb (patch)
treee8eba9aa91e55b068a9b92989813a3db131befd5 /Source/cmPolicies.h
parent692bc2de9475d14a2f40b94d88ea91db2df5311c (diff)
downloadCMake-359c500a2466ffc2507b81c0089bce18fd5debbb.zip
CMake-359c500a2466ffc2507b81c0089bce18fd5debbb.tar.gz
CMake-359c500a2466ffc2507b81c0089bce18fd5debbb.tar.bz2
cmTarget: Raise error if imported target location is not set
Previously we would synthesize <TARGET_NAME>-NOTFOUND as the location. This would then end up on the link line and cause build failures. Policy CMP0110 is added to control this behaviour. Fixes #19080, #19943.
Diffstat (limited to 'Source/cmPolicies.h')
-rw-r--r--Source/cmPolicies.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h
index 0c00ffb..1a12dab 100644
--- a/Source/cmPolicies.h
+++ b/Source/cmPolicies.h
@@ -326,7 +326,11 @@ class cmMakefile;
19, 0, cmPolicies::WARN) \
SELECT(POLICY, CMP0110, \
"add_test() supports arbitrary characters in test names.", 3, 19, 0, \
- cmPolicies::WARN)
+ cmPolicies::WARN) \
+ SELECT(POLICY, CMP0111, \
+ "An imported target with a missing location fails during " \
+ "generation.", \
+ 3, 19, 0, cmPolicies::WARN)
#define CM_SELECT_ID(F, A1, A2, A3, A4, A5, A6) F(A1)
#define CM_FOR_EACH_POLICY_ID(POLICY) \