summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-07-26 12:03:44 (GMT)
committerStephen Kelly <steveire@gmail.com>2013-07-26 13:15:42 (GMT)
commitc8a10ba9ad8707cfb892ca812efa2f6899adf60b (patch)
tree7ca464085ac64697fe4034344ed9ed0122add251 /Source/cmTarget.cxx
parentf94bdb3deb70d0fa7ed5275609318be8ac79503b (diff)
downloadCMake-c8a10ba9ad8707cfb892ca812efa2f6899adf60b.zip
CMake-c8a10ba9ad8707cfb892ca812efa2f6899adf60b.tar.gz
CMake-c8a10ba9ad8707cfb892ca812efa2f6899adf60b.tar.bz2
cmTarget: Fix iface libraries and languages for static libraries.
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx17
1 files changed, 16 insertions, 1 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 136c43c..622e812 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -6467,6 +6467,15 @@ bool cmTarget::ComputeLinkInterface(const char* config, LinkInterface& iface,
break;
}
}
+ else
+ {
+ iface.Libraries = impl->Libraries;
+ if(this->GetType() == cmTarget::STATIC_LIBRARY)
+ {
+ // Targets using this archive need its language runtime libraries.
+ iface.Languages = impl->Languages;
+ }
+ }
}
}
@@ -6495,7 +6504,8 @@ bool cmTarget::ComputeLinkInterface(const char* config, LinkInterface& iface,
headTarget,
this, &dagChecker), iface.Libraries);
- if(this->GetType() == cmTarget::SHARED_LIBRARY)
+ if(this->GetType() == cmTarget::SHARED_LIBRARY
+ || this->GetType() == cmTarget::STATIC_LIBRARY)
{
// Shared libraries may have runtime implementation dependencies
// on other shared libraries that are not in the interface.
@@ -6529,6 +6539,11 @@ bool cmTarget::ComputeLinkInterface(const char* config, LinkInterface& iface,
}
}
}
+ if(this->GetType() == cmTarget::STATIC_LIBRARY)
+ {
+ // Targets using this archive need its language runtime libraries.
+ iface.Languages = impl->Languages;
+ }
}
}
else if (this->GetPolicyStatusCMP0022() == cmPolicies::WARN