summaryrefslogtreecommitdiffstats
path: root/Source/cmComputeTargetDepends.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-10-07 23:18:42 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-10-12 16:39:58 (GMT)
commitceb35b63a796235bb76284b3fb4046208365e23f (patch)
treef023761134dfe519e9faa11139b844d141c582bf /Source/cmComputeTargetDepends.cxx
parentbf2d061ad37088be9ea6f135a980d14c4e76064b (diff)
downloadCMake-ceb35b63a796235bb76284b3fb4046208365e23f.zip
CMake-ceb35b63a796235bb76284b3fb4046208365e23f.tar.gz
CMake-ceb35b63a796235bb76284b3fb4046208365e23f.tar.bz2
cmLinkItem: Port to cmGeneratorTarget.
Diffstat (limited to 'Source/cmComputeTargetDepends.cxx')
-rw-r--r--Source/cmComputeTargetDepends.cxx24
1 files changed, 9 insertions, 15 deletions
diff --git a/Source/cmComputeTargetDepends.cxx b/Source/cmComputeTargetDepends.cxx
index e53b7b9..8f3def2 100644
--- a/Source/cmComputeTargetDepends.cxx
+++ b/Source/cmComputeTargetDepends.cxx
@@ -319,22 +319,20 @@ void cmComputeTargetDepends::AddInterfaceDepends(int depender_index,
std::set<std::string> &emitted)
{
cmGeneratorTarget const* depender = this->Targets[depender_index];
- cmTarget const* dependee = dependee_name.Target;
+ cmGeneratorTarget const* dependee = dependee_name.Target;
// Skip targets that will not really be linked. This is probably a
// name conflict between an external library and an executable
// within the project.
if(dependee &&
dependee->GetType() == cmTarget::EXECUTABLE &&
- !dependee->IsExecutableWithExports())
+ !dependee->Target->IsExecutableWithExports())
{
dependee = 0;
}
if(dependee)
{
- cmGeneratorTarget* gt =
- this->GlobalGenerator->GetGeneratorTarget(dependee);
- this->AddInterfaceDepends(depender_index, gt, "", emitted);
+ this->AddInterfaceDepends(depender_index, dependee, "", emitted);
std::vector<std::string> configs;
depender->Makefile->GetConfigurations(configs);
for (std::vector<std::string>::const_iterator it = configs.begin();
@@ -342,7 +340,7 @@ void cmComputeTargetDepends::AddInterfaceDepends(int depender_index,
{
// A target should not depend on itself.
emitted.insert(depender->GetName());
- this->AddInterfaceDepends(depender_index, gt, *it, emitted);
+ this->AddInterfaceDepends(depender_index, dependee, *it, emitted);
}
}
}
@@ -356,7 +354,7 @@ void cmComputeTargetDepends::AddTargetDepend(
cmGeneratorTarget const* depender = this->Targets[depender_index];
// Check the target's makefile first.
- cmTarget const* dependee = dependee_name.Target;
+ cmGeneratorTarget const* dependee = dependee_name.Target;
if(!dependee && !linking &&
(depender->GetType() != cmTarget::GLOBAL_TARGET))
@@ -403,16 +401,14 @@ void cmComputeTargetDepends::AddTargetDepend(
// within the project.
if(linking && dependee &&
dependee->GetType() == cmTarget::EXECUTABLE &&
- !dependee->IsExecutableWithExports())
+ !dependee->Target->IsExecutableWithExports())
{
dependee = 0;
}
if(dependee)
{
- cmGeneratorTarget* gt =
- this->GlobalGenerator->GetGeneratorTarget(dependee);
- this->AddTargetDepend(depender_index, gt, linking);
+ this->AddTargetDepend(depender_index, dependee, linking);
}
}
@@ -430,11 +426,9 @@ void cmComputeTargetDepends::AddTargetDepend(int depender_index,
for(std::set<cmLinkItem>::const_iterator i = utils.begin();
i != utils.end(); ++i)
{
- if(cmTarget const* transitive_dependee = i->Target)
+ if(cmGeneratorTarget const* transitive_dependee = i->Target)
{
- cmGeneratorTarget* gt =
- this->GlobalGenerator->GetGeneratorTarget(transitive_dependee);
- this->AddTargetDepend(depender_index, gt, false);
+ this->AddTargetDepend(depender_index, transitive_dependee, false);
}
}
}