diff options
author | Brad King <brad.king@kitware.com> | 2019-01-30 19:55:34 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-01-30 19:58:21 (GMT) |
commit | f4f3b6b9af13366b16ce5a3be7af6c2b68c8be09 (patch) | |
tree | dfd2cf00fbc2f95bde96f3ff27edb8531d9b0f65 /Source/cmGlobalNinjaGenerator.cxx | |
parent | 699cd032128afcda78e12a76b227faa6c1f6a258 (diff) | |
download | CMake-f4f3b6b9af13366b16ce5a3be7af6c2b68c8be09.zip CMake-f4f3b6b9af13366b16ce5a3be7af6c2b68c8be09.tar.gz CMake-f4f3b6b9af13366b16ce5a3be7af6c2b68c8be09.tar.bz2 |
Ninja: Detect when ninja is new enough to support a multi-line depfile
Ninja 1.9 supports the multi-line depfile format generated by the
Intel Compiler for Windows. Teach the global generator to detect
when the version is new enough to support this.
Diffstat (limited to 'Source/cmGlobalNinjaGenerator.cxx')
-rw-r--r-- | Source/cmGlobalNinjaGenerator.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 4fd0673..6498024 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -454,6 +454,7 @@ cmGlobalNinjaGenerator::cmGlobalNinjaGenerator(cmake* cm) , NinjaSupportsConsolePool(false) , NinjaSupportsImplicitOuts(false) , NinjaSupportsManifestRestat(false) + , NinjaSupportsMultilineDepfile(false) , NinjaSupportsDyndeps(0) { #ifdef _WIN32 @@ -581,6 +582,9 @@ void cmGlobalNinjaGenerator::CheckNinjaFeatures() this->NinjaSupportsManifestRestat = !cmSystemTools::VersionCompare( cmSystemTools::OP_LESS, this->NinjaVersion.c_str(), RequiredNinjaVersionForManifestRestat().c_str()); + this->NinjaSupportsMultilineDepfile = !cmSystemTools::VersionCompare( + cmSystemTools::OP_LESS, this->NinjaVersion.c_str(), + RequiredNinjaVersionForMultilineDepfile().c_str()); { // Our ninja branch adds ".dyndep-#" to its version number, // where '#' is a feature-specific version number. Extract it. @@ -1478,6 +1482,11 @@ bool cmGlobalNinjaGenerator::SupportsManifestRestat() const return this->NinjaSupportsManifestRestat; } +bool cmGlobalNinjaGenerator::SupportsMultilineDepfile() const +{ + return this->NinjaSupportsMultilineDepfile; +} + void cmGlobalNinjaGenerator::WriteTargetClean(std::ostream& os) { WriteRule(*this->RulesFileStream, "CLEAN", ninjaCmd() + " -t clean", |