mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-21 14:40:48 +08:00
cmGlobalNinjaGenerator: avoid cleandead and recompact in Ninja-Multi
Fixes: #20247
This commit is contained in:
@@ -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" });
|
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" });
|
run_ninja_tool({ "recompact" });
|
||||||
}
|
}
|
||||||
if (this->NinjaSupportsRestatTool) {
|
if (this->NinjaSupportsRestatTool) {
|
||||||
|
Reference in New Issue
Block a user