cmLocalUnixMakefileGenerator3: handle object-referencing Fortran modules
Targets only using Fortran modules via `$<TARGET_OBJECTS>` also need a collation step to be performed. Check for this case and trigger the depends rule to be used.
This commit is contained in:
parent
6afe841e62
commit
f8729ab366
@ -1899,6 +1899,11 @@ void cmLocalUnixMakefileGenerator3::WriteDependLanguageInfo(
|
||||
: "OFF")
|
||||
<< ")\n\n";
|
||||
|
||||
bool requireFortran = false;
|
||||
if (target->HaveFortranSources(this->GetConfigName())) {
|
||||
requireFortran = true;
|
||||
}
|
||||
|
||||
auto const& implicitLangs =
|
||||
this->GetImplicitDepends(target, cmDependencyScannerKind::CMake);
|
||||
|
||||
@ -1908,6 +1913,12 @@ void cmLocalUnixMakefileGenerator3::WriteDependLanguageInfo(
|
||||
cmakefileStream << "set(CMAKE_DEPENDS_LANGUAGES\n";
|
||||
for (auto const& implicitLang : implicitLangs) {
|
||||
cmakefileStream << " \"" << implicitLang.first << "\"\n";
|
||||
if (requireFortran && implicitLang.first == "Fortran"_s) {
|
||||
requireFortran = false;
|
||||
}
|
||||
}
|
||||
if (requireFortran) {
|
||||
cmakefileStream << " \"Fortran\"\n";
|
||||
}
|
||||
cmakefileStream << " )\n";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user