summaryrefslogtreecommitdiffstats
path: root/Source/cmComputeLinkInformation.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmComputeLinkInformation.cxx')
-rw-r--r--Source/cmComputeLinkInformation.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx
index d9d8ec1..de7f02e 100644
--- a/Source/cmComputeLinkInformation.cxx
+++ b/Source/cmComputeLinkInformation.cxx
@@ -1340,7 +1340,8 @@ void cmComputeLinkInformation::AddSharedDepItem(LinkEntry const& entry)
// If the linker also uses '--as-needed' behavior, this will not
// add an unnecessary direct dependency.
(tgt && tgt->IsImported() &&
- !tgt->HasKnownRuntimeArtifactLocation(this->Config))) {
+ !tgt->HasKnownRuntimeArtifactLocation(this->Config) &&
+ this->Target->LinkerEnforcesNoAllowShLibUndefined(this->Config))) {
this->AddItem(entry);
return;
}