cmLocalGenerator: Don't store imported generator targets

No consumers need them.  This makes GetGeneratorTargets more comparable
to cmMakefile::GetTargets, which does not include imported targets.
This commit is contained in:
Stephen Kelly 2015-10-18 16:33:48 +02:00
parent 726e461b38
commit 400e3d19fc
7 changed files with 4 additions and 34 deletions

View File

@ -969,10 +969,6 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
for (cmGeneratorTargetsType::iterator l = targets.begin(); for (cmGeneratorTargetsType::iterator l = targets.begin();
l != targets.end(); ++l) l != targets.end(); ++l)
{ {
if (l->first->IsImported())
{
continue;
}
std::vector<std::string> includeDirs; std::vector<std::string> includeDirs;
std::string config = mf->GetSafeDefinition("CMAKE_BUILD_TYPE"); std::string config = mf->GetSafeDefinition("CMAKE_BUILD_TYPE");
(*it)->GetIncludeDirectories(includeDirs, l->second, "C", config); (*it)->GetIncludeDirectories(includeDirs, l->second, "C", config);

View File

@ -1595,7 +1595,6 @@ void cmGlobalGenerator::CreateGeneratorTargets(TargetTypes targetTypes,
{ {
cmGeneratorTarget* gt = new cmGeneratorTarget(*j, lg); cmGeneratorTarget* gt = new cmGeneratorTarget(*j, lg);
this->GeneratorTargets[*j] = gt; this->GeneratorTargets[*j] = gt;
generatorTargets[*j] = gt;
} }
lg->SetGeneratorTargets(generatorTargets); lg->SetGeneratorTargets(generatorTargets);
} }

View File

@ -473,10 +473,6 @@ cmGlobalUnixMakefileGenerator3
(type == cmState::OBJECT_LIBRARY) || (type == cmState::OBJECT_LIBRARY) ||
(type == cmState::UTILITY)) (type == cmState::UTILITY))
{ {
if(gtarget->IsImported())
{
continue;
}
// Add this to the list of depends rules in this directory. // Add this to the list of depends rules in this directory.
if((!check_all || !gtarget->GetPropertyAsBool("EXCLUDE_FROM_ALL")) && if((!check_all || !gtarget->GetPropertyAsBool("EXCLUDE_FROM_ALL")) &&
(!check_relink || (!check_relink ||
@ -632,10 +628,6 @@ cmGlobalUnixMakefileGenerator3
t != targets.end(); ++t) t != targets.end(); ++t)
{ {
cmGeneratorTarget* gtarget = t->second; cmGeneratorTarget* gtarget = t->second;
if(gtarget->IsImported())
{
continue;
}
// Don't emit the same rule twice (e.g. two targets with the same // Don't emit the same rule twice (e.g. two targets with the same
// simple name) // simple name)
int type = gtarget->GetType(); int type = gtarget->GetType();
@ -733,10 +725,6 @@ cmGlobalUnixMakefileGenerator3
t != targets.end(); ++t) t != targets.end(); ++t)
{ {
cmGeneratorTarget* gtarget = t->second; cmGeneratorTarget* gtarget = t->second;
if(gtarget->IsImported())
{
continue;
}
int type = gtarget->GetType(); int type = gtarget->GetType();
std::string name = gtarget->GetName(); std::string name = gtarget->GetName();
if (!name.empty() if (!name.empty()

View File

@ -136,8 +136,7 @@ void cmLocalGenerator::TraceDependencies()
for(cmGeneratorTargetsType::iterator t = targets.begin(); for(cmGeneratorTargetsType::iterator t = targets.begin();
t != targets.end(); ++t) t != targets.end(); ++t)
{ {
if (t->second->Target->IsImported() if (t->second->GetType() == cmState::INTERFACE_LIBRARY)
|| t->second->GetType() == cmState::INTERFACE_LIBRARY)
{ {
continue; continue;
} }
@ -476,10 +475,6 @@ void cmLocalGenerator::ComputeTargetManifest()
{ {
continue; continue;
} }
if (target.IsImported())
{
continue;
}
for(std::vector<std::string>::iterator ci = configNames.begin(); for(std::vector<std::string>::iterator ci = configNames.begin();
ci != configNames.end(); ++ci) ci != configNames.end(); ++ci)
{ {

View File

@ -31,8 +31,7 @@ void cmLocalGhsMultiGenerator::Generate()
for (cmGeneratorTargetsType::iterator l = tgts.begin(); l != tgts.end(); for (cmGeneratorTargetsType::iterator l = tgts.begin(); l != tgts.end();
++l) ++l)
{ {
if (l->second->GetType() == cmState::INTERFACE_LIBRARY if (l->second->GetType() == cmState::INTERFACE_LIBRARY)
|| l->second->IsImported())
{ {
continue; continue;
} }

View File

@ -77,8 +77,7 @@ void cmLocalNinjaGenerator::Generate()
for(cmGeneratorTargetsType::iterator t = targets.begin(); for(cmGeneratorTargetsType::iterator t = targets.begin();
t != targets.end(); ++t) t != targets.end(); ++t)
{ {
if (t->second->GetType() == cmState::INTERFACE_LIBRARY if (t->second->GetType() == cmState::INTERFACE_LIBRARY)
|| t->second->Target->IsImported())
{ {
continue; continue;
} }

View File

@ -119,8 +119,7 @@ void cmLocalUnixMakefileGenerator3::Generate()
for(cmGeneratorTargetsType::iterator t = targets.begin(); for(cmGeneratorTargetsType::iterator t = targets.begin();
t != targets.end(); ++t) t != targets.end(); ++t)
{ {
if (t->second->GetType() == cmState::INTERFACE_LIBRARY if (t->second->GetType() == cmState::INTERFACE_LIBRARY)
|| t->second->Target->IsImported())
{ {
continue; continue;
} }
@ -430,11 +429,6 @@ void cmLocalUnixMakefileGenerator3
(t->second->GetType() == cmState::OBJECT_LIBRARY) || (t->second->GetType() == cmState::OBJECT_LIBRARY) ||
(t->second->GetType() == cmState::UTILITY)) (t->second->GetType() == cmState::UTILITY))
{ {
if (t->second->Target->IsImported())
{
continue;
}
emitted.insert(t->second->GetName()); emitted.insert(t->second->GetName());
// for subdirs add a rule to build this specific target by name. // for subdirs add a rule to build this specific target by name.