summaryrefslogtreecommitdiffstats
path: root/Source/cmPolicies.h
diff options
context:
space:
mode:
authorMartin Duffy <martin.duffy@kitware.com>2023-09-14 17:13:38 (GMT)
committerBrad King <brad.king@kitware.com>2023-09-20 14:25:24 (GMT)
commitec2ba29ac5e424cf0c52ba8ea5c2e3a4c2667d7a (patch)
treeeee817eede0b5dec75baf45735268ffc7e5e4997 /Source/cmPolicies.h
parent123cdf981661c8ae32335d4ae7e1ddcbcffd09cc (diff)
downloadCMake-ec2ba29ac5e424cf0c52ba8ea5c2e3a4c2667d7a.zip
CMake-ec2ba29ac5e424cf0c52ba8ea5c2e3a4c2667d7a.tar.gz
CMake-ec2ba29ac5e424cf0c52ba8ea5c2e3a4c2667d7a.tar.bz2
Ninja: Allow compilation before generation of dependencies' private sources
This requires knowing when a generated header is public, which we can model using file sets. Add policy CMP0154 to treat generated sources as private by default in targets with file sets. Generated public headers can be specified in public file sets. Fixes: #24959 Issue: #15555
Diffstat (limited to 'Source/cmPolicies.h')
-rw-r--r--Source/cmPolicies.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h
index 26c141d..e894073 100644
--- a/Source/cmPolicies.h
+++ b/Source/cmPolicies.h
@@ -465,7 +465,11 @@ class cmMakefile;
"file(REAL_PATH) resolves symlinks before collapsing ../ components.", 3, \
28, 0, cmPolicies::WARN) \
SELECT(POLICY, CMP0153, "The exec_program command should not be called.", \
- 3, 28, 0, cmPolicies::WARN)
+ 3, 28, 0, cmPolicies::WARN) \
+ SELECT( \
+ POLICY, CMP0154, \
+ "Generated files are private by default in targets using file sets.", 3, \
+ 28, 0, cmPolicies::WARN)
#define CM_SELECT_ID(F, A1, A2, A3, A4, A5, A6) F(A1)
#define CM_FOR_EACH_POLICY_ID(POLICY) \
@@ -503,7 +507,8 @@ class cmMakefile;
F(CMP0113) \
F(CMP0119) \
F(CMP0131) \
- F(CMP0142)
+ F(CMP0142) \
+ F(CMP0154)
#define CM_FOR_EACH_CUSTOM_COMMAND_POLICY(F) \
F(CMP0116) \