diff options
Diffstat (limited to 'Source/cmGlobalNinjaGenerator.cxx')
-rw-r--r-- | Source/cmGlobalNinjaGenerator.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index cf45da9..d477c7d 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -539,10 +539,11 @@ void cmGlobalNinjaGenerator::Generate() this->CloseBuildFileStreams(); #ifdef _WIN32 - // The ninja tools will not be able to update metadata on Windows + // Older ninja tools will not be able to update metadata on Windows // when we are re-generating inside an existing 'ninja' invocation // because the outer tool has the files open for write. - if (!this->GetCMakeInstance()->GetRegenerateDuringBuild()) + if (this->NinjaSupportsMetadataOnRegeneration || + !this->GetCMakeInstance()->GetRegenerateDuringBuild()) #endif { this->CleanMetaData(); @@ -691,6 +692,9 @@ void cmGlobalNinjaGenerator::CheckNinjaFeatures() this->NinjaSupportsMultipleOutputs = !cmSystemTools::VersionCompare( cmSystemTools::OP_LESS, this->NinjaVersion.c_str(), RequiredNinjaVersionForMultipleOutputs().c_str()); + this->NinjaSupportsMetadataOnRegeneration = !cmSystemTools::VersionCompare( + cmSystemTools::OP_LESS, this->NinjaVersion.c_str(), + RequiredNinjaVersionForMetadataOnRegeneration().c_str()); } bool cmGlobalNinjaGenerator::CheckLanguages( |