Ver código fonte

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.
Stephen Kelly 10 anos atrás
pai
commit
400e3d19fc

+ 0 - 4
Source/cmExtraEclipseCDT4Generator.cxx

@@ -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);

+ 0 - 1
Source/cmGlobalGenerator.cxx

@@ -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);
 }

+ 0 - 12
Source/cmGlobalUnixMakefileGenerator3.cxx

@@ -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()

+ 1 - 6
Source/cmLocalGenerator.cxx

@@ -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)
       {

+ 1 - 2
Source/cmLocalGhsMultiGenerator.cxx

@@ -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;
       }

+ 1 - 2
Source/cmLocalNinjaGenerator.cxx

@@ -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;
       }

+ 1 - 7
Source/cmLocalUnixMakefileGenerator3.cxx

@@ -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.