cmTarget: Remove 'head' argument from GetLinkInformation

No call sites use it anyway.

Co-Author: Stephen Kelly <steveire@gmail.com>
This commit is contained in:
Brad King 2014-06-12 16:10:00 -04:00
parent 56aed7005a
commit 06328dd58e
2 changed files with 7 additions and 11 deletions

View File

@ -6943,19 +6943,17 @@ void cmTarget::CheckPropertyCompatibility(cmComputeLinkInformation *info,
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
cmComputeLinkInformation* cmComputeLinkInformation*
cmTarget::GetLinkInformation(const std::string& config, cmTarget::GetLinkInformation(const std::string& config) const
cmTarget const* head) const
{ {
cmTarget const* headTarget = head ? head : this;
// Lookup any existing information for this configuration. // Lookup any existing information for this configuration.
TargetConfigPair key(headTarget, cmSystemTools::UpperCase(config)); std::string key(cmSystemTools::UpperCase(config));
cmTargetLinkInformationMap::iterator cmTargetLinkInformationMap::iterator
i = this->LinkInformation.find(key); i = this->LinkInformation.find(key);
if(i == this->LinkInformation.end()) if(i == this->LinkInformation.end())
{ {
// Compute information for this configuration. // Compute information for this configuration.
cmComputeLinkInformation* info = cmComputeLinkInformation* info =
new cmComputeLinkInformation(this, config, headTarget); new cmComputeLinkInformation(this, config, this);
if(!info || !info->Compute()) if(!info || !info->Compute())
{ {
delete info; delete info;

View File

@ -44,11 +44,9 @@ class cmGeneratorTarget;
class cmTargetTraceDependencies; class cmTargetTraceDependencies;
struct cmTargetLinkInformationMap: struct cmTargetLinkInformationMap:
public std::map<std::pair<cmTarget const* , std::string>, public std::map<std::string, cmComputeLinkInformation*>
cmComputeLinkInformation*>
{ {
typedef std::map<std::pair<cmTarget const* , std::string>, typedef std::map<std::string, cmComputeLinkInformation*> derived;
cmComputeLinkInformation*> derived;
cmTargetLinkInformationMap() {} cmTargetLinkInformationMap() {}
cmTargetLinkInformationMap(cmTargetLinkInformationMap const& r); cmTargetLinkInformationMap(cmTargetLinkInformationMap const& r);
~cmTargetLinkInformationMap(); ~cmTargetLinkInformationMap();
@ -442,8 +440,8 @@ public:
* install tree. For example: "\@rpath/" or "\@loader_path/". */ * install tree. For example: "\@rpath/" or "\@loader_path/". */
std::string GetInstallNameDirForInstallTree() const; std::string GetInstallNameDirForInstallTree() const;
cmComputeLinkInformation* GetLinkInformation(const std::string& config, cmComputeLinkInformation*
cmTarget const* head = 0) const; GetLinkInformation(const std::string& config) const;
// Get the properties // Get the properties
cmPropertyMap &GetProperties() const { return this->Properties; } cmPropertyMap &GetProperties() const { return this->Properties; }