summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-08-04 17:19:42 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-08-05 16:20:44 (GMT)
commit803a7982b4403c690d7b7fa8c49d00a5abae3471 (patch)
tree0d72f1295e8fa3809bfec1b6402caecca0916eae /Source/cmGeneratorTarget.cxx
parentc971338416d7376d8b710b5c18957f6a800b3de0 (diff)
downloadCMake-803a7982b4403c690d7b7fa8c49d00a5abae3471.zip
CMake-803a7982b4403c690d7b7fa8c49d00a5abae3471.tar.gz
CMake-803a7982b4403c690d7b7fa8c49d00a5abae3471.tar.bz2
cmGeneratorTarget: Move GetLinkInformation from cmTarget
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx38
1 files changed, 38 insertions, 0 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 3dbeff2..845c052 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -229,6 +229,12 @@ cmGeneratorTarget::cmGeneratorTarget(cmTarget* t, cmLocalGenerator* lg)
this->GlobalGenerator = this->Makefile->GetGlobalGenerator();
}
+cmGeneratorTarget::~cmGeneratorTarget()
+{
+ cmDeleteAll(this->LinkInformation);
+ this->LinkInformation.clear();
+}
+
cmLocalGenerator* cmGeneratorTarget::GetLocalGenerator() const
{
return this->LocalGenerator;
@@ -1517,3 +1523,35 @@ bool cmGeneratorTarget::IsLinkInterfaceDependentNumberMaxProperty(
}
return this->GetCompatibleInterfaces(config).PropsNumberMax.count(p) > 0;
}
+
+
+//----------------------------------------------------------------------------
+cmComputeLinkInformation*
+cmGeneratorTarget::GetLinkInformation(const std::string& config) const
+{
+ // Lookup any existing information for this configuration.
+ std::string key(cmSystemTools::UpperCase(config));
+ cmTargetLinkInformationMap::iterator
+ i = this->LinkInformation.find(key);
+ if(i == this->LinkInformation.end())
+ {
+ // Compute information for this configuration.
+ cmComputeLinkInformation* info =
+ new cmComputeLinkInformation(this->Target, config);
+ if(!info || !info->Compute())
+ {
+ delete info;
+ info = 0;
+ }
+
+ // Store the information for this configuration.
+ cmTargetLinkInformationMap::value_type entry(key, info);
+ i = this->LinkInformation.insert(entry).first;
+
+ if (info)
+ {
+ this->Target->CheckPropertyCompatibility(info, config);
+ }
+ }
+ return i->second;
+}