mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-12 17:19:05 -05:00
Merge topic 'ninja-regen-metadata' into release-3.19
73d1c78bf4ci: update to use ninja 1.10.211f4259362Ninja: Clean metadata after regen during build on Windows with 1.10.2+ Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5555
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -373,6 +373,10 @@ public:
|
||||
{
|
||||
return "1.10";
|
||||
}
|
||||
static std::string RequiredNinjaVersionForMetadataOnRegeneration()
|
||||
{
|
||||
return "1.10.2";
|
||||
}
|
||||
bool SupportsConsolePool() const;
|
||||
bool SupportsImplicitOuts() const;
|
||||
bool SupportsManifestRestat() const;
|
||||
@@ -538,6 +542,7 @@ private:
|
||||
bool NinjaSupportsUnconditionalRecompactTool = false;
|
||||
bool NinjaSupportsCleanDeadTool = false;
|
||||
bool NinjaSupportsMultipleOutputs = false;
|
||||
bool NinjaSupportsMetadataOnRegeneration = false;
|
||||
|
||||
private:
|
||||
void InitOutputPathPrefix();
|
||||
|
||||
Reference in New Issue
Block a user