summaryrefslogtreecommitdiffstats
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
parentabe9505df94e9a1511238c41f9d4459064148c94 (diff)
downloadCMake-0431f2c4d7cbfcd873bc34caee9ed09253e8c8ad.zip
CMake-0431f2c4d7cbfcd873bc34caee9ed09253e8c8ad.tar.gz
CMake-0431f2c4d7cbfcd873bc34caee9ed09253e8c8ad.tar.bz2
cmGeneratorTarget: Move ComputeLinkImplementationLanguages from cmTarget.
-rw-r--r--Source/cmGeneratorTarget.cxx16
-rw-r--r--Source/cmGeneratorTarget.h4
-rw-r--r--Source/cmTarget.cxx14
-rw-r--r--Source/cmTarget.h3
4 files changed, 19 insertions, 18 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"))
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index 99463c7..f5dc20d 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -201,6 +201,10 @@ public:
cmLinkImplementation const*
GetLinkImplementation(const std::string& config) const;
+ void ComputeLinkImplementationLanguages(const std::string& config,
+ cmOptionalLinkImplementation& impl
+ ) const;
+
bool HaveBuildTreeRPATH(const std::string& config) const;
/** Full path with trailing slash to the top-level directory
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 9073f82..f395c45 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -3705,20 +3705,6 @@ void cmTarget::ComputeLinkImplementationLibraries(
}
//----------------------------------------------------------------------------
-void cmTarget::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->GetLanguages(languages, config);
- // Copy the set of langauges to the link implementation.
- impl.Languages.insert(impl.Languages.begin(),
- languages.begin(), languages.end());
-}
-
-//----------------------------------------------------------------------------
cmTarget const* cmTarget::FindTargetToLink(std::string const& name) const
{
cmTarget const* tgt = this->Makefile->FindTargetToUse(name);
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index 8866e65..1db4ba1 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -237,9 +237,6 @@ public:
void ComputeLinkImplementationLibraries(const std::string& config,
cmOptionalLinkImplementation& impl,
cmTarget const* head) const;
- void ComputeLinkImplementationLanguages(const std::string& config,
- cmOptionalLinkImplementation& impl
- ) const;
cmOptionalLinkImplementation&
GetLinkImplMap(std::string const& config) const;