summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2020-01-22 15:41:30 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2020-01-23 14:24:46 (GMT)
commit6cc74b614049bd2fce53675f1a11eecec3e1e079 (patch)
tree007d575426526491f7bc796a82483e48898bd2fc
parent593d0f3a578a51775d6402064ec53dce42b4d82c (diff)
downloadCMake-6cc74b614049bd2fce53675f1a11eecec3e1e079.zip
CMake-6cc74b614049bd2fce53675f1a11eecec3e1e079.tar.gz
CMake-6cc74b614049bd2fce53675f1a11eecec3e1e079.tar.bz2
cmGlobalNinjaGenerator: avoid cleandead and recompact in Ninja-Multi
Fixes: #20247
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx13
1 files changed, 11 insertions, 2 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index 1f83ec5..280f9e0 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -552,10 +552,19 @@ void cmGlobalNinjaGenerator::Generate()
}
};
- if (this->NinjaSupportsCleanDeadTool) {
+ // The `cleandead` tool needs to know about all outputs in the build we just
+ // wrote out. Ninja-Multi doesn't have a single `build.ninja` we can use that
+ // is the union of all generated configurations, so we can't run it reliably
+ // in that case.
+ if (this->NinjaSupportsCleanDeadTool && !this->IsMultiConfig()) {
run_ninja_tool({ "cleandead" });
}
- if (this->NinjaSupportsUnconditionalRecompactTool) {
+ // The `recompact` tool loads the manifest. As above, we don't have a single
+ // `build.ninja` to load for this in Ninja-Multi. This may be relaxed in the
+ // future pending further investigation into how Ninja works upstream
+ // (ninja#1721).
+ if (this->NinjaSupportsUnconditionalRecompactTool &&
+ !this->IsMultiConfig()) {
run_ninja_tool({ "recompact" });
}
if (this->NinjaSupportsRestatTool) {