summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-07-10 21:15:39 (GMT)
committerBrad King <brad.king@kitware.com>2014-07-14 14:00:51 (GMT)
commit102eea60cd636e06ab87bc94a4b326682d7464f1 (patch)
treee9fb59b6a46b32a00132c8852c10f75a0247653f /Source
parentb0f57408512b194923b6c9e5e79a08bc324c552e (diff)
downloadCMake-102eea60cd636e06ab87bc94a4b326682d7464f1.zip
CMake-102eea60cd636e06ab87bc94a4b326682d7464f1.tar.gz
CMake-102eea60cd636e06ab87bc94a4b326682d7464f1.tar.bz2
cmTarget: Simplify internal ComputeLinkInterfaceLibraries method
Now that the method can see the full OptionalLinkInterface structure, store information there instead of passing it through arguments.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmTarget.cxx44
1 files changed, 18 insertions, 26 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 663b15e..826a44b 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -122,14 +122,12 @@ public:
void ComputeLinkInterface(cmTarget const* thisTarget,
const std::string& config,
OptionalLinkInterface& iface,
- cmTarget const* head,
- const char *explicitLibraries) const;
- const char* ComputeLinkInterfaceLibraries(cmTarget const* thisTarget,
- const std::string& config,
- OptionalLinkInterface& iface,
- cmTarget const* head,
- bool usage_requirements_only,
- bool &exists);
+ cmTarget const* head) const;
+ void ComputeLinkInterfaceLibraries(cmTarget const* thisTarget,
+ const std::string& config,
+ OptionalLinkInterface& iface,
+ cmTarget const* head,
+ bool usage_requirements_only);
typedef std::map<TargetConfigPair, OptionalLinkInterface>
LinkInterfaceMapType;
@@ -5908,17 +5906,15 @@ cmTarget::LinkInterface const* cmTarget::GetLinkInterface(
if(!iface.LibrariesDone)
{
iface.LibrariesDone = true;
- iface.ExplicitLibraries =
- this->Internal->ComputeLinkInterfaceLibraries(
- this, config, iface, head, false, iface.Exists);
+ this->Internal->ComputeLinkInterfaceLibraries(
+ this, config, iface, head, false);
}
if(!iface.AllDone)
{
iface.AllDone = true;
if(iface.Exists)
{
- this->Internal->ComputeLinkInterface(this, config, iface,
- head, iface.ExplicitLibraries);
+ this->Internal->ComputeLinkInterface(this, config, iface, head);
}
}
@@ -5956,9 +5952,8 @@ cmTarget::GetLinkInterfaceLibraries(const std::string& config,
if(!iface.LibrariesDone)
{
iface.LibrariesDone = true;
- iface.ExplicitLibraries =
- this->Internal->ComputeLinkInterfaceLibraries(
- this, config, iface, head, usage_requirements_only, iface.Exists);
+ this->Internal->ComputeLinkInterfaceLibraries(
+ this, config, iface, head, usage_requirements_only);
}
return iface.Exists? &iface : 0;
@@ -6081,14 +6076,13 @@ void cmTarget::GetTransitivePropertyTargets(const std::string& config,
}
//----------------------------------------------------------------------------
-const char*
+void
cmTargetInternals::ComputeLinkInterfaceLibraries(
cmTarget const* thisTarget,
const std::string& config,
OptionalLinkInterface& iface,
cmTarget const* headTarget,
- bool usage_requirements_only,
- bool &exists)
+ bool usage_requirements_only)
{
// Construct the property name suffix for this configuration.
std::string suffix = "_";
@@ -6165,10 +6159,10 @@ cmTargetInternals::ComputeLinkInterfaceLibraries(
(thisTarget->GetType() == cmTarget::EXECUTABLE ||
(thisTarget->GetType() == cmTarget::MODULE_LIBRARY)))
{
- exists = false;
- return 0;
+ return;
}
- exists = true;
+ iface.Exists = true;
+ iface.ExplicitLibraries = explicitLibraries;
if(explicitLibraries)
{
@@ -6247,17 +6241,15 @@ cmTargetInternals::ComputeLinkInterfaceLibraries(
}
}
}
- return explicitLibraries;
}
//----------------------------------------------------------------------------
void cmTargetInternals::ComputeLinkInterface(cmTarget const* thisTarget,
const std::string& config,
OptionalLinkInterface& iface,
- cmTarget const* headTarget,
- const char* explicitLibraries) const
+ cmTarget const* headTarget) const
{
- if(explicitLibraries)
+ if(iface.ExplicitLibraries)
{
if(thisTarget->GetType() == cmTarget::SHARED_LIBRARY
|| thisTarget->GetType() == cmTarget::STATIC_LIBRARY