diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-08-26 17:37:32 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-08-26 17:37:32 (GMT) |
commit | 6353816786caccfef7acb3fd72aa28e0366da405 (patch) | |
tree | aa2dda3e9f6d34d84c8106f8a98504963221a25f | |
parent | 20993de46444e0f74700a641b54a8ca7e015bac4 (diff) | |
download | CMake-6353816786caccfef7acb3fd72aa28e0366da405.zip CMake-6353816786caccfef7acb3fd72aa28e0366da405.tar.gz CMake-6353816786caccfef7acb3fd72aa28e0366da405.tar.bz2 |
cmTarget: Add GetHeadToLinkInterfaceMap methods.
-rw-r--r-- | Source/cmTarget.cxx | 28 | ||||
-rw-r--r-- | Source/cmTarget.h | 5 |
2 files changed, 25 insertions, 8 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index a10cb86..fb545b1 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -4126,9 +4126,7 @@ cmLinkInterface const* cmTarget::GetLinkInterface(const std::string& config, } // Lookup any existing link interface for this configuration. - std::string CONFIG = cmSystemTools::UpperCase(config); - cmHeadToLinkInterfaceMap& hm = - this->Internal->LinkInterfaceMap[CONFIG]; + cmHeadToLinkInterfaceMap& hm = this->GetHeadToLinkInterfaceMap(config); // If the link interface does not depend on the head target // then return the one we computed first. @@ -4177,11 +4175,10 @@ cmTarget::GetLinkInterfaceLibraries(const std::string& config, } // Lookup any existing link interface for this configuration. - std::string CONFIG = cmSystemTools::UpperCase(config); cmHeadToLinkInterfaceMap& hm = (usage_requirements_only ? - this->Internal->LinkInterfaceUsageRequirementsOnlyMap[CONFIG] : - this->Internal->LinkInterfaceMap[CONFIG]); + this->GetHeadToLinkInterfaceUsageRequirementsMap(config) : + this->GetHeadToLinkInterfaceMap(config)); // If the link interface does not depend on the head target // then return the one we computed first. @@ -4201,6 +4198,21 @@ cmTarget::GetLinkInterfaceLibraries(const std::string& config, return iface.Exists? &iface : 0; } +cmHeadToLinkInterfaceMap& +cmTarget::GetHeadToLinkInterfaceMap(const std::string &config) const +{ + std::string CONFIG = cmSystemTools::UpperCase(config); + return this->Internal->LinkInterfaceMap[CONFIG]; +} + +cmHeadToLinkInterfaceMap& +cmTarget::GetHeadToLinkInterfaceUsageRequirementsMap( + const std::string &config) const +{ + std::string CONFIG = cmSystemTools::UpperCase(config); + return this->Internal->LinkInterfaceUsageRequirementsOnlyMap[CONFIG]; +} + //---------------------------------------------------------------------------- const cmLinkInterface * cmTarget::GetImportLinkInterface(const std::string& config, @@ -4216,8 +4228,8 @@ cmTarget::GetImportLinkInterface(const std::string& config, std::string CONFIG = cmSystemTools::UpperCase(config); cmHeadToLinkInterfaceMap& hm = (usage_requirements_only ? - this->Internal->LinkInterfaceUsageRequirementsOnlyMap[CONFIG] : - this->Internal->LinkInterfaceMap[CONFIG]); + this->GetHeadToLinkInterfaceUsageRequirementsMap(config) : + this->GetHeadToLinkInterfaceMap(config)); // If the link interface does not depend on the head target // then return the one we computed first. diff --git a/Source/cmTarget.h b/Source/cmTarget.h index 563caf8..53a8bd6 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -250,6 +250,11 @@ public: cmTarget const* headTarget, bool usage_requirements_only) const; + cmHeadToLinkInterfaceMap& + GetHeadToLinkInterfaceMap(std::string const& config) const; + cmHeadToLinkInterfaceMap& GetHeadToLinkInterfaceUsageRequirementsMap( + std::string const& config) const; + struct LinkImplementation: public cmLinkImplementationLibraries { // Languages whose runtime libraries must be linked. |