summaryrefslogtreecommitdiff
path: root/Source/cmGlobalVisualStudioGenerator.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-06-06 13:08:17 +0200
committerStephen Kelly <steveire@gmail.com>2015-07-01 19:46:19 +0200
commitfaec4e611d08ea2f75d2127e3ca3f5e9a427465b (patch)
treeab775b2bf9a9a4517204b700e4add7e41ca726c3 /Source/cmGlobalVisualStudioGenerator.cxx
parent7e3ac12df45fa42b590971accaf1db89b1a0ffb6 (diff)
downloadcmake-faec4e611d08ea2f75d2127e3ca3f5e9a427465b.tar.gz
cmComputeTargetDepends: Change API to use cmGeneratorTarget.
Diffstat (limited to 'Source/cmGlobalVisualStudioGenerator.cxx')
-rw-r--r--Source/cmGlobalVisualStudioGenerator.cxx27
1 files changed, 18 insertions, 9 deletions
diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx
index 585d19a816..438d60eca9 100644
--- a/Source/cmGlobalVisualStudioGenerator.cxx
+++ b/Source/cmGlobalVisualStudioGenerator.cxx
@@ -299,13 +299,14 @@ void cmGlobalVisualStudioGenerator::FillLinkClosure(cmTarget const* target,
{
if(linked.insert(target).second)
{
- TargetDependSet const& depends = this->GetTargetDirectDepends(*target);
+ cmGeneratorTarget* gt = this->GetGeneratorTarget(target);
+ TargetDependSet const& depends = this->GetTargetDirectDepends(gt);
for(TargetDependSet::const_iterator di = depends.begin();
di != depends.end(); ++di)
{
if(di->IsLink())
{
- this->FillLinkClosure(*di, linked);
+ this->FillLinkClosure((*di)->Target, linked);
}
}
}
@@ -338,13 +339,14 @@ void cmGlobalVisualStudioGenerator::FollowLinkDepends(
{
// Static library targets do not list their link dependencies so
// we must follow them transitively now.
- TargetDependSet const& depends = this->GetTargetDirectDepends(*target);
+ cmGeneratorTarget* gt = this->GetGeneratorTarget(target);
+ TargetDependSet const& depends = this->GetTargetDirectDepends(gt);
for(TargetDependSet::const_iterator di = depends.begin();
di != depends.end(); ++di)
{
if(di->IsLink())
{
- this->FollowLinkDepends(*di, linked);
+ this->FollowLinkDepends((*di)->Target, linked);
}
}
}
@@ -413,7 +415,8 @@ void cmGlobalVisualStudioGenerator::ComputeVSTargetDepends(cmTarget& target)
target.GetType() != cmTarget::MODULE_LIBRARY &&
target.GetType() != cmTarget::EXECUTABLE);
- TargetDependSet const& depends = this->GetTargetDirectDepends(target);
+ cmGeneratorTarget* gt = this->GetGeneratorTarget(&target);
+ TargetDependSet const& depends = this->GetTargetDirectDepends(gt);
// Collect implicit link dependencies (target_link_libraries).
// Static libraries cannot depend on their link implementation
@@ -427,7 +430,7 @@ void cmGlobalVisualStudioGenerator::ComputeVSTargetDepends(cmTarget& target)
cmTargetDepend dep = *di;
if(dep.IsLink())
{
- this->FollowLinkDepends(dep, linkDepends);
+ this->FollowLinkDepends(dep->Target, linkDepends);
}
}
}
@@ -440,7 +443,7 @@ void cmGlobalVisualStudioGenerator::ComputeVSTargetDepends(cmTarget& target)
cmTargetDepend dep = *di;
if(dep.IsUtil())
{
- this->FollowLinkDepends(dep, utilDepends);
+ this->FollowLinkDepends(dep->Target, utilDepends);
}
}
@@ -843,7 +846,7 @@ cmGlobalVisualStudioGenerator::TargetIsFortranOnly(cmTarget const& target)
//----------------------------------------------------------------------------
bool
cmGlobalVisualStudioGenerator::TargetCompare
-::operator()(cmTarget const* l, cmTarget const* r) const
+::operator()(cmGeneratorTarget const* l, cmGeneratorTarget const* r) const
{
// Make sure ALL_BUILD is first so it is the default active project.
if(r->GetName() == "ALL_BUILD")
@@ -868,7 +871,13 @@ cmGlobalVisualStudioGenerator::OrderedTargetDependSet
cmGlobalVisualStudioGenerator::OrderedTargetDependSet
::OrderedTargetDependSet(TargetSet const& targets)
{
- this->insert(targets.begin(), targets.end());
+ for (TargetSet::const_iterator it = targets.begin();
+ it != targets.end(); ++it)
+ {
+ cmGeneratorTarget* gt =
+ (*it)->GetMakefile()->GetGlobalGenerator()->GetGeneratorTarget(*it);
+ this->insert(gt);
+ }
}
std::string cmGlobalVisualStudioGenerator::ExpandCFGIntDir(