summaryrefslogtreecommitdiffstats
path: root/Source/cmComputeLinkInformation.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmComputeLinkInformation.cxx')
-rw-r--r--Source/cmComputeLinkInformation.cxx14
1 files changed, 12 insertions, 2 deletions
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx
index b80b3cb..ebbb88f 100644
--- a/Source/cmComputeLinkInformation.cxx
+++ b/Source/cmComputeLinkInformation.cxx
@@ -525,6 +525,12 @@ cmComputeLinkInformation::GetSharedLibrariesLinked() const
return this->SharedLibrariesLinked;
}
+const std::vector<const cmGeneratorTarget*>&
+cmComputeLinkInformation::GetObjectLibrariesLinked() const
+{
+ return this->ObjectLibrariesLinked;
+}
+
bool cmComputeLinkInformation::Compute()
{
// Skip targets that do not link.
@@ -1147,8 +1153,12 @@ void cmComputeLinkInformation::AddItem(LinkEntry const& entry)
this->AddItem(BT<std::string>(libName, item.Backtrace));
}
} else if (tgt->GetType() == cmStateEnums::OBJECT_LIBRARY) {
- // Ignore object library!
- // Its object-files should already have been extracted for linking.
+ if (!tgt->HaveCxx20ModuleSources() && !tgt->HaveFortranSources(config)) {
+ // Ignore object library!
+ // Its object-files should already have been extracted for linking.
+ } else {
+ this->ObjectLibrariesLinked.push_back(entry.Target);
+ }
} else {
// Decide whether to use an import library.
cmStateEnums::ArtifactType artifact = tgt->HasImportLibrary(config)