summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-10-18 15:06:14 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-10-24 07:19:53 (GMT)
commit67b2f4312c431eb363dd94a2bb5d88cc6c8a7c95 (patch)
tree11419dddadbd492b9baef008e3e70eff5ae3e402 /Source/cmGlobalGenerator.cxx
parentf528e6bcb9b2e181dcd7ee0c1cc327b6cad84ad5 (diff)
downloadCMake-67b2f4312c431eb363dd94a2bb5d88cc6c8a7c95.zip
CMake-67b2f4312c431eb363dd94a2bb5d88cc6c8a7c95.tar.gz
CMake-67b2f4312c431eb363dd94a2bb5d88cc6c8a7c95.tar.bz2
Port to GetGeneratorTargets.
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx47
1 files changed, 23 insertions, 24 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 13efc4c..d26cc34 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1468,34 +1468,34 @@ cmGlobalGenerator::CreateQtAutoGeneratorsTargets()
#ifdef CMAKE_BUILD_WITH_CMAKE
for(unsigned int i=0; i < this->LocalGenerators.size(); ++i)
{
- cmTargets& targets =
- this->LocalGenerators[i]->GetMakefile()->GetTargets();
+ std::vector<cmGeneratorTarget*> targets =
+ this->LocalGenerators[i]->GetGeneratorTargets();
std::vector<cmGeneratorTarget*> filteredTargets;
filteredTargets.reserve(targets.size());
- for(cmTargets::iterator ti = targets.begin();
+ for(std::vector<cmGeneratorTarget*>::iterator ti = targets.begin();
ti != targets.end(); ++ti)
{
- if (ti->second.GetType() == cmState::GLOBAL_TARGET)
+ if ((*ti)->GetType() == cmState::GLOBAL_TARGET)
{
continue;
}
- if(ti->second.GetType() != cmState::EXECUTABLE &&
- ti->second.GetType() != cmState::STATIC_LIBRARY &&
- ti->second.GetType() != cmState::SHARED_LIBRARY &&
- ti->second.GetType() != cmState::MODULE_LIBRARY &&
- ti->second.GetType() != cmState::OBJECT_LIBRARY)
+ if((*ti)->GetType() != cmState::EXECUTABLE &&
+ (*ti)->GetType() != cmState::STATIC_LIBRARY &&
+ (*ti)->GetType() != cmState::SHARED_LIBRARY &&
+ (*ti)->GetType() != cmState::MODULE_LIBRARY &&
+ (*ti)->GetType() != cmState::OBJECT_LIBRARY)
{
continue;
}
- if((!ti->second.GetPropertyAsBool("AUTOMOC")
- && !ti->second.GetPropertyAsBool("AUTOUIC")
- && !ti->second.GetPropertyAsBool("AUTORCC"))
- || ti->second.IsImported())
+ if((!(*ti)->GetPropertyAsBool("AUTOMOC")
+ && !(*ti)->GetPropertyAsBool("AUTOUIC")
+ && !(*ti)->GetPropertyAsBool("AUTORCC"))
+ || (*ti)->IsImported())
{
continue;
}
// don't do anything if there is no Qt4 or Qt5Core (which contains moc):
- cmMakefile* mf = ti->second.GetMakefile();
+ cmMakefile* mf = (*ti)->Target->GetMakefile();
std::string qtMajorVersion = mf->GetSafeDefinition("QT_VERSION_MAJOR");
if (qtMajorVersion == "")
{
@@ -1506,7 +1506,7 @@ cmGlobalGenerator::CreateQtAutoGeneratorsTargets()
continue;
}
- cmGeneratorTarget* gt = this->GetGeneratorTarget(&ti->second);
+ cmGeneratorTarget* gt = *ti;
cmQtAutoGeneratorInitializer::InitializeAutogenSources(gt);
filteredTargets.push_back(gt);
@@ -2706,23 +2706,22 @@ void cmGlobalGenerator::GetTargetSets(TargetDependSet& projectTargets,
{
continue;
}
- cmMakefile* mf = (*i)->GetMakefile();
// Get the targets in the makefile
- cmTargets &tgts = mf->GetTargets();
+ std::vector<cmGeneratorTarget*> tgts = (*i)->GetGeneratorTargets();
// loop over all the targets
- for (cmTargets::iterator l = tgts.begin(); l != tgts.end(); ++l)
+ for (std::vector<cmGeneratorTarget*>::iterator l = tgts.begin();
+ l != tgts.end(); ++l)
{
- cmTarget* target = &l->second;
- cmGeneratorTarget* gt = this->GetGeneratorTarget(target);
- if(this->IsRootOnlyTarget(gt) &&
- target->GetMakefile() != root->GetMakefile())
+ cmGeneratorTarget* target = *l;
+ if(this->IsRootOnlyTarget(target) &&
+ target->GetLocalGenerator() != root)
{
continue;
}
// put the target in the set of original targets
- originalTargets.insert(gt);
+ originalTargets.insert(target);
// Get the set of targets that depend on target
- this->AddTargetDepends(gt, projectTargets);
+ this->AddTargetDepends(target, projectTargets);
}
}
}