diff options
author | Brad King <brad.king@kitware.com> | 2020-04-24 12:34:27 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-04-24 12:34:42 (GMT) |
commit | aaf0189cf0f46fc06ca5429ab18135a944bd979c (patch) | |
tree | 5afdd74acb6abdc6e924615d7aceafc763becd80 /Source | |
parent | 2844ef87c6a8f58dd0385da6ba2fe70b8c6d2960 (diff) | |
parent | d837f8b6fb30c34e167c35f7e85ac3b7b19adccf (diff) | |
download | CMake-aaf0189cf0f46fc06ca5429ab18135a944bd979c.zip CMake-aaf0189cf0f46fc06ca5429ab18135a944bd979c.tar.gz CMake-aaf0189cf0f46fc06ca5429ab18135a944bd979c.tar.bz2 |
Merge topic 'ninja-order-only-fix'
d837f8b6fb Merge branch 'master' into ninja-order-only-fix
b45976fe10 Ninja: Remove config suffix from order-only target
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4654
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGlobalNinjaGenerator.cxx | 12 | ||||
-rw-r--r-- | Source/cmGlobalNinjaGenerator.h | 7 | ||||
-rw-r--r-- | Source/cmNinjaTargetGenerator.cxx | 2 |
3 files changed, 15 insertions, 6 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 0cdbcc7..8ef19cc 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -1054,10 +1054,9 @@ void cmGlobalNinjaGenerator::WriteAssumedSourceDependencies() } std::string cmGlobalNinjaGenerator::OrderDependsTargetForTarget( - cmGeneratorTarget const* target, const std::string& config) + cmGeneratorTarget const* target, const std::string& /*config*/) const { - return cmStrCat("cmake_object_order_depends_target_", target->GetName(), '_', - cmSystemTools::UpperCase(config)); + return cmStrCat("cmake_object_order_depends_target_", target->GetName()); } void cmGlobalNinjaGenerator::AppendTargetOutputs( @@ -2678,3 +2677,10 @@ bool cmGlobalNinjaMultiGenerator::ReadCacheEntriesForBuild( return true; } + +std::string cmGlobalNinjaMultiGenerator::OrderDependsTargetForTarget( + cmGeneratorTarget const* target, const std::string& config) const +{ + return cmStrCat("cmake_object_order_depends_target_", target->GetName(), '_', + cmSystemTools::UpperCase(config)); +} diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h index 5668dd1..b89fb8f 100644 --- a/Source/cmGlobalNinjaGenerator.h +++ b/Source/cmGlobalNinjaGenerator.h @@ -315,8 +315,8 @@ public: ASD.insert(deps.begin(), deps.end()); } - static std::string OrderDependsTargetForTarget( - cmGeneratorTarget const* target, const std::string& config); + virtual std::string OrderDependsTargetForTarget( + cmGeneratorTarget const* target, const std::string& config) const; void AppendTargetOutputs( cmGeneratorTarget const* target, cmNinjaDeps& outputs, @@ -644,6 +644,9 @@ public: bool SupportsCrossConfigs() const override { return true; } bool SupportsDefaultConfigs() const override { return true; } + std::string OrderDependsTargetForTarget( + cmGeneratorTarget const* target, const std::string& config) const override; + protected: bool OpenBuildFileStreams() override; void CloseBuildFileStreams() override; diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index a70b6a0..701c44f 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -147,7 +147,7 @@ bool cmNinjaTargetGenerator::NeedDyndep(std::string const& lang) const std::string cmNinjaTargetGenerator::OrderDependsTargetForTarget( const std::string& config) { - return cmGlobalNinjaGenerator::OrderDependsTargetForTarget( + return this->GetGlobalGenerator()->OrderDependsTargetForTarget( this->GeneratorTarget, config); } |