summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-06-12 20:21:45 (GMT)
committerBrad King <brad.king@kitware.com>2014-06-23 13:14:45 (GMT)
commit4ac72455fd7027039d498f007fdfe7c1d819b9f9 (patch)
tree5544340ad7af8cfbf7670d0eac7c705096b05519 /Source/cmTarget.cxx
parentbcdb7ff9df8fb831e952a3909da11da51773a30f (diff)
downloadCMake-4ac72455fd7027039d498f007fdfe7c1d819b9f9.zip
CMake-4ac72455fd7027039d498f007fdfe7c1d819b9f9.tar.gz
CMake-4ac72455fd7027039d498f007fdfe7c1d819b9f9.tar.bz2
cmTarget: Drop 'head' argument from GetLinkClosure
It is only ever passed the 'this' target itself.
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx22
1 files changed, 10 insertions, 12 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index f52c94d..f380052 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -136,8 +136,7 @@ public:
cmTarget::LinkImplementation> LinkImplMapType;
LinkImplMapType LinkImplMap;
- typedef std::map<TargetConfigPair, cmTarget::LinkClosure>
- LinkClosureMapType;
+ typedef std::map<std::string, cmTarget::LinkClosure> LinkClosureMapType;
LinkClosureMapType LinkClosureMap;
typedef std::map<TargetConfigPair, std::vector<cmSourceFile*> >
@@ -3554,21 +3553,20 @@ private:
//----------------------------------------------------------------------------
std::string cmTarget::GetLinkerLanguage(const std::string& config) const
{
- return this->GetLinkClosure(config, this)->LinkerLanguage;
+ return this->GetLinkClosure(config)->LinkerLanguage;
}
//----------------------------------------------------------------------------
-cmTarget::LinkClosure const* cmTarget::GetLinkClosure(
- const std::string& config,
- cmTarget const* head) const
+cmTarget::LinkClosure const*
+cmTarget::GetLinkClosure(const std::string& config) const
{
- TargetConfigPair key(head, cmSystemTools::UpperCase(config));
+ std::string key(cmSystemTools::UpperCase(config));
cmTargetInternals::LinkClosureMapType::iterator
i = this->Internal->LinkClosureMap.find(key);
if(i == this->Internal->LinkClosureMap.end())
{
LinkClosure lc;
- this->ComputeLinkClosure(config, lc, head);
+ this->ComputeLinkClosure(config, lc);
cmTargetInternals::LinkClosureMapType::value_type entry(key, lc);
i = this->Internal->LinkClosureMap.insert(entry).first;
}
@@ -3629,12 +3627,12 @@ public:
};
//----------------------------------------------------------------------------
-void cmTarget::ComputeLinkClosure(const std::string& config, LinkClosure& lc,
- cmTarget const* head) const
+void cmTarget::ComputeLinkClosure(const std::string& config,
+ LinkClosure& lc) const
{
// Get languages built in this target.
std::set<std::string> languages;
- LinkImplementation const* impl = this->GetLinkImplementation(config, head);
+ LinkImplementation const* impl = this->GetLinkImplementation(config, this);
for(std::vector<std::string>::const_iterator li = impl->Languages.begin();
li != impl->Languages.end(); ++li)
{
@@ -3642,7 +3640,7 @@ void cmTarget::ComputeLinkClosure(const std::string& config, LinkClosure& lc,
}
// Add interface languages from linked targets.
- cmTargetCollectLinkLanguages cll(this, config, languages, head);
+ cmTargetCollectLinkLanguages cll(this, config, languages, this);
for(std::vector<std::string>::const_iterator li = impl->Libraries.begin();
li != impl->Libraries.end(); ++li)
{