From f02c3c61815bcfac4b80f8e5d13a8a6542b9bfdc Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Thu, 19 Oct 2023 22:05:26 -0400 Subject: cmFileCommand: combine string literals --- Source/cmFileCommand.cxx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 93bed9a..9cd3db1 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -1322,13 +1322,15 @@ bool HandleRealPathCommand(std::vector const& args, if (oldPolicyPath != realPath) { status.GetMakefile().IssueMessage( MessageType::AUTHOR_WARNING, - cmStrCat( - cmPolicies::GetPolicyWarning(cmPolicies::CMP0152), '\n', - "From input path:\n ", input, - "\nthe policy OLD behavior produces path:\n ", oldPolicyPath, - "\nbut the policy NEW behavior produces path:\n ", realPath, - "\nSince the policy is not set, CMake is using the OLD " - "behavior for compatibility.")); + cmStrCat(cmPolicies::GetPolicyWarning(cmPolicies::CMP0152), + "\n" + "From input path:\n ", + input, "\nthe policy OLD behavior produces path:\n ", + oldPolicyPath, + "\nbut the policy NEW behavior produces path:\n ", + realPath, + "\nSince the policy is not set, CMake is using the OLD " + "behavior for compatibility.")); } } realPath = oldPolicyPath; -- cgit v0.12 From 1cfba13004c0f2cba512c78c64f160e221ca85ae Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Thu, 19 Oct 2023 22:06:05 -0400 Subject: cmGlobalNinjaGenerator: fix lambda variable name typo --- Source/cmGlobalNinjaGenerator.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 7368a6a..949e84f 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -1357,10 +1357,10 @@ void cmGlobalNinjaGenerator::AppendTargetDepends( } else { cmNinjaDeps outs; - auto computeISPCOuputs = [](cmGlobalNinjaGenerator* gg, - cmGeneratorTarget const* depTarget, - cmNinjaDeps& outputDeps, - const std::string& targetConfig) { + auto computeISPCOutputs = [](cmGlobalNinjaGenerator* gg, + cmGeneratorTarget const* depTarget, + cmNinjaDeps& outputDeps, + const std::string& targetConfig) { if (depTarget->CanCompileSources()) { auto headers = depTarget->GetGeneratedISPCHeaders(targetConfig); if (!headers.empty()) { @@ -1384,10 +1384,10 @@ void cmGlobalNinjaGenerator::AppendTargetDepends( } if (targetDep.IsCross()) { this->AppendTargetOutputs(targetDep, outs, fileConfig, depends); - computeISPCOuputs(this, targetDep, outs, fileConfig); + computeISPCOutputs(this, targetDep, outs, fileConfig); } else { this->AppendTargetOutputs(targetDep, outs, config, depends); - computeISPCOuputs(this, targetDep, outs, config); + computeISPCOutputs(this, targetDep, outs, config); } } std::sort(outs.begin(), outs.end()); -- cgit v0.12 From c2e949b700318b1632eed99b6343abc4c3bc658a Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Thu, 19 Oct 2023 22:06:23 -0400 Subject: cmGlobalNinjaGenerator: remove unnecessary virtual method The implementation is the same and the called method used internally is `virtual`, so just make the call non-virtual. --- Source/cmGlobalNinjaGenerator.cxx | 7 ------- Source/cmGlobalNinjaGenerator.h | 5 +---- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 949e84f..4cf9dff 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -3183,10 +3183,3 @@ 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"); -} diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h index 56a922c..d731b16 100644 --- a/Source/cmGlobalNinjaGenerator.h +++ b/Source/cmGlobalNinjaGenerator.h @@ -349,7 +349,7 @@ public: virtual std::string OrderDependsTargetForTarget( cmGeneratorTarget const* target, const std::string& config) const; - virtual std::string OrderDependsTargetForTargetPrivate( + std::string OrderDependsTargetForTargetPrivate( cmGeneratorTarget const* target, const std::string& config) const; void AppendTargetOutputs(cmGeneratorTarget const* target, @@ -741,9 +741,6 @@ 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; -- cgit v0.12