summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalNinjaGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-12-14 15:06:26 (GMT)
committerBrad King <brad.king@kitware.com>2020-12-14 15:08:14 (GMT)
commit73a961eaba84c622480eff84671c7e3f6a7f61c4 (patch)
treeeec0fec932e1629348ca16239384314f166c1b17 /Source/cmGlobalNinjaGenerator.cxx
parent566e96d42db35e2c88ceb5d0f3de49736295c496 (diff)
downloadCMake-73a961eaba84c622480eff84671c7e3f6a7f61c4.zip
CMake-73a961eaba84c622480eff84671c7e3f6a7f61c4.tar.gz
CMake-73a961eaba84c622480eff84671c7e3f6a7f61c4.tar.bz2
Ninja: Remove cleandead on regeneration
Remove the `cleandead` tool invocation added by commit fb18215904 (Ninja: clean ninja metadata once generated, 2019-05-13, v3.17.0-rc1~207^2). The tool deletes files that were not previously deleted by regenerating the build system. Also, there are use cases where no-longer-generated files should not be removed, such as Qt's TS files. Fixes: #21549
Diffstat (limited to 'Source/cmGlobalNinjaGenerator.cxx')
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx14
1 files changed, 1 insertions, 13 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index b6c343c..a911139 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -573,18 +573,9 @@ void cmGlobalNinjaGenerator::CleanMetaData()
// Skip some ninja tools if they need 'build.ninja' but it is missing.
bool const missingBuildManifest = expectBuildManifest &&
- (this->NinjaSupportsCleanDeadTool ||
- this->NinjaSupportsUnconditionalRecompactTool) &&
+ this->NinjaSupportsUnconditionalRecompactTool &&
!cmSystemTools::FileExists("build.ninja");
- // 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 && expectBuildManifest &&
- !missingBuildManifest) {
- run_ninja_tool({ "cleandead" });
- }
// 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
@@ -671,9 +662,6 @@ void cmGlobalNinjaGenerator::CheckNinjaFeatures()
}
}
}
- this->NinjaSupportsCleanDeadTool = !cmSystemTools::VersionCompare(
- cmSystemTools::OP_LESS, this->NinjaVersion.c_str(),
- RequiredNinjaVersionForCleanDeadTool().c_str());
this->NinjaSupportsUnconditionalRecompactTool =
!cmSystemTools::VersionCompare(
cmSystemTools::OP_LESS, this->NinjaVersion.c_str(),