diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2024-02-13 17:16:59 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2024-02-15 01:38:06 (GMT) |
commit | 9a45c9fbd55798f9636778504562cd03e293da2e (patch) | |
tree | 66a28b85fbeecb1ca00a43c78fcf1bab48e5a5ba | |
parent | 363300ace5e2cf63835d5797be951dbc95b3f55e (diff) | |
download | CMake-9a45c9fbd55798f9636778504562cd03e293da2e.zip CMake-9a45c9fbd55798f9636778504562cd03e293da2e.tar.gz CMake-9a45c9fbd55798f9636778504562cd03e293da2e.tar.bz2 |
cmNinjaTargetGenerator: use `emplace_back` for scanning deps
-rw-r--r-- | Source/cmNinjaTargetGenerator.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 99aa7f2..8ae4cd4 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -1190,7 +1190,7 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatements( cmNinjaBuild build(this->LanguageDyndepRule(language, config)); build.Outputs.push_back(this->GetDyndepFilePath(language, config)); - build.ImplicitOuts.push_back( + build.ImplicitOuts.emplace_back( cmStrCat(this->Makefile->GetCurrentBinaryDirectory(), '/', this->LocalGenerator->GetTargetDirectory(this->GeneratorTarget), this->GetGlobalGenerator()->ConfigDirectory(config), '/', @@ -1209,10 +1209,12 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatements( auto const linked_directories = this->GetLinkedTargetDirectories(language, config); for (std::string const& l : linked_directories.Direct) { - build.ImplicitDeps.push_back(cmStrCat(l, '/', language, "Modules.json")); + build.ImplicitDeps.emplace_back( + cmStrCat(l, '/', language, "Modules.json")); } for (std::string const& l : linked_directories.Forward) { - build.ImplicitDeps.push_back(cmStrCat(l, '/', language, "Modules.json")); + build.ImplicitDeps.emplace_back( + cmStrCat(l, '/', language, "Modules.json")); } this->GetGlobalGenerator()->WriteBuild(this->GetImplFileStream(fileConfig), |