|
|
@@ -738,10 +738,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.
|
|
|
@@ -752,7 +755,7 @@ void cmGlobalNinjaGenerator::CheckNinjaFeatures()
|
|
|
unsigned long dyndep = 0;
|
|
|
cmStrToULong(fv, &dyndep);
|
|
|
if (dyndep == 1) {
|
|
|
- this->NinjaSupportsDyndeps = true;
|
|
|
+ this->NinjaSupportsDyndepsFortran = true;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -860,7 +863,7 @@ bool cmGlobalNinjaGenerator::CheckCxxModuleSupport()
|
|
|
"C++20 modules support via CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP "
|
|
|
"is experimental. It is meant only for compiler developers to try.");
|
|
|
}
|
|
|
- if (this->NinjaSupportsDyndeps) {
|
|
|
+ if (this->NinjaSupportsDyndepsCxx) {
|
|
|
return true;
|
|
|
}
|
|
|
if (diagnose) {
|
|
|
@@ -871,7 +874,7 @@ 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());
|
|
|
@@ -882,7 +885,7 @@ bool cmGlobalNinjaGenerator::CheckCxxModuleSupport()
|
|
|
|
|
|
bool cmGlobalNinjaGenerator::CheckFortran(cmMakefile* mf) const
|
|
|
{
|
|
|
- if (this->NinjaSupportsDyndeps) {
|
|
|
+ if (this->NinjaSupportsDyndepsFortran) {
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
@@ -892,7 +895,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());
|