Commit 67b2f431 authored by Stephen Kelly's avatar Stephen Kelly
Browse files

Port to GetGeneratorTargets.

parent f528e6bc
......@@ -175,13 +175,12 @@ void cmComputeTargetDepends::CollectTargets()
this->GlobalGenerator->GetLocalGenerators();
for(unsigned int i = 0; i < lgens.size(); ++i)
{
const cmTargets& targets = lgens[i]->GetMakefile()->GetTargets();
for(cmTargets::const_iterator ti = targets.begin();
const std::vector<cmGeneratorTarget*> targets =
lgens[i]->GetGeneratorTargets();
for(std::vector<cmGeneratorTarget*>::const_iterator ti = targets.begin();
ti != targets.end(); ++ti)
{
cmTarget const* target = &ti->second;
cmGeneratorTarget* gt =
this->GlobalGenerator->GetGeneratorTarget(target);
cmGeneratorTarget* gt = *ti;
int index = static_cast<int>(this->Targets.size());
this->TargetIndex[gt] = index;
this->Targets.push_back(gt);
......
......@@ -319,12 +319,12 @@ void cmExtraCodeBlocksGenerator
for (std::vector<cmLocalGenerator*>::const_iterator lg=lgs.begin();
lg!=lgs.end(); lg++)
{
cmMakefile* makefile=(*lg)->GetMakefile();
cmTargets& targets=makefile->GetTargets();
for (cmTargets::iterator ti = targets.begin();
std::vector<cmGeneratorTarget*> targets=(*lg)->GetGeneratorTargets();
for (std::vector<cmGeneratorTarget*>::iterator ti = targets.begin();
ti != targets.end(); ti++)
{
switch(ti->second.GetType())
std::string targetName = (*ti)->GetName();
switch((*ti)->GetType())
{
case cmState::GLOBAL_TARGET:
{
......@@ -333,7 +333,7 @@ void cmExtraCodeBlocksGenerator
if (strcmp((*lg)->GetCurrentBinaryDirectory(),
(*lg)->GetBinaryDirectory())==0)
{
this->AppendTarget(fout, ti->first, 0,
this->AppendTarget(fout, targetName, 0,
make.c_str(), *lg, compiler.c_str());
}
}
......@@ -341,15 +341,16 @@ void cmExtraCodeBlocksGenerator
case cmState::UTILITY:
// Add all utility targets, except the Nightly/Continuous/
// Experimental-"sub"targets as e.g. NightlyStart
if (((ti->first.find("Nightly")==0) &&(ti->first!="Nightly"))
|| ((ti->first.find("Continuous")==0)&&(ti->first!="Continuous"))
|| ((ti->first.find("Experimental")==0)
&& (ti->first!="Experimental")))
if (((targetName.find("Nightly")==0) &&(targetName!="Nightly"))
|| ((targetName.find("Continuous")==0)
&&(targetName!="Continuous"))
|| ((targetName.find("Experimental")==0)
&& (targetName!="Experimental")))
{
break;
}
this->AppendTarget(fout, ti->first, 0,
this->AppendTarget(fout, targetName, 0,
make.c_str(), *lg, compiler.c_str());
break;
case cmState::EXECUTABLE:
......@@ -358,11 +359,10 @@ void cmExtraCodeBlocksGenerator
case cmState::MODULE_LIBRARY:
case cmState::OBJECT_LIBRARY:
{
cmGeneratorTarget* gt =
this->GlobalGenerator->GetGeneratorTarget(&ti->second);
this->AppendTarget(fout, ti->first, gt,
cmGeneratorTarget* gt = *ti;
this->AppendTarget(fout, targetName, gt,
make.c_str(), *lg, compiler.c_str());
std::string fastTarget = ti->first;
std::string fastTarget = targetName;
fastTarget += "/fast";
this->AppendTarget(fout, fastTarget, gt,
make.c_str(), *lg, compiler.c_str());
......@@ -388,11 +388,11 @@ void cmExtraCodeBlocksGenerator
lg!=lgs.end(); lg++)
{
cmMakefile* makefile=(*lg)->GetMakefile();
cmTargets& targets=makefile->GetTargets();
for (cmTargets::iterator ti = targets.begin();
std::vector<cmGeneratorTarget*> targets=(*lg)->GetGeneratorTargets();
for (std::vector<cmGeneratorTarget*>::iterator ti = targets.begin();
ti != targets.end(); ti++)
{
switch(ti->second.GetType())
switch((*ti)->GetType())
{
case cmState::EXECUTABLE:
case cmState::STATIC_LIBRARY:
......@@ -402,8 +402,7 @@ void cmExtraCodeBlocksGenerator
case cmState::UTILITY: // can have sources since 2.6.3
{
std::vector<cmSourceFile*> sources;
cmGeneratorTarget* gt =
this->GlobalGenerator->GetGeneratorTarget(&ti->second);
cmGeneratorTarget* gt = *ti;
gt->GetSourceFiles(sources,
makefile->GetSafeDefinition("CMAKE_BUILD_TYPE"));
for (std::vector<cmSourceFile*>::const_iterator si=sources.begin();
......@@ -442,7 +441,7 @@ void cmExtraCodeBlocksGenerator
}
CbpUnit &cbpUnit = allFiles[fullPath];
cbpUnit.Targets.push_back(&(ti->second));
cbpUnit.Targets.push_back((*ti)->Target);
}
}
default: // intended fallthrough
......
......@@ -155,12 +155,12 @@ void cmExtraCodeLiteGenerator
lg!=lgs.end(); lg++)
{
cmMakefile* makefile=(*lg)->GetMakefile();
cmTargets& targets=makefile->GetTargets();
for (cmTargets::iterator ti = targets.begin();
std::vector<cmGeneratorTarget*> targets=(*lg)->GetGeneratorTargets();
for (std::vector<cmGeneratorTarget*>::iterator ti = targets.begin();
ti != targets.end(); ti++)
{
switch(ti->second.GetType())
switch((*ti)->GetType())
{
case cmState::EXECUTABLE:
{
......@@ -186,7 +186,7 @@ void cmExtraCodeLiteGenerator
break;
}
switch(ti->second.GetType())
switch((*ti)->GetType())
{
case cmState::EXECUTABLE:
case cmState::STATIC_LIBRARY:
......@@ -194,8 +194,7 @@ void cmExtraCodeLiteGenerator
case cmState::MODULE_LIBRARY:
{
std::vector<cmSourceFile*> sources;
cmGeneratorTarget* gt =
this->GlobalGenerator->GetGeneratorTarget(&ti->second);
cmGeneratorTarget* gt = *ti;
gt->GetSourceFiles(sources,
makefile->GetSafeDefinition("CMAKE_BUILD_TYPE"));
for (std::vector<cmSourceFile*>::const_iterator si=sources.begin();
......
......@@ -536,13 +536,15 @@ void cmExtraEclipseCDT4Generator::CreateLinksForTargets(
++lgIt)
{
cmMakefile* makefile = (*lgIt)->GetMakefile();
const cmTargets& targets = makefile->GetTargets();
const std::vector<cmGeneratorTarget*> targets =
(*lgIt)->GetGeneratorTargets();
for(cmTargets::const_iterator ti=targets.begin(); ti!=targets.end();++ti)
for(std::vector<cmGeneratorTarget*>::const_iterator ti=targets.begin();
ti!=targets.end();++ti)
{
std::string linkName2 = linkName;
linkName2 += "/";
switch(ti->second.GetType())
switch((*ti)->GetType())
{
case cmState::EXECUTABLE:
case cmState::STATIC_LIBRARY:
......@@ -550,10 +552,10 @@ void cmExtraEclipseCDT4Generator::CreateLinksForTargets(
case cmState::MODULE_LIBRARY:
case cmState::OBJECT_LIBRARY:
{
const char* prefix = (ti->second.GetType()==cmState::EXECUTABLE ?
const char* prefix = ((*ti)->GetType()==cmState::EXECUTABLE ?
"[exe] " : "[lib] ");
linkName2 += prefix;
linkName2 += ti->first;
linkName2 += (*ti)->GetName();
this->AppendLinkedResource(fout, linkName2, "virtual:/virtual",
VirtualFolder);
if (!this->GenerateLinkedResources)
......@@ -562,10 +564,8 @@ void cmExtraEclipseCDT4Generator::CreateLinksForTargets(
}
std::vector<cmSourceGroup> sourceGroups=makefile->GetSourceGroups();
// get the files from the source lists then add them to the groups
cmTarget* tgt = const_cast<cmTarget*>(&ti->second);
cmGeneratorTarget* gt = const_cast<cmGeneratorTarget*>(*ti);
std::vector<cmSourceFile*> files;
cmGeneratorTarget* gt =
this->GlobalGenerator->GetGeneratorTarget(tgt);
gt->GetSourceFiles(files,
makefile->GetSafeDefinition("CMAKE_BUILD_TYPE"));
for(std::vector<cmSourceFile*>::const_iterator sfIt = files.begin();
......@@ -1030,7 +1030,8 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
it != this->GlobalGenerator->GetLocalGenerators().end();
++it)
{
const cmTargets& targets = (*it)->GetMakefile()->GetTargets();
const std::vector<cmGeneratorTarget*> targets =
(*it)->GetGeneratorTargets();
std::string subdir = (*it)->Convert((*it)->GetCurrentBinaryDirectory(),
cmLocalGenerator::HOME_OUTPUT);
if (subdir == ".")
......@@ -1038,9 +1039,11 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
subdir = "";
}
for(cmTargets::const_iterator ti=targets.begin(); ti!=targets.end(); ++ti)
for(std::vector<cmGeneratorTarget*>::const_iterator ti =
targets.begin(); ti!=targets.end(); ++ti)
{
switch(ti->second.GetType())
std::string targetName = (*ti)->GetName();
switch((*ti)->GetType())
{
case cmState::GLOBAL_TARGET:
{
......@@ -1048,22 +1051,22 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
// not from the subdirs
if (subdir.empty())
{
this->AppendTarget(fout, ti->first, make, makeArgs, subdir, ": ");
this->AppendTarget(fout, targetName, make, makeArgs, subdir, ": ");
}
}
break;
case cmState::UTILITY:
// Add all utility targets, except the Nightly/Continuous/
// Experimental-"sub"targets as e.g. NightlyStart
if (((ti->first.find("Nightly")==0) &&(ti->first!="Nightly"))
|| ((ti->first.find("Continuous")==0)&&(ti->first!="Continuous"))
|| ((ti->first.find("Experimental")==0)
&& (ti->first!="Experimental")))
if (((targetName.find("Nightly")==0) &&(targetName!="Nightly"))
|| ((targetName.find("Continuous")==0)&&(targetName!="Continuous"))
|| ((targetName.find("Experimental")==0)
&& (targetName!="Experimental")))
{
break;
}
this->AppendTarget(fout, ti->first, make, makeArgs, subdir, ": ");
this->AppendTarget(fout, targetName, make, makeArgs, subdir, ": ");
break;
case cmState::EXECUTABLE:
case cmState::STATIC_LIBRARY:
......@@ -1071,10 +1074,10 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
case cmState::MODULE_LIBRARY:
case cmState::OBJECT_LIBRARY:
{
const char* prefix = (ti->second.GetType()==cmState::EXECUTABLE ?
const char* prefix = ((*ti)->GetType()==cmState::EXECUTABLE ?
"[exe] " : "[lib] ");
this->AppendTarget(fout, ti->first, make, makeArgs, subdir, prefix);
std::string fastTarget = ti->first;
this->AppendTarget(fout, targetName, make, makeArgs, subdir, prefix);
std::string fastTarget = targetName;
fastTarget += "/fast";
this->AppendTarget(fout, fastTarget, make, makeArgs, subdir, prefix);
......@@ -1083,21 +1086,20 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
{
std::string virtDir = "[Targets]/";
virtDir += prefix;
virtDir += ti->first;
virtDir += targetName;
std::string buildArgs = "-C \"";
buildArgs += (*it)->GetBinaryDirectory();
buildArgs += "\" ";
buildArgs += makeArgs;
this->AppendTarget(fout, "Build", make, buildArgs, virtDir, "",
ti->first.c_str());
targetName.c_str());
std::string cleanArgs = "-E chdir \"";
cleanArgs += (*it)->GetCurrentBinaryDirectory();
cleanArgs += "\" \"";
cleanArgs += cmSystemTools::GetCMakeCommand();
cleanArgs += "\" -P \"";
cmGeneratorTarget* gt =
this->GlobalGenerator->GetGeneratorTarget(&ti->second);
cmGeneratorTarget* gt = *ti;
cleanArgs += (*it)->GetTargetDirectory(gt);
cleanArgs += "/cmake_clean.cmake\"";
this->AppendTarget(fout, "Clean", cmSystemTools::GetCMakeCommand(),
......
......@@ -119,14 +119,16 @@ cmExtraKateGenerator::WriteTargets(const cmLocalGenerator* lg,
it != this->GlobalGenerator->GetLocalGenerators().end();
++it)
{
const cmTargets& targets = (*it)->GetMakefile()->GetTargets();
cmMakefile* makefile=(*it)->GetMakefile();
const std::vector<cmGeneratorTarget*> targets =
(*it)->GetGeneratorTargets();
std::string currentDir = (*it)->GetCurrentBinaryDirectory();
bool topLevel = (currentDir == (*it)->GetBinaryDirectory());
for(cmTargets::const_iterator ti=targets.begin(); ti!=targets.end(); ++ti)
for(std::vector<cmGeneratorTarget*>::const_iterator ti =
targets.begin(); ti!=targets.end(); ++ti)
{
switch(ti->second.GetType())
std::string targetName = (*ti)->GetName();
switch((*ti)->GetType())
{
case cmState::GLOBAL_TARGET:
{
......@@ -138,9 +140,9 @@ cmExtraKateGenerator::WriteTargets(const cmLocalGenerator* lg,
insertTarget = true;
// only add the "edit_cache" target if it's not ccmake, because
// this will not work within the IDE
if (ti->first == "edit_cache")
if (targetName == "edit_cache")
{
const char* editCommand = makefile->GetDefinition
const char* editCommand = (*it)->GetMakefile()->GetDefinition
("CMAKE_EDIT_COMMAND");
if (editCommand == 0)
{
......@@ -154,7 +156,7 @@ cmExtraKateGenerator::WriteTargets(const cmLocalGenerator* lg,
}
if (insertTarget)
{
this->AppendTarget(fout, ti->first, make, makeArgs,
this->AppendTarget(fout, targetName, make, makeArgs,
currentDir, homeOutputDir);
}
}
......@@ -162,15 +164,16 @@ cmExtraKateGenerator::WriteTargets(const cmLocalGenerator* lg,
case cmState::UTILITY:
// Add all utility targets, except the Nightly/Continuous/
// Experimental-"sub"targets as e.g. NightlyStart
if (((ti->first.find("Nightly")==0) &&(ti->first!="Nightly"))
|| ((ti->first.find("Continuous")==0)&&(ti->first!="Continuous"))
|| ((ti->first.find("Experimental")==0)
&& (ti->first!="Experimental")))
if (((targetName.find("Nightly")==0) &&(targetName!="Nightly"))
|| ((targetName.find("Continuous")==0)
&&(targetName!="Continuous"))
|| ((targetName.find("Experimental")==0)
&& (targetName!="Experimental")))
{
break;
}
this->AppendTarget(fout, ti->first, make, makeArgs,
this->AppendTarget(fout, targetName, make, makeArgs,
currentDir, homeOutputDir);
break;
case cmState::EXECUTABLE:
......@@ -179,9 +182,9 @@ cmExtraKateGenerator::WriteTargets(const cmLocalGenerator* lg,
case cmState::MODULE_LIBRARY:
case cmState::OBJECT_LIBRARY:
{
this->AppendTarget(fout, ti->first, make, makeArgs,
this->AppendTarget(fout, targetName, make, makeArgs,
currentDir, homeOutputDir);
std::string fastTarget = ti->first;
std::string fastTarget = targetName;
fastTarget += "/fast";
this->AppendTarget(fout, fastTarget, make, makeArgs,
currentDir, homeOutputDir);
......
......@@ -162,11 +162,12 @@ void cmExtraSublimeTextGenerator::
lg!=lgs.end(); lg++)
{
cmMakefile* makefile=(*lg)->GetMakefile();
cmTargets& targets=makefile->GetTargets();
for (cmTargets::iterator ti = targets.begin();
std::vector<cmGeneratorTarget*> targets=(*lg)->GetGeneratorTargets();
for (std::vector<cmGeneratorTarget*>::iterator ti = targets.begin();
ti != targets.end(); ti++)
{
switch(ti->second.GetType())
std::string targetName = (*ti)->GetName();
switch((*ti)->GetType())
{
case cmState::GLOBAL_TARGET:
{
......@@ -175,7 +176,7 @@ void cmExtraSublimeTextGenerator::
if (strcmp((*lg)->GetCurrentBinaryDirectory(),
(*lg)->GetBinaryDirectory())==0)
{
this->AppendTarget(fout, ti->first, *lg, 0,
this->AppendTarget(fout, targetName, *lg, 0,
make.c_str(), makefile, compiler.c_str(),
sourceFileFlags, false);
}
......@@ -184,15 +185,16 @@ void cmExtraSublimeTextGenerator::
case cmState::UTILITY:
// Add all utility targets, except the Nightly/Continuous/
// Experimental-"sub"targets as e.g. NightlyStart
if (((ti->first.find("Nightly")==0) &&(ti->first!="Nightly"))
|| ((ti->first.find("Continuous")==0)&&(ti->first!="Continuous"))
|| ((ti->first.find("Experimental")==0)
&& (ti->first!="Experimental")))
if (((targetName.find("Nightly")==0) &&(targetName!="Nightly"))
|| ((targetName.find("Continuous")==0)
&&(targetName!="Continuous"))
|| ((targetName.find("Experimental")==0)
&& (targetName!="Experimental")))
{
break;
}
this->AppendTarget(fout, ti->first, *lg, 0,
this->AppendTarget(fout, targetName, *lg, 0,
make.c_str(), makefile, compiler.c_str(),
sourceFileFlags, false);
break;
......@@ -202,12 +204,12 @@ void cmExtraSublimeTextGenerator::
case cmState::MODULE_LIBRARY:
case cmState::OBJECT_LIBRARY:
{
this->AppendTarget(fout, ti->first, *lg, &ti->second,
this->AppendTarget(fout, targetName, *lg, (*ti)->Target,
make.c_str(), makefile, compiler.c_str(),
sourceFileFlags, false);
std::string fastTarget = ti->first;
std::string fastTarget = targetName;
fastTarget += "/fast";
this->AppendTarget(fout, fastTarget, *lg, &ti->second,
this->AppendTarget(fout, fastTarget, *lg, (*ti)->Target,
make.c_str(), makefile, compiler.c_str(),
sourceFileFlags, false);
}
......
......@@ -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);
}
}
}
......
......@@ -133,14 +133,13 @@ bool cmGlobalKdevelopGenerator
}
//get all sources
cmTargets& targets=makefile->GetTargets();
for (cmTargets::iterator ti = targets.begin();
std::vector<cmGeneratorTarget*> targets=(*it)->GetGeneratorTargets();
for (std::vector<cmGeneratorTarget*>::iterator ti = targets.begin();
ti != targets.end(); ti++)
{
std::vector<cmSourceFile*> sources;
cmGeneratorTarget* gt =
this->GlobalGenerator->GetGeneratorTarget(&ti->second);
gt->GetSourceFiles(sources, ti->second.GetMakefile()
cmGeneratorTarget* gt = *ti;
gt->GetSourceFiles(sources, gt->Target->GetMakefile()
->GetSafeDefinition("CMAKE_BUILD_TYPE"));
for (std::vector<cmSourceFile*>::const_iterator si=sources.begin();
si!=sources.end(); si++)
......
......@@ -423,17 +423,18 @@ void cmGlobalUnixMakefileGenerator3
{
lg = static_cast<cmLocalUnixMakefileGenerator3 *>(lGenerators[i]);
// for all of out targets
for (cmTargets::iterator l = lg->GetMakefile()->GetTargets().begin();
l != lg->GetMakefile()->GetTargets().end(); l++)
std::vector<cmGeneratorTarget*> tgts = lg->GetGeneratorTargets();
for (std::vector<cmGeneratorTarget*>::iterator l = tgts.begin();
l != tgts.end(); l++)
{
if((l->second.GetType() == cmState::EXECUTABLE) ||
(l->second.GetType() == cmState::STATIC_LIBRARY) ||
(l->second.GetType() == cmState::SHARED_LIBRARY) ||
(l->second.GetType() == cmState::MODULE_LIBRARY) ||
(l->second.GetType() == cmState::OBJECT_LIBRARY) ||
(l->second.GetType() == cmState::UTILITY))
if(((*l)->GetType() == cmState::EXECUTABLE) ||
((*l)->GetType() == cmState::STATIC_LIBRARY) ||
((*l)->GetType() == cmState::SHARED_LIBRARY) ||
((*l)->GetType() == cmState::MODULE_LIBRARY) ||
((*l)->GetType() == cmState::OBJECT_LIBRARY) ||
((*l)->GetType() == cmState::UTILITY))
{
cmGeneratorTarget* gt = this->GetGeneratorTarget(&l->second);
cmGeneratorTarget* gt = *l;
std::string tname = lg->GetRelativeTargetDirectory(gt);
tname += "/DependInfo.cmake";
cmSystemTools::ConvertToUnixSlashes(tname);
......@@ -914,13 +915,11 @@ void cmGlobalUnixMakefileGenerator3::InitializeProgressMarks()
lgi != this->LocalGenerators.end(); ++lgi)
{
cmLocalGenerator* lg = *lgi;
cmMakefile* mf = lg->GetMakefile();
cmTargets const& targets = mf->GetTargets();
for(cmTargets::const_iterator t = targets.begin(); t != targets.end(); ++t)
std::vector<cmGeneratorTarget*> targets = lg->GetGeneratorTargets();
for(std::vector<cmGeneratorTarget*>::const_iterator t = targets.begin();
t != targets.end(); ++t)
{
cmTarget const& target = t->second;
cmGeneratorTarget* gt = this->GetGeneratorTarget(&target);
cmGeneratorTarget* gt = *t;