summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-12-01 14:26:39 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-12-01 14:29:11 (GMT)
commitb76013b515df0216afd74456dfd0fb48ff9e68fe (patch)
treebee2ec09a1a89f374a1ef17900d2e4cee53f3fda
parent9b0c7273e07fb85d0ebe9d0f2a1906b233905f30 (diff)
parent73d1c78bf435af11cf5245ad47530f4b4b831412 (diff)
downloadCMake-b76013b515df0216afd74456dfd0fb48ff9e68fe.zip
CMake-b76013b515df0216afd74456dfd0fb48ff9e68fe.tar.gz
CMake-b76013b515df0216afd74456dfd0fb48ff9e68fe.tar.bz2
Merge topic 'ninja-regen-metadata' into release-3.19
73d1c78bf4 ci: update to use ninja 1.10.2 11f4259362 Ninja: Clean metadata after regen during build on Windows with 1.10.2+ Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5555
-rwxr-xr-x.gitlab/ci/ninja.ps14
-rwxr-xr-x.gitlab/ci/ninja.sh6
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx8
-rw-r--r--Source/cmGlobalNinjaGenerator.h5
4 files changed, 16 insertions, 7 deletions
diff --git a/.gitlab/ci/ninja.ps1 b/.gitlab/ci/ninja.ps1
index 91f8b02..4cc6bcb 100755
--- a/.gitlab/ci/ninja.ps1
+++ b/.gitlab/ci/ninja.ps1
@@ -1,7 +1,7 @@
$erroractionpreference = "stop"
-$version = "1.10.0"
-$sha256sum = "919FD158C16BF135E8A850BB4046EC1CE28A7439EE08B977CD0B7F6B3463D178"
+$version = "1.10.2"
+$sha256sum = "BBDE850D247D2737C5764C927D1071CBB1F1957DCABDA4A130FA8547C12C695F"
$filename = "ninja-win"
$tarball = "$filename.zip"
diff --git a/.gitlab/ci/ninja.sh b/.gitlab/ci/ninja.sh
index 93c1ee9..9011bbc 100755
--- a/.gitlab/ci/ninja.sh
+++ b/.gitlab/ci/ninja.sh
@@ -2,17 +2,17 @@
set -e
-readonly version="1.10.0"
+readonly version="1.10.2"
case "$( uname -s )" in
Linux)
shatool="sha256sum"
- sha256sum="6566836ddf3d72ca06685b34814e0c6fa0f0943542d651d0dab3150f10307c82"
+ sha256sum="763464859c7ef2ea3a0a10f4df40d2025d3bb9438fcb1228404640410c0ec22d"
platform="linux"
;;
Darwin)
shatool="shasum -a 256"
- sha256sum="2ee405c0e205d55666c60cc9c0d8d04c8ede06d3ef2e2c2aabe08fd81c17d22e"
+ sha256sum="6fa359f491fac7e5185273c6421a000eea6a2f0febf0ac03ac900bd4d80ed2a5"
platform="mac"
;;
*)
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(
diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h
index a0724ac..3d92ec9 100644
--- a/Source/cmGlobalNinjaGenerator.h
+++ b/Source/cmGlobalNinjaGenerator.h
@@ -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();