diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2023-01-20 14:38:43 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-01-23 17:21:05 (GMT) |
commit | 7abddcab08c98a62e5386297124946b6483569ca (patch) | |
tree | f0caa0ee488e8a3b6e93b77ce182791f066ca9b3 /Source/cmGlobalNinjaGenerator.cxx | |
parent | f9f34eb11143e5c5c1daee4aa2867139cf930aa4 (diff) | |
download | CMake-7abddcab08c98a62e5386297124946b6483569ca.zip CMake-7abddcab08c98a62e5386297124946b6483569ca.tar.gz CMake-7abddcab08c98a62e5386297124946b6483569ca.tar.bz2 |
Ninja: require Ninja 1.11 for C++ module support
See: https://gitlab.kitware.com/cmake/cmake/-/issues/18355#note_1296721
See: https://github.com/ninja-build/ninja/pull/1937
Diffstat (limited to 'Source/cmGlobalNinjaGenerator.cxx')
-rw-r--r-- | Source/cmGlobalNinjaGenerator.cxx | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index a1eadb9..b80a06e 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -742,10 +742,13 @@ void cmGlobalNinjaGenerator::CheckNinjaFeatures() this->NinjaSupportsMultilineDepfile = !cmSystemTools::VersionCompare(cmSystemTools::OP_LESS, this->NinjaVersion, RequiredNinjaVersionForMultilineDepfile()); - this->NinjaSupportsDyndeps = + this->NinjaSupportsDyndepsCxx = !cmSystemTools::VersionCompare(cmSystemTools::OP_LESS, this->NinjaVersion, - RequiredNinjaVersionForDyndeps()); - if (!this->NinjaSupportsDyndeps) { + RequiredNinjaVersionForDyndepsCxx()); + this->NinjaSupportsDyndepsFortran = + !cmSystemTools::VersionCompare(cmSystemTools::OP_LESS, this->NinjaVersion, + RequiredNinjaVersionForDyndepsFortran()); + if (!this->NinjaSupportsDyndepsFortran) { // The ninja version number is not new enough to have upstream support. // Our ninja branch adds ".dyndep-#" to its version number, // where '#' is a feature-specific version number. Extract it. @@ -756,7 +759,7 @@ void cmGlobalNinjaGenerator::CheckNinjaFeatures() unsigned long dyndep = 0; cmStrToULong(fv, &dyndep); if (dyndep == 1) { - this->NinjaSupportsDyndeps = true; + this->NinjaSupportsDyndepsFortran = true; } } } @@ -856,7 +859,7 @@ bool cmGlobalNinjaGenerator::CheckLanguages( bool cmGlobalNinjaGenerator::CheckCxxModuleSupport() { this->CxxModuleSupportCheck(); - if (this->NinjaSupportsDyndeps) { + if (this->NinjaSupportsDyndepsCxx) { return true; } bool const diagnose = !this->DiagnosedCxxModuleNinjaSupport && @@ -869,7 +872,8 @@ bool cmGlobalNinjaGenerator::CheckCxxModuleSupport() "using Ninja version \n" " " << this->NinjaVersion << "\n" "due to lack of required features. " - "Ninja " << RequiredNinjaVersionForDyndeps() << " or higher is required." + "Ninja " << RequiredNinjaVersionForDyndepsCxx() << + " or higher is required." ; /* clang-format on */ this->GetCMakeInstance()->IssueMessage(MessageType::FATAL_ERROR, e.str()); @@ -880,7 +884,7 @@ bool cmGlobalNinjaGenerator::CheckCxxModuleSupport() bool cmGlobalNinjaGenerator::CheckFortran(cmMakefile* mf) const { - if (this->NinjaSupportsDyndeps) { + if (this->NinjaSupportsDyndepsFortran) { return true; } @@ -890,7 +894,8 @@ bool cmGlobalNinjaGenerator::CheckFortran(cmMakefile* mf) const "The Ninja generator does not support Fortran using Ninja version\n" " " << this->NinjaVersion << "\n" "due to lack of required features. " - "Ninja " << RequiredNinjaVersionForDyndeps() << " or higher is required." + "Ninja " << RequiredNinjaVersionForDyndepsFortran() << + " or higher is required." ; /* clang-format on */ mf->IssueMessage(MessageType::FATAL_ERROR, e.str()); |