summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalNinjaGenerator.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/cmGlobalNinjaGenerator.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/cmGlobalNinjaGenerator.h')
-rw-r--r--Source/cmGlobalNinjaGenerator.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h
index c43e27c..56a922c 100644
--- a/Source/cmGlobalNinjaGenerator.h
+++ b/Source/cmGlobalNinjaGenerator.h
@@ -349,6 +349,9 @@ public:
virtual std::string OrderDependsTargetForTarget(
cmGeneratorTarget const* target, const std::string& config) const;
+ virtual std::string OrderDependsTargetForTargetPrivate(
+ cmGeneratorTarget const* target, const std::string& config) const;
+
void AppendTargetOutputs(cmGeneratorTarget const* target,
cmNinjaDeps& outputs, const std::string& config,
cmNinjaTargetDepends depends) const;
@@ -738,6 +741,9 @@ public:
std::string OrderDependsTargetForTarget(
cmGeneratorTarget const* target, const std::string& config) const override;
+ std::string OrderDependsTargetForTargetPrivate(
+ cmGeneratorTarget const* target, const std::string& config) const override;
+
protected:
bool OpenBuildFileStreams() override;
void CloseBuildFileStreams() override;