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();
l != targets.end(); ++l)
{
if (l->first->IsImported())
{
continue;
}
std::vector<std::string> includeDirs;
std::string config = mf->GetSafeDefinition("CMAKE_BUILD_TYPE");
(*it)->GetIncludeDirectories(includeDirs, l->second, "C", config);

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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