[Cmake-commits] CMake branch, next, updated. v2.8.12.1-5603-ge3977d6

Stephen Kelly steveire at gmail.com
Thu Nov 21 07:21:33 EST 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  e3977d611d579a61e8fa160aad858d3b026cda40 (commit)
       via  70112e0ca5f68214aaff8faec4f946221e7549b4 (commit)
       via  2283d658eb58f901aae9e72d497920dfc9b6746a (commit)
      from  74320d65636960fc6d6ab4796679d441f0520958 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e3977d611d579a61e8fa160aad858d3b026cda40
commit e3977d611d579a61e8fa160aad858d3b026cda40
Merge: 74320d6 70112e0
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Nov 21 07:21:28 2013 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Nov 21 07:21:28 2013 -0500

    Merge topic 'use-generator-target' into next
    
    70112e0 Revert "Order cmGeneratorTargets deterministically."
    2283d65 Revert "Port some of the generator API to cmGeneratorTarget."


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=70112e0ca5f68214aaff8faec4f946221e7549b4
commit 70112e0ca5f68214aaff8faec4f946221e7549b4
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Nov 21 13:20:40 2013 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Thu Nov 21 13:20:40 2013 +0100

    Revert "Order cmGeneratorTargets deterministically."
    
    This reverts commit 8451e4d91310cefeec706b7f82d5ea1fec26c24b.

diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx
index 2fd77d4..676d4ed 100644
--- a/Source/cmExtraEclipseCDT4Generator.cxx
+++ b/Source/cmExtraEclipseCDT4Generator.cxx
@@ -914,7 +914,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
     for (cmGeneratorTargetsType::iterator l = targets.begin();
          l != targets.end(); ++l)
       {
-      if (l->second->Target->IsImported())
+      if (l->first->IsImported())
         {
         continue;
         }
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index 5ed3213..177bc25 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -100,6 +100,6 @@ private:
   void operator=(cmGeneratorTarget const&);
 };
 
-typedef std::map<std::string, cmGeneratorTarget*> cmGeneratorTargetsType;
+typedef std::map<cmTarget*, cmGeneratorTarget*> cmGeneratorTargetsType;
 
 #endif
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index bc4ab52..65a7118 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1341,8 +1341,8 @@ void cmGlobalGenerator::CreateGeneratorTargets()
       {
       cmTarget* t = &ti->second;
       cmGeneratorTarget* gt = new cmGeneratorTarget(t);
-      this->GeneratorTargets[t->GetName()] = gt;
-      generatorTargets[t->GetName()] = gt;
+      this->GeneratorTargets[t] = gt;
+      generatorTargets[t] = gt;
       }
 
     for(std::vector<cmTarget*>::const_iterator
@@ -1350,8 +1350,8 @@ void cmGlobalGenerator::CreateGeneratorTargets()
         j != mf->GetOwnedImportedTargets().end(); ++j)
       {
       cmGeneratorTarget* gt = new cmGeneratorTarget(*j);
-      this->GeneratorTargets[(*j)->GetName()] = gt;
-      generatorTargets[(*j)->GetName()] = gt;
+      this->GeneratorTargets[*j] = gt;
+      generatorTargets[*j] = gt;
       }
 
     mf->SetGeneratorTargets(generatorTargets);
@@ -1424,8 +1424,7 @@ void cmGlobalGenerator::ClearGeneratorMembers()
 //----------------------------------------------------------------------------
 cmGeneratorTarget* cmGlobalGenerator::GetGeneratorTarget(cmTarget* t) const
 {
-  cmGeneratorTargetsType::const_iterator ti =
-                                    this->GeneratorTargets.find(t->GetName());
+  cmGeneratorTargetsType::const_iterator ti = this->GeneratorTargets.find(t);
   if(ti == this->GeneratorTargets.end())
     {
     this->CMakeInstance->IssueMessage(
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 3871cad..63ec576 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -744,7 +744,7 @@ void cmLocalGenerator
   for(cmGeneratorTargetsType::iterator l = tgts.begin();
       l != tgts.end(); l++)
     {
-    if (l->second->Target->IsImported())
+    if (l->first->IsImported())
       {
       continue;
       }

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2283d658eb58f901aae9e72d497920dfc9b6746a
commit 2283d658eb58f901aae9e72d497920dfc9b6746a
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Nov 21 13:20:35 2013 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Thu Nov 21 13:20:35 2013 +0100

    Revert "Port some of the generator API to cmGeneratorTarget."
    
    This reverts commit d9c87ca822e78ccea41c004e62d39d387baf0790.

diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx
index 6333873..e1af2f9 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@ -471,29 +471,23 @@ cmGlobalUnixMakefileGenerator3
   // The directory-level rule should depend on the target-level rules
   // for all targets in the directory.
   std::vector<std::string> depends;
-  cmGeneratorTargetsType targets = lg->GetMakefile()->GetGeneratorTargets();
-  for(cmGeneratorTargetsType::iterator l = targets.begin();
-      l != targets.end(); ++l)
+  for(cmTargets::iterator l = lg->GetMakefile()->GetTargets().begin();
+      l != lg->GetMakefile()->GetTargets().end(); ++l)
     {
-    if((l->second->GetType() == cmTarget::EXECUTABLE) ||
-       (l->second->GetType() == cmTarget::STATIC_LIBRARY) ||
-       (l->second->GetType() == cmTarget::SHARED_LIBRARY) ||
-       (l->second->GetType() == cmTarget::MODULE_LIBRARY) ||
-       (l->second->GetType() == cmTarget::OBJECT_LIBRARY) ||
-       (l->second->GetType() == cmTarget::INTERFACE_LIBRARY) ||
-       (l->second->GetType() == cmTarget::UTILITY))
+    if((l->second.GetType() == cmTarget::EXECUTABLE) ||
+       (l->second.GetType() == cmTarget::STATIC_LIBRARY) ||
+       (l->second.GetType() == cmTarget::SHARED_LIBRARY) ||
+       (l->second.GetType() == cmTarget::MODULE_LIBRARY) ||
+       (l->second.GetType() == cmTarget::OBJECT_LIBRARY) ||
+       (l->second.GetType() == cmTarget::INTERFACE_LIBRARY) ||
+       (l->second.GetType() == cmTarget::UTILITY))
       {
-      if(l->second->Target->IsImported())
-        {
-        continue;
-        }
       // Add this to the list of depends rules in this directory.
-      if((!check_all || !l->second->GetPropertyAsBool("EXCLUDE_FROM_ALL")) &&
+      if((!check_all || !l->second.GetPropertyAsBool("EXCLUDE_FROM_ALL")) &&
          (!check_relink ||
-          l->second->Target
-                   ->NeedRelinkBeforeInstall(lg->ConfigurationName.c_str())))
+          l->second.NeedRelinkBeforeInstall(lg->ConfigurationName.c_str())))
         {
-        std::string tname = lg->GetRelativeTargetDirectory(*l->second->Target);
+        std::string tname = lg->GetRelativeTargetDirectory(l->second);
         tname += "/";
         tname += pass;
         depends.push_back(tname);
@@ -638,55 +632,49 @@ cmGlobalUnixMakefileGenerator3
     lg = static_cast<cmLocalUnixMakefileGenerator3 *>
       (this->LocalGenerators[i]);
     // for each target Generate the rule files for each target.
-    cmGeneratorTargetsType targets = lg->GetMakefile()->GetGeneratorTargets();
-    for(cmGeneratorTargetsType::iterator t = targets.begin();
-        t != targets.end(); ++t)
+    cmTargets& targets = lg->GetMakefile()->GetTargets();
+    for(cmTargets::iterator t = targets.begin(); t != targets.end(); ++t)
       {
-      if(t->second->Target->IsImported())
-        {
-        continue;
-        }
       // Don't emit the same rule twice (e.g. two targets with the same
       // simple name)
-      if(t->second->GetName() &&
-         strlen(t->second->GetName()) &&
-         emitted.insert(t->second->GetName()).second &&
+      if(t->second.GetName() &&
+         strlen(t->second.GetName()) &&
+         emitted.insert(t->second.GetName()).second &&
          // Handle user targets here.  Global targets are handled in
          // the local generator on a per-directory basis.
-         ((t->second->GetType() == cmTarget::EXECUTABLE) ||
-          (t->second->GetType() == cmTarget::STATIC_LIBRARY) ||
-          (t->second->GetType() == cmTarget::SHARED_LIBRARY) ||
-          (t->second->GetType() == cmTarget::MODULE_LIBRARY) ||
-          (t->second->GetType() == cmTarget::OBJECT_LIBRARY) ||
-          (t->second->GetType() == cmTarget::INTERFACE_LIBRARY) ||
-          (t->second->GetType() == cmTarget::UTILITY)))
+         ((t->second.GetType() == cmTarget::EXECUTABLE) ||
+          (t->second.GetType() == cmTarget::STATIC_LIBRARY) ||
+          (t->second.GetType() == cmTarget::SHARED_LIBRARY) ||
+          (t->second.GetType() == cmTarget::MODULE_LIBRARY) ||
+          (t->second.GetType() == cmTarget::OBJECT_LIBRARY) ||
+          (t->second.GetType() == cmTarget::INTERFACE_LIBRARY) ||
+          (t->second.GetType() == cmTarget::UTILITY)))
         {
         // Add a rule to build the target by name.
         lg->WriteDivider(ruleFileStream);
         ruleFileStream
           << "# Target rules for targets named "
-          << t->second->GetName() << "\n\n";
+          << t->second.GetName() << "\n\n";
 
         // Write the rule.
         commands.clear();
         std::string tmp = cmake::GetCMakeFilesDirectoryPostSlash();
         tmp += "Makefile2";
         commands.push_back(lg->GetRecursiveMakeCall
-                            (tmp.c_str(),t->second->GetName()));
+                            (tmp.c_str(),t->second.GetName()));
         depends.clear();
         depends.push_back("cmake_check_build_system");
         lg->WriteMakeRule(ruleFileStream,
                           "Build rule for target.",
-                          t->second->GetName(), depends, commands,
+                          t->second.GetName(), depends, commands,
                           true);
 
-        if (t->second->GetType() == cmTarget::INTERFACE_LIBRARY)
+        if (t->second.GetType() == cmTarget::INTERFACE_LIBRARY)
           {
           continue;
           }
         // Add a fast rule to build the target
-        std::string localName =
-                          lg->GetRelativeTargetDirectory(*t->second->Target);
+        std::string localName = lg->GetRelativeTargetDirectory(t->second);
         std::string makefileName;
         makefileName = localName;
         makefileName += "/build.make";
@@ -694,7 +682,7 @@ cmGlobalUnixMakefileGenerator3
         commands.clear();
         std::string makeTargetName = localName;
         makeTargetName += "/build";
-        localName = t->second->GetName();
+        localName = t->second.GetName();
         localName += "/fast";
         commands.push_back(lg->GetRecursiveMakeCall
                             (makefileName.c_str(), makeTargetName.c_str()));
@@ -703,12 +691,11 @@ cmGlobalUnixMakefileGenerator3
 
         // Add a local name for the rule to relink the target before
         // installation.
-        if(t->second->Target
-                    ->NeedRelinkBeforeInstall(lg->ConfigurationName.c_str()))
+        if(t->second.NeedRelinkBeforeInstall(lg->ConfigurationName.c_str()))
           {
-          makeTargetName = lg->GetRelativeTargetDirectory(*t->second->Target);
+          makeTargetName = lg->GetRelativeTargetDirectory(t->second);
           makeTargetName += "/preinstall";
-          localName = t->second->GetName();
+          localName = t->second.GetName();
           localName += "/preinstall";
           depends.clear();
           commands.clear();
@@ -742,31 +729,26 @@ cmGlobalUnixMakefileGenerator3
   depends.push_back("cmake_check_build_system");
 
   // for each target Generate the rule files for each target.
-  cmGeneratorTargetsType targets = lg->GetMakefile()->GetGeneratorTargets();
-  for(cmGeneratorTargetsType::iterator t = targets.begin();
-      t != targets.end(); ++t)
+  cmTargets& targets = lg->GetMakefile()->GetTargets();
+  for(cmTargets::iterator t = targets.begin(); t != targets.end(); ++t)
     {
-    if(t->second->Target->IsImported())
-      {
-      continue;
-      }
-    if (t->second->GetName()
-     && strlen(t->second->GetName())
-     && ((t->second->GetType() == cmTarget::EXECUTABLE)
-        || (t->second->GetType() == cmTarget::STATIC_LIBRARY)
-        || (t->second->GetType() == cmTarget::SHARED_LIBRARY)
-        || (t->second->GetType() == cmTarget::MODULE_LIBRARY)
-        || (t->second->GetType() == cmTarget::OBJECT_LIBRARY)
-        || (t->second->GetType() == cmTarget::INTERFACE_LIBRARY)
-        || (t->second->GetType() == cmTarget::UTILITY)))
+    if (t->second.GetName()
+     && strlen(t->second.GetName())
+     && ((t->second.GetType() == cmTarget::EXECUTABLE)
+        || (t->second.GetType() == cmTarget::STATIC_LIBRARY)
+        || (t->second.GetType() == cmTarget::SHARED_LIBRARY)
+        || (t->second.GetType() == cmTarget::MODULE_LIBRARY)
+        || (t->second.GetType() == cmTarget::OBJECT_LIBRARY)
+        || (t->second.GetType() == cmTarget::INTERFACE_LIBRARY)
+        || (t->second.GetType() == cmTarget::UTILITY)))
       {
       std::string makefileName;
       // Add a rule to build the target by name.
-      localName = lg->GetRelativeTargetDirectory(*t->second->Target);
+      localName = lg->GetRelativeTargetDirectory(t->second);
       makefileName = localName;
       makefileName += "/build.make";
 
-      bool needRequiresStep = this->NeedRequiresStep(*t->second->Target);
+      bool needRequiresStep = this->NeedRequiresStep(t->second);
 
       lg->WriteDivider(ruleFileStream);
       ruleFileStream
@@ -775,7 +757,7 @@ cmGlobalUnixMakefileGenerator3
 
       commands.clear();
 
-      if(t->second->GetType() != cmTarget::INTERFACE_LIBRARY)
+      if(t->second.GetType() != cmTarget::INTERFACE_LIBRARY)
         {
         makeTargetName = localName;
         makeTargetName += "/depend";
@@ -811,7 +793,7 @@ cmGlobalUnixMakefileGenerator3
                                   cmLocalGenerator::SHELL);
           progCmd << " ";
           std::vector<unsigned long>& progFiles =
-            this->ProgressMap[t->second->Target].Marks;
+            this->ProgressMap[&t->second].Marks;
           for (std::vector<unsigned long>::iterator i = progFiles.begin();
                 i != progFiles.end(); ++i)
             {
@@ -820,14 +802,14 @@ cmGlobalUnixMakefileGenerator3
           commands.push_back(progCmd.str());
           }
         progressDir = "Built target ";
-        progressDir += t->second->GetName();
+        progressDir += t->first;
         lg->AppendEcho(commands,progressDir.c_str());
         }
       else
         {
         depends.clear();
         }
-      this->AppendGlobalTargetDepends(depends,*t->second->Target);
+      this->AppendGlobalTargetDepends(depends,t->second);
       if(depends.empty() && this->EmptyRuleHackDepends != "")
         {
         depends.push_back(this->EmptyRuleHackDepends);
@@ -836,7 +818,7 @@ cmGlobalUnixMakefileGenerator3
                         localName.c_str(), depends, commands, true);
 
       // add the all/all dependency
-      if(!this->IsExcluded(this->LocalGenerators[0], *t->second->Target))
+      if(!this->IsExcluded(this->LocalGenerators[0], t->second))
         {
         depends.clear();
         depends.push_back(localName);
@@ -861,7 +843,7 @@ cmGlobalUnixMakefileGenerator3
       //
       std::set<cmTarget *> emitted;
       progCmd << " "
-              << this->CountProgressMarksInTarget(t->second->Target, emitted);
+              << this->CountProgressMarksInTarget(&t->second, emitted);
       commands.push_back(progCmd.str());
       }
       std::string tmp = cmake::GetCMakeFilesDirectoryPostSlash();
@@ -879,7 +861,7 @@ cmGlobalUnixMakefileGenerator3
       }
       depends.clear();
       depends.push_back("cmake_check_build_system");
-      localName = lg->GetRelativeTargetDirectory(*t->second->Target);
+      localName = lg->GetRelativeTargetDirectory(t->second);
       localName += "/rule";
       lg->WriteMakeRule(ruleFileStream,
                         "Build rule for subdir invocation for target.",
@@ -890,13 +872,12 @@ cmGlobalUnixMakefileGenerator3
       depends.clear();
       depends.push_back(localName);
       lg->WriteMakeRule(ruleFileStream, "Convenience name for target.",
-                        t->second->GetName(), depends, commands, true);
+                        t->second.GetName(), depends, commands, true);
 
       // Add rules to prepare the target for installation.
-      if(t->second->Target
-                  ->NeedRelinkBeforeInstall(lg->ConfigurationName.c_str()))
+      if(t->second.NeedRelinkBeforeInstall(lg->ConfigurationName.c_str()))
         {
-        localName = lg->GetRelativeTargetDirectory(*t->second->Target);
+        localName = lg->GetRelativeTargetDirectory(t->second);
         localName += "/preinstall";
         depends.clear();
         commands.clear();
@@ -906,7 +887,7 @@ cmGlobalUnixMakefileGenerator3
                           "Pre-install relink rule for target.",
                           localName.c_str(), depends, commands, true);
 
-        if(!this->IsExcluded(this->LocalGenerators[0], *t->second->Target))
+        if(!this->IsExcluded(this->LocalGenerators[0], t->second))
           {
           depends.clear();
           depends.push_back(localName);
@@ -917,7 +898,7 @@ cmGlobalUnixMakefileGenerator3
         }
 
       // add the clean rule
-      localName = lg->GetRelativeTargetDirectory(*t->second->Target);
+      localName = lg->GetRelativeTargetDirectory(t->second);
       makeTargetName = localName;
       makeTargetName += "/clean";
       depends.clear();
diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx
index 158d714..f1d5e2c 100644
--- a/Source/cmLocalNinjaGenerator.cxx
+++ b/Source/cmLocalNinjaGenerator.cxx
@@ -64,23 +64,18 @@ void cmLocalNinjaGenerator::Generate()
       }
     }
 
-  cmGeneratorTargetsType targets = this->GetMakefile()->GetGeneratorTargets();
-  for(cmGeneratorTargetsType::iterator t = targets.begin();
-      t != targets.end(); ++t)
+  cmTargets& targets = this->GetMakefile()->GetTargets();
+  for(cmTargets::iterator t = targets.begin(); t != targets.end(); ++t)
     {
-    if (t->second->Target->IsImported())
-      {
-      continue;
-      }
-    cmNinjaTargetGenerator* tg = cmNinjaTargetGenerator::New(t->second);
+    cmNinjaTargetGenerator* tg = cmNinjaTargetGenerator::New(&t->second);
     if(tg)
       {
       tg->Generate();
       // Add the target to "all" if required.
       if (!this->GetGlobalNinjaGenerator()->IsExcluded(
             this->GetGlobalNinjaGenerator()->GetLocalGenerators()[0],
-            *t->second->Target))
-        this->GetGlobalNinjaGenerator()->AddDependencyToAll(t->second->Target);
+            t->second))
+        this->GetGlobalNinjaGenerator()->AddDependencyToAll(&t->second);
       delete tg;
       }
     }
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index 9af5c29..8ed8d0a 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -145,18 +145,13 @@ void cmLocalUnixMakefileGenerator3::Generate()
     this->Makefile->IsOn("CMAKE_SKIP_ASSEMBLY_SOURCE_RULES");
 
   // Generate the rule files for each target.
-  cmGeneratorTargetsType targets = this->Makefile->GetGeneratorTargets();
+  cmTargets& targets = this->Makefile->GetTargets();
   cmGlobalUnixMakefileGenerator3* gg =
     static_cast<cmGlobalUnixMakefileGenerator3*>(this->GlobalGenerator);
-  for(cmGeneratorTargetsType::iterator t = targets.begin();
-      t != targets.end(); ++t)
+  for(cmTargets::iterator t = targets.begin(); t != targets.end(); ++t)
     {
-    if (t->second->Target->IsImported())
-      {
-      continue;
-      }
     cmsys::auto_ptr<cmMakefileTargetGenerator> tg(
-      cmMakefileTargetGenerator::New(t->second));
+      cmMakefileTargetGenerator::New(&(t->second)));
     if (tg.get())
       {
       tg->WriteRuleFiles();
@@ -377,23 +372,22 @@ void cmLocalUnixMakefileGenerator3
 
   // for each target we just provide a rule to cd up to the top and do a make
   // on the target
-  cmGeneratorTargetsType targets = this->Makefile->GetGeneratorTargets();
+  cmTargets& targets = this->Makefile->GetTargets();
   std::string localName;
-  for(cmGeneratorTargetsType::iterator t = targets.begin();
-      t != targets.end(); ++t)
-    {
-    if((t->second->GetType() == cmTarget::EXECUTABLE) ||
-       (t->second->GetType() == cmTarget::STATIC_LIBRARY) ||
-       (t->second->GetType() == cmTarget::SHARED_LIBRARY) ||
-       (t->second->GetType() == cmTarget::MODULE_LIBRARY) ||
-       (t->second->GetType() == cmTarget::OBJECT_LIBRARY) ||
-       (t->second->GetType() == cmTarget::INTERFACE_LIBRARY) ||
-       (t->second->GetType() == cmTarget::UTILITY))
+  for(cmTargets::iterator t = targets.begin(); t != targets.end(); ++t)
+    {
+    if((t->second.GetType() == cmTarget::EXECUTABLE) ||
+       (t->second.GetType() == cmTarget::STATIC_LIBRARY) ||
+       (t->second.GetType() == cmTarget::SHARED_LIBRARY) ||
+       (t->second.GetType() == cmTarget::MODULE_LIBRARY) ||
+       (t->second.GetType() == cmTarget::OBJECT_LIBRARY) ||
+       (t->second.GetType() == cmTarget::INTERFACE_LIBRARY) ||
+       (t->second.GetType() == cmTarget::UTILITY))
       {
-      emitted.insert(t->second->GetName());
+      emitted.insert(t->second.GetName());
 
       // for subdirs add a rule to build this specific target by name.
-      localName = this->GetRelativeTargetDirectory(*t->second->Target);
+      localName = this->GetRelativeTargetDirectory(t->second);
       localName += "/rule";
       commands.clear();
       depends.clear();
@@ -410,23 +404,22 @@ void cmLocalUnixMakefileGenerator3
                           localName.c_str(), depends, commands, true);
 
       // Add a target with the canonical name (no prefix, suffix or path).
-      if(localName != t->second->GetName())
+      if(localName != t->second.GetName())
         {
         commands.clear();
         depends.push_back(localName);
         this->WriteMakeRule(ruleFileStream, "Convenience name for target.",
-                            t->second->GetName(), depends, commands, true);
+                            t->second.GetName(), depends, commands, true);
         }
 
       // Add a fast rule to build the target
-      std::string makefileName =
-                         this->GetRelativeTargetDirectory(*t->second->Target);
+      std::string makefileName = this->GetRelativeTargetDirectory(t->second);
       makefileName += "/build.make";
       // make sure the makefile name is suitable for a makefile
       std::string makeTargetName =
-        this->GetRelativeTargetDirectory(*t->second->Target);
+        this->GetRelativeTargetDirectory(t->second);
       makeTargetName += "/build";
-      localName = t->second->GetName();
+      localName = t->second.GetName();
       localName += "/fast";
       depends.clear();
       commands.clear();
@@ -440,12 +433,11 @@ void cmLocalUnixMakefileGenerator3
 
       // Add a local name for the rule to relink the target before
       // installation.
-      if(t->second->Target
-                  ->NeedRelinkBeforeInstall(this->ConfigurationName.c_str()))
+      if(t->second.NeedRelinkBeforeInstall(this->ConfigurationName.c_str()))
         {
-        makeTargetName = this->GetRelativeTargetDirectory(*t->second->Target);
+        makeTargetName = this->GetRelativeTargetDirectory(t->second);
         makeTargetName += "/preinstall";
-        localName = t->second->GetName();
+        localName = t->second.GetName();
         localName += "/preinstall";
         depends.clear();
         commands.clear();
diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx
index 69fe444..e4219a9 100644
--- a/Source/cmMakefileExecutableTargetGenerator.cxx
+++ b/Source/cmMakefileExecutableTargetGenerator.cxx
@@ -21,15 +21,15 @@
 
 //----------------------------------------------------------------------------
 cmMakefileExecutableTargetGenerator
-::cmMakefileExecutableTargetGenerator(cmGeneratorTarget* target):
-  cmMakefileTargetGenerator(target->Target)
+::cmMakefileExecutableTargetGenerator(cmTarget* target):
+  cmMakefileTargetGenerator(target)
 {
   this->CustomCommandDriver = OnDepends;
   this->Target->GetExecutableNames(
     this->TargetNameOut, this->TargetNameReal, this->TargetNameImport,
     this->TargetNamePDB, this->ConfigName);
 
-  this->OSXBundleGenerator = new cmOSXBundleGenerator(target,
+  this->OSXBundleGenerator = new cmOSXBundleGenerator(this->Target,
                                                       this->ConfigName);
   this->OSXBundleGenerator->SetMacContentFolders(&this->MacContentFolders);
 }
diff --git a/Source/cmMakefileExecutableTargetGenerator.h b/Source/cmMakefileExecutableTargetGenerator.h
index 940226b..3b18166 100644
--- a/Source/cmMakefileExecutableTargetGenerator.h
+++ b/Source/cmMakefileExecutableTargetGenerator.h
@@ -17,7 +17,7 @@
 class cmMakefileExecutableTargetGenerator: public cmMakefileTargetGenerator
 {
 public:
-  cmMakefileExecutableTargetGenerator(cmGeneratorTarget* target);
+  cmMakefileExecutableTargetGenerator(cmTarget* target);
   virtual ~cmMakefileExecutableTargetGenerator();
 
   /* the main entry point for this class. Writes the Makefiles associated
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx
index 7b8a531..29365a3 100644
--- a/Source/cmMakefileLibraryTargetGenerator.cxx
+++ b/Source/cmMakefileLibraryTargetGenerator.cxx
@@ -21,15 +21,15 @@
 
 //----------------------------------------------------------------------------
 cmMakefileLibraryTargetGenerator
-::cmMakefileLibraryTargetGenerator(cmGeneratorTarget* target):
-  cmMakefileTargetGenerator(target->Target)
+::cmMakefileLibraryTargetGenerator(cmTarget* target):
+  cmMakefileTargetGenerator(target)
 {
   this->CustomCommandDriver = OnDepends;
   this->Target->GetLibraryNames(
     this->TargetNameOut, this->TargetNameSO, this->TargetNameReal,
     this->TargetNameImport, this->TargetNamePDB, this->ConfigName);
 
-  this->OSXBundleGenerator = new cmOSXBundleGenerator(target,
+  this->OSXBundleGenerator = new cmOSXBundleGenerator(this->Target,
                                                       this->ConfigName);
   this->OSXBundleGenerator->SetMacContentFolders(&this->MacContentFolders);
 }
diff --git a/Source/cmMakefileLibraryTargetGenerator.h b/Source/cmMakefileLibraryTargetGenerator.h
index 1487b56..07f828b 100644
--- a/Source/cmMakefileLibraryTargetGenerator.h
+++ b/Source/cmMakefileLibraryTargetGenerator.h
@@ -18,7 +18,7 @@ class cmMakefileLibraryTargetGenerator:
   public cmMakefileTargetGenerator
 {
 public:
-  cmMakefileLibraryTargetGenerator(cmGeneratorTarget* target);
+  cmMakefileLibraryTargetGenerator(cmTarget* target);
   virtual ~cmMakefileLibraryTargetGenerator();
 
   /* the main entry point for this class. Writes the Makefiles associated
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 2063a24..2fcad79 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -63,7 +63,7 @@ cmMakefileTargetGenerator::~cmMakefileTargetGenerator()
 }
 
 cmMakefileTargetGenerator *
-cmMakefileTargetGenerator::New(cmGeneratorTarget *tgt)
+cmMakefileTargetGenerator::New(cmTarget *tgt)
 {
   cmMakefileTargetGenerator *result = 0;
 
diff --git a/Source/cmMakefileTargetGenerator.h b/Source/cmMakefileTargetGenerator.h
index 4f8fafa..ec2af1c 100644
--- a/Source/cmMakefileTargetGenerator.h
+++ b/Source/cmMakefileTargetGenerator.h
@@ -38,7 +38,7 @@ public:
   virtual ~cmMakefileTargetGenerator();
 
   // construct using this factory call
-  static cmMakefileTargetGenerator *New(cmGeneratorTarget *tgt);
+  static cmMakefileTargetGenerator *New(cmTarget *tgt);
 
   /* the main entry point for this class. Writes the Makefiles associated
      with this target */
diff --git a/Source/cmMakefileUtilityTargetGenerator.cxx b/Source/cmMakefileUtilityTargetGenerator.cxx
index 7751ad9..1fa4e95 100644
--- a/Source/cmMakefileUtilityTargetGenerator.cxx
+++ b/Source/cmMakefileUtilityTargetGenerator.cxx
@@ -20,11 +20,11 @@
 
 //----------------------------------------------------------------------------
 cmMakefileUtilityTargetGenerator
-::cmMakefileUtilityTargetGenerator(cmGeneratorTarget* target):
-  cmMakefileTargetGenerator(target->Target)
+::cmMakefileUtilityTargetGenerator(cmTarget* target):
+  cmMakefileTargetGenerator(target)
 {
   this->CustomCommandDriver = OnUtility;
-  this->OSXBundleGenerator = new cmOSXBundleGenerator(target,
+  this->OSXBundleGenerator = new cmOSXBundleGenerator(this->Target,
                                                       this->ConfigName);
   this->OSXBundleGenerator->SetMacContentFolders(&this->MacContentFolders);
 }
diff --git a/Source/cmMakefileUtilityTargetGenerator.h b/Source/cmMakefileUtilityTargetGenerator.h
index 8f99300..fc47b38 100644
--- a/Source/cmMakefileUtilityTargetGenerator.h
+++ b/Source/cmMakefileUtilityTargetGenerator.h
@@ -18,7 +18,7 @@ class cmMakefileUtilityTargetGenerator:
   public cmMakefileTargetGenerator
 {
 public:
-  cmMakefileUtilityTargetGenerator(cmGeneratorTarget* target);
+  cmMakefileUtilityTargetGenerator(cmTarget* target);
   virtual ~cmMakefileUtilityTargetGenerator();
 
   /* the main entry point for this class. Writes the Makefiles associated
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index 54cf14d..015654b 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -17,7 +17,6 @@
 #include "cmGeneratedFileStream.h"
 #include "cmMakefile.h"
 #include "cmOSXBundleGenerator.h"
-#include "cmGeneratorTarget.h"
 
 #include <assert.h>
 #include <algorithm>
@@ -28,8 +27,8 @@
 
 
 cmNinjaNormalTargetGenerator::
-cmNinjaNormalTargetGenerator(cmGeneratorTarget* target)
-  : cmNinjaTargetGenerator(target->Target)
+cmNinjaNormalTargetGenerator(cmTarget* target)
+  : cmNinjaTargetGenerator(target)
   , TargetNameOut()
   , TargetNameSO()
   , TargetNameReal()
@@ -37,16 +36,15 @@ cmNinjaNormalTargetGenerator(cmGeneratorTarget* target)
   , TargetNamePDB()
   , TargetLinkLanguage(0)
 {
-  this->TargetLinkLanguage = target->Target
-                                   ->GetLinkerLanguage(this->GetConfigName());
+  this->TargetLinkLanguage = target->GetLinkerLanguage(this->GetConfigName());
   if (target->GetType() == cmTarget::EXECUTABLE)
-    target->Target->GetExecutableNames(this->TargetNameOut,
+    target->GetExecutableNames(this->TargetNameOut,
                                this->TargetNameReal,
                                this->TargetNameImport,
                                this->TargetNamePDB,
                                GetLocalGenerator()->GetConfigName());
   else
-    target->Target->GetLibraryNames(this->TargetNameOut,
+    target->GetLibraryNames(this->TargetNameOut,
                             this->TargetNameSO,
                             this->TargetNameReal,
                             this->TargetNameImport,
@@ -57,7 +55,7 @@ cmNinjaNormalTargetGenerator(cmGeneratorTarget* target)
     {
     // on Windows the output dir is already needed at compile time
     // ensure the directory exists (OutDir test)
-    EnsureDirectoryExists(target->Target->GetDirectory(this->GetConfigName()));
+    EnsureDirectoryExists(target->GetDirectory(this->GetConfigName()));
     }
 
   this->OSXBundleGenerator = new cmOSXBundleGenerator(target,
diff --git a/Source/cmNinjaNormalTargetGenerator.h b/Source/cmNinjaNormalTargetGenerator.h
index c7a089c..284804b 100644
--- a/Source/cmNinjaNormalTargetGenerator.h
+++ b/Source/cmNinjaNormalTargetGenerator.h
@@ -21,12 +21,11 @@
 
 class cmSourceFile;
 class cmOSXBundleGenerator;
-class cmGeneratorTarget;
 
 class cmNinjaNormalTargetGenerator : public cmNinjaTargetGenerator
 {
 public:
-  cmNinjaNormalTargetGenerator(cmGeneratorTarget* target);
+  cmNinjaNormalTargetGenerator(cmTarget* target);
   ~cmNinjaNormalTargetGenerator();
 
   void Generate();
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index b132db6..26eadbe 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -26,7 +26,7 @@
 #include <algorithm>
 
 cmNinjaTargetGenerator *
-cmNinjaTargetGenerator::New(cmGeneratorTarget* target)
+cmNinjaTargetGenerator::New(cmTarget* target)
 {
   switch (target->GetType())
     {
@@ -44,7 +44,7 @@ cmNinjaTargetGenerator::New(cmGeneratorTarget* target)
         // We only want to process global targets that live in the home
         // (i.e. top-level) directory.  CMake creates copies of these targets
         // in every directory, which we don't need.
-        cmMakefile *mf = target->Target->GetMakefile();
+        cmMakefile *mf = target->GetMakefile();
         if (strcmp(mf->GetStartDirectory(), mf->GetHomeDirectory()) == 0)
           return new cmNinjaUtilityTargetGenerator(target);
         // else fallthrough
diff --git a/Source/cmNinjaTargetGenerator.h b/Source/cmNinjaTargetGenerator.h
index e377a78..1cf811a 100644
--- a/Source/cmNinjaTargetGenerator.h
+++ b/Source/cmNinjaTargetGenerator.h
@@ -30,7 +30,7 @@ class cmNinjaTargetGenerator
 {
 public:
   /// Create a cmNinjaTargetGenerator according to the @a target's type.
-  static cmNinjaTargetGenerator* New(cmGeneratorTarget* target);
+  static cmNinjaTargetGenerator* New(cmTarget* target);
 
   /// Build a NinjaTargetGenerator.
   cmNinjaTargetGenerator(cmTarget* target);
diff --git a/Source/cmNinjaUtilityTargetGenerator.cxx b/Source/cmNinjaUtilityTargetGenerator.cxx
index 8556565..755ce6e 100644
--- a/Source/cmNinjaUtilityTargetGenerator.cxx
+++ b/Source/cmNinjaUtilityTargetGenerator.cxx
@@ -18,9 +18,8 @@
 #include "cmSourceFile.h"
 #include "cmTarget.h"
 
-cmNinjaUtilityTargetGenerator::cmNinjaUtilityTargetGenerator(
-    cmGeneratorTarget *target)
-  : cmNinjaTargetGenerator(target->Target) {}
+cmNinjaUtilityTargetGenerator::cmNinjaUtilityTargetGenerator(cmTarget *target)
+  : cmNinjaTargetGenerator(target) {}
 
 cmNinjaUtilityTargetGenerator::~cmNinjaUtilityTargetGenerator() {}
 
diff --git a/Source/cmNinjaUtilityTargetGenerator.h b/Source/cmNinjaUtilityTargetGenerator.h
index add0291..8b82ce4 100644
--- a/Source/cmNinjaUtilityTargetGenerator.h
+++ b/Source/cmNinjaUtilityTargetGenerator.h
@@ -21,7 +21,7 @@ class cmSourceFile;
 class cmNinjaUtilityTargetGenerator : public cmNinjaTargetGenerator
 {
 public:
-  cmNinjaUtilityTargetGenerator(cmGeneratorTarget* target);
+  cmNinjaUtilityTargetGenerator(cmTarget* target);
   ~cmNinjaUtilityTargetGenerator();
 
   void Generate();
diff --git a/Source/cmOSXBundleGenerator.cxx b/Source/cmOSXBundleGenerator.cxx
index 9a340dc..a475c7c 100644
--- a/Source/cmOSXBundleGenerator.cxx
+++ b/Source/cmOSXBundleGenerator.cxx
@@ -18,10 +18,10 @@
 
 //----------------------------------------------------------------------------
 cmOSXBundleGenerator::
-cmOSXBundleGenerator(cmGeneratorTarget* target,
+cmOSXBundleGenerator(cmTarget* target,
                      const char* configName)
- : Target(target->Target)
- , Makefile(target->Target->GetMakefile())
+ : Target(target)
+ , Makefile(target->GetMakefile())
  , LocalGenerator(Makefile->GetLocalGenerator())
  , ConfigName(configName)
  , MacContentFolders(0)
diff --git a/Source/cmOSXBundleGenerator.h b/Source/cmOSXBundleGenerator.h
index 29b7611..ec82b9a 100644
--- a/Source/cmOSXBundleGenerator.h
+++ b/Source/cmOSXBundleGenerator.h
@@ -21,12 +21,11 @@
 class cmTarget;
 class cmMakefile;
 class cmLocalGenerator;
-class cmGeneratorTarget;
 
 class cmOSXBundleGenerator
 {
 public:
-  cmOSXBundleGenerator(cmGeneratorTarget* target,
+  cmOSXBundleGenerator(cmTarget* target,
                        const char* configName);
 
   // create an app bundle at a given root, and return

-----------------------------------------------------------------------

Summary of changes:
 Source/cmExtraEclipseCDT4Generator.cxx         |    2 +-
 Source/cmGeneratorTarget.h                     |    2 +-
 Source/cmGlobalGenerator.cxx                   |   11 +-
 Source/cmGlobalUnixMakefileGenerator3.cxx      |  135 ++++++++++--------------
 Source/cmLocalGenerator.cxx                    |    2 +-
 Source/cmLocalNinjaGenerator.cxx               |   15 +--
 Source/cmLocalUnixMakefileGenerator3.cxx       |   52 ++++-----
 Source/cmMakefileExecutableTargetGenerator.cxx |    6 +-
 Source/cmMakefileExecutableTargetGenerator.h   |    2 +-
 Source/cmMakefileLibraryTargetGenerator.cxx    |    6 +-
 Source/cmMakefileLibraryTargetGenerator.h      |    2 +-
 Source/cmMakefileTargetGenerator.cxx           |    2 +-
 Source/cmMakefileTargetGenerator.h             |    2 +-
 Source/cmMakefileUtilityTargetGenerator.cxx    |    6 +-
 Source/cmMakefileUtilityTargetGenerator.h      |    2 +-
 Source/cmNinjaNormalTargetGenerator.cxx        |   14 +--
 Source/cmNinjaNormalTargetGenerator.h          |    3 +-
 Source/cmNinjaTargetGenerator.cxx              |    4 +-
 Source/cmNinjaTargetGenerator.h                |    2 +-
 Source/cmNinjaUtilityTargetGenerator.cxx       |    5 +-
 Source/cmNinjaUtilityTargetGenerator.h         |    2 +-
 Source/cmOSXBundleGenerator.cxx                |    6 +-
 Source/cmOSXBundleGenerator.h                  |    3 +-
 23 files changed, 124 insertions(+), 162 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list