summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalNinjaGenerator.cxx
diff options
context:
space:
mode:
authorNicolas van Kempen <nvankemp@gmail.com>2023-03-23 08:02:50 (GMT)
committerNicolas van Kempen <nvankemp@gmail.com>2023-03-28 21:53:18 (GMT)
commit426f3295f61eaf2feb58c7e4b9ebe838b21cf453 (patch)
treebe9eea63422ee99e65745105444eba9f04552846 /Source/cmGlobalNinjaGenerator.cxx
parent841c1844e13ca908b0c6e485d25968d4b77544ac (diff)
downloadCMake-426f3295f61eaf2feb58c7e4b9ebe838b21cf453.zip
CMake-426f3295f61eaf2feb58c7e4b9ebe838b21cf453.tar.gz
CMake-426f3295f61eaf2feb58c7e4b9ebe838b21cf453.tar.bz2
Ninja: Use more efficient data structures to collect outputs
Diffstat (limited to 'Source/cmGlobalNinjaGenerator.cxx')
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx15
1 files changed, 3 insertions, 12 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index 37856d9..75ed693 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -1368,17 +1368,7 @@ void cmGlobalNinjaGenerator::AppendTargetDepends(
}
void cmGlobalNinjaGenerator::AppendTargetDependsClosure(
- cmGeneratorTarget const* target, cmNinjaDeps& outputs,
- const std::string& config, const std::string& fileConfig, bool genexOutput)
-{
- cmNinjaOuts outs;
- this->AppendTargetDependsClosure(target, outs, config, fileConfig,
- genexOutput, true);
- cm::append(outputs, outs);
-}
-
-void cmGlobalNinjaGenerator::AppendTargetDependsClosure(
- cmGeneratorTarget const* target, cmNinjaOuts& outputs,
+ cmGeneratorTarget const* target, std::unordered_set<std::string>& outputs,
const std::string& config, const std::string& fileConfig, bool genexOutput,
bool omit_self)
{
@@ -1399,7 +1389,8 @@ void cmGlobalNinjaGenerator::AppendTargetDependsClosure(
// relevant for filling the cache entries properly isolated and a global
// result set that is relevant for the result of the top level call to
// AppendTargetDependsClosure.
- cmNinjaOuts this_outs; // this will be the new cache entry
+ std::unordered_set<std::string>
+ this_outs; // this will be the new cache entry
for (auto const& dep_target : this->GetTargetDirectDepends(target)) {
if (!dep_target->IsInBuildSystem()) {