diff options
author | Martin Duffy <martin.duffy@kitware.com> | 2023-09-14 17:13:38 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-09-20 14:25:24 (GMT) |
commit | ec2ba29ac5e424cf0c52ba8ea5c2e3a4c2667d7a (patch) | |
tree | eee817eede0b5dec75baf45735268ffc7e5e4997 /Source/cmGlobalNinjaGenerator.cxx | |
parent | 123cdf981661c8ae32335d4ae7e1ddcbcffd09cc (diff) | |
download | CMake-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.cxx')
-rw-r--r-- | Source/cmGlobalNinjaGenerator.cxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 30305a1..7368a6a 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -1278,6 +1278,13 @@ std::string cmGlobalNinjaGenerator::OrderDependsTargetForTarget( return cmStrCat("cmake_object_order_depends_target_", target->GetName()); } +std::string cmGlobalNinjaGenerator::OrderDependsTargetForTargetPrivate( + cmGeneratorTarget const* target, const std::string& config) const +{ + return cmStrCat(this->OrderDependsTargetForTarget(target, config), + "_private"); +} + void cmGlobalNinjaGenerator::AppendTargetOutputs( cmGeneratorTarget const* target, cmNinjaDeps& outputs, const std::string& config, cmNinjaTargetDepends depends) const @@ -3176,3 +3183,10 @@ std::string cmGlobalNinjaMultiGenerator::OrderDependsTargetForTarget( return cmStrCat("cmake_object_order_depends_target_", target->GetName(), '_', cmSystemTools::UpperCase(config)); } + +std::string cmGlobalNinjaMultiGenerator::OrderDependsTargetForTargetPrivate( + cmGeneratorTarget const* target, const std::string& config) const +{ + return cmStrCat(this->OrderDependsTargetForTarget(target, config), + "_private"); +} |