diff options
author | Brad King <brad.king@kitware.com> | 2019-07-30 17:53:41 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-07-30 17:53:41 (GMT) |
commit | 83368b4dd539f287942e26e53ed49d4ec3a18db0 (patch) | |
tree | e5f652b0621b576f2fc921c094d8db3b8799d025 | |
parent | fd58bb83e6a6dcbe27afd2272d1a9c2722de2482 (diff) | |
download | CMake-83368b4dd539f287942e26e53ed49d4ec3a18db0.zip CMake-83368b4dd539f287942e26e53ed49d4ec3a18db0.tar.gz CMake-83368b4dd539f287942e26e53ed49d4ec3a18db0.tar.bz2 |
Ninja: Drop unused dyndep version check
Our dyndep support version 1 has been merged to upstream Ninja.
We never developed a second dyndep version, so simply drop our
checks for different versions.
-rw-r--r-- | Source/cmGlobalNinjaGenerator.cxx | 47 | ||||
-rw-r--r-- | Source/cmGlobalNinjaGenerator.h | 2 |
2 files changed, 20 insertions, 29 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 87c55bf..4656d03 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -555,7 +555,11 @@ void cmGlobalNinjaGenerator::CheckNinjaFeatures() std::string::size_type pos = this->NinjaVersion.find(k_DYNDEP_); if (pos != std::string::npos) { const char* fv = &this->NinjaVersion[pos + k_DYNDEP_.size()]; - cmSystemTools::StringToULong(fv, &this->NinjaSupportsDyndeps); + unsigned long dyndep = 0; + cmSystemTools::StringToULong(fv, &dyndep); + if (dyndep == 1) { + this->NinjaSupportsDyndeps = true; + } } } } @@ -572,37 +576,24 @@ bool cmGlobalNinjaGenerator::CheckLanguages( bool cmGlobalNinjaGenerator::CheckFortran(cmMakefile* mf) const { - if (this->NinjaSupportsDyndeps == 1) { + if (this->NinjaSupportsDyndeps) { return true; } std::ostringstream e; - if (this->NinjaSupportsDyndeps == 0) { - /* clang-format off */ - e << - "The Ninja generator does not support Fortran using Ninja version\n" - " " + this->NinjaVersion + "\n" - "due to lack of required features. " - "Kitware has implemented the required features but as of this version " - "of CMake they have not been integrated to upstream ninja. " - "Pending integration, Kitware maintains a branch at:\n" - " https://github.com/Kitware/ninja/tree/features-for-fortran#readme\n" - "with the required features. " - "One may build ninja from that branch to get support for Fortran." - ; - /* clang-format on */ - } else { - /* clang-format off */ - e << - "The Ninja generator in this version of CMake does not support Fortran " - "using Ninja version\n" - " " + this->NinjaVersion + "\n" - "because its 'dyndep' feature version is " << - this->NinjaSupportsDyndeps << ". " - "This version of CMake is aware only of 'dyndep' feature version 1." - ; - /* clang-format on */ - } + /* clang-format off */ + e << + "The Ninja generator does not support Fortran using Ninja version\n" + " " + this->NinjaVersion + "\n" + "due to lack of required features. " + "Kitware has implemented the required features but as of this version " + "of CMake they have not been integrated to upstream ninja. " + "Pending integration, Kitware maintains a branch at:\n" + " https://github.com/Kitware/ninja/tree/features-for-fortran#readme\n" + "with the required features. " + "One may build ninja from that branch to get support for Fortran." + ; + /* clang-format on */ mf->IssueMessage(MessageType::FATAL_ERROR, e.str()); cmSystemTools::SetFatalErrorOccured(); return false; diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h index 9ca7480..c752bab 100644 --- a/Source/cmGlobalNinjaGenerator.h +++ b/Source/cmGlobalNinjaGenerator.h @@ -439,7 +439,7 @@ private: bool NinjaSupportsImplicitOuts = false; bool NinjaSupportsManifestRestat = false; bool NinjaSupportsMultilineDepfile = false; - unsigned long NinjaSupportsDyndeps = 0; + bool NinjaSupportsDyndeps = false; private: void InitOutputPathPrefix(); |