summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-08-05 15:37:50 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-08-26 17:46:32 (GMT)
commit0431f2c4d7cbfcd873bc34caee9ed09253e8c8ad (patch)
treeb38335484e57492a77430de5ca2e2dedcb46400a /Source/cmGeneratorTarget.cxx
parentabe9505df94e9a1511238c41f9d4459064148c94 (diff)
downloadCMake-0431f2c4d7cbfcd873bc34caee9ed09253e8c8ad.zip
CMake-0431f2c4d7cbfcd873bc34caee9ed09253e8c8ad.tar.gz
CMake-0431f2c4d7cbfcd873bc34caee9ed09253e8c8ad.tar.bz2
cmGeneratorTarget: Move ComputeLinkImplementationLanguages from cmTarget.
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx16
1 files changed, 15 insertions, 1 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 9dc045c..22b1baf 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -4410,12 +4410,26 @@ cmGeneratorTarget::GetLinkImplementation(const std::string& config) const
if(!impl.LanguagesDone)
{
impl.LanguagesDone = true;
- this->Target->ComputeLinkImplementationLanguages(config, impl);
+ this->ComputeLinkImplementationLanguages(config, impl);
}
return &impl;
}
//----------------------------------------------------------------------------
+void cmGeneratorTarget::ComputeLinkImplementationLanguages(
+ const std::string& config,
+ cmOptionalLinkImplementation& impl) const
+{
+ // This target needs runtime libraries for its source languages.
+ std::set<std::string> languages;
+ // Get languages used in our source files.
+ this->Target->GetLanguages(languages, config);
+ // Copy the set of langauges to the link implementation.
+ impl.Languages.insert(impl.Languages.begin(),
+ languages.begin(), languages.end());
+}
+
+//----------------------------------------------------------------------------
bool cmGeneratorTarget::HaveBuildTreeRPATH(const std::string& config) const
{
if (this->Target->GetPropertyAsBool("SKIP_BUILD_RPATH"))