mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-16 22:37:30 +08:00
Ninja: Do not recompact deps log in regeneration during a build
Since commitfb18215904
(Ninja: clean ninja metadata once generated, 2019-05-13, v3.17.0-rc1~207^2) we recompact the ninja deps log during regeneration. That does not make sense during a build, so skip it if we are regenerating during a build. This problem went unnoticed previously because on non-Windows platforms the deps log is just overwritten again by the outer build. On Windows platforms, recompaction during the build fails, but we did not actually try to do that until commit11f4259362
(Ninja: Clean metadata after regen during build on Windows with 1.10.2+, 2020-11-30, v3.19.2~29^2~1). Fixes: #21916
This commit is contained in:
@@ -588,8 +588,9 @@ void cmGlobalNinjaGenerator::CleanMetaData()
|
||||
// `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 && expectBuildManifest &&
|
||||
!missingBuildManifest) {
|
||||
if (this->NinjaSupportsUnconditionalRecompactTool &&
|
||||
!this->GetCMakeInstance()->GetRegenerateDuringBuild() &&
|
||||
expectBuildManifest && !missingBuildManifest) {
|
||||
run_ninja_tool({ "recompact" });
|
||||
}
|
||||
if (this->NinjaSupportsRestatTool && this->OutputPathPrefix.empty()) {
|
||||
|
Reference in New Issue
Block a user