diff options
Diffstat (limited to 'Source/cmCommonTargetGenerator.cxx')
-rw-r--r-- | Source/cmCommonTargetGenerator.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/cmCommonTargetGenerator.cxx b/Source/cmCommonTargetGenerator.cxx index a29dd76..1d670fe 100644 --- a/Source/cmCommonTargetGenerator.cxx +++ b/Source/cmCommonTargetGenerator.cxx @@ -201,6 +201,14 @@ std::vector<std::string> cmCommonTargetGenerator::GetLinkedTargetDirectories( for (cmGeneratorTarget const* target : cli->GetExternalObjectTargets()) { addLinkedTarget(target); } + if (lang == "Fortran"_s) { + // Fortran modules provided by `$<TARGET_OBJECTS>` as sources should be + // collated for use in this target. + for (cmGeneratorTarget const* target : + this->GeneratorTarget->GetSourceObjectLibraries(config)) { + addLinkedTarget(target); + } + } } return dirs; } |