[Cmake-commits] CMake branch, next, updated. v3.4.0-rc2-969-gb976c49

Stephen Kelly steveire at gmail.com
Sat Oct 24 03:24:57 EDT 2015


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  b976c491833cbe263ff972624650087253b2aa30 (commit)
       via  6cac952b9ed8ad202286ddee7246d9ef7ed8f22d (commit)
       via  97b3768898431ffff824388dc263654a35a33aa2 (commit)
       via  600af01d41e32d304e43dc98783ec0f7f010f40e (commit)
       via  330bfa83368989f6fd67072ef9f5c9e457230f17 (commit)
       via  b13e26e278dcc34243a2b31dfca8e23b01e15b76 (commit)
      from  ab90caa1110936859e9bd2c46aee3e043d2aab6e (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 -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b976c491833cbe263ff972624650087253b2aa30
commit b976c491833cbe263ff972624650087253b2aa30
Merge: ab90caa 6cac952
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Oct 24 03:24:55 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sat Oct 24 03:24:55 2015 -0400

    Merge topic 'use-generator-target' into next
    
    6cac952b VS: Port interface to cmGeneratorTarget
    97b37688 VS: Port WriteUtilityDepends to cmGeneratorTarget
    600af01d VS: Port utility depends to cmGeneratorTarget
    330bfa83 VS: Port target depends to cmGeneratorTarget
    b13e26e2 VS: Port ProjectDepends to cmGeneratorTarget.


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6cac952b9ed8ad202286ddee7246d9ef7ed8f22d
commit 6cac952b9ed8ad202286ddee7246d9ef7ed8f22d
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri Oct 23 18:26:48 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Oct 24 09:24:43 2015 +0200

    VS: Port interface to cmGeneratorTarget

diff --git a/Source/cmGlobalVisualStudio7Generator.h b/Source/cmGlobalVisualStudio7Generator.h
index bc91e87..6a0e5e9 100644
--- a/Source/cmGlobalVisualStudio7Generator.h
+++ b/Source/cmGlobalVisualStudio7Generator.h
@@ -94,7 +94,8 @@ public:
 
   /** Return true if the target project file should have the option
       LinkLibraryDependencies and link to .sln dependencies. */
-  virtual bool NeedLinkLibraryDependencies(cmTarget&) { return false; }
+  virtual bool NeedLinkLibraryDependencies(cmGeneratorTarget*)
+  { return false; }
 
   const char* GetIntelProjectVersion();
 
diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx
index 9b8b9fd..bdb1b25 100644
--- a/Source/cmGlobalVisualStudio8Generator.cxx
+++ b/Source/cmGlobalVisualStudio8Generator.cxx
@@ -460,14 +460,15 @@ void cmGlobalVisualStudio8Generator::WriteProjectDepends(
 
 //----------------------------------------------------------------------------
 bool cmGlobalVisualStudio8Generator::NeedLinkLibraryDependencies(
-  cmTarget& target)
+        cmGeneratorTarget *target)
 {
   // Look for utility dependencies that magically link.
   for(std::set<std::string>::const_iterator ui =
-        target.GetUtilities().begin();
-      ui != target.GetUtilities().end(); ++ui)
+        target->Target->GetUtilities().begin();
+      ui != target->Target->GetUtilities().end(); ++ui)
     {
-    if(cmTarget* depTarget = this->FindTarget(ui->c_str()))
+    if(cmGeneratorTarget* depTarget =
+        target->GetLocalGenerator()->FindGeneratorTargetToUse(ui->c_str()))
       {
       if(depTarget->GetType() != cmState::INTERFACE_LIBRARY
           && depTarget->GetProperty("EXTERNAL_MSPROJECT"))
diff --git a/Source/cmGlobalVisualStudio8Generator.h b/Source/cmGlobalVisualStudio8Generator.h
index c05e5fa..b3093cc 100644
--- a/Source/cmGlobalVisualStudio8Generator.h
+++ b/Source/cmGlobalVisualStudio8Generator.h
@@ -60,7 +60,7 @@ public:
 
   /** Return true if the target project file should have the option
       LinkLibraryDependencies and link to .sln dependencies. */
-  virtual bool NeedLinkLibraryDependencies(cmTarget& target);
+  virtual bool NeedLinkLibraryDependencies(cmGeneratorTarget* target);
 
   /** Return true if building for Windows CE */
   virtual bool TargetsWindowsCE() const {
diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx
index 0ba0ccb..b819dad 100644
--- a/Source/cmGlobalVisualStudioGenerator.cxx
+++ b/Source/cmGlobalVisualStudioGenerator.cxx
@@ -307,7 +307,7 @@ void cmGlobalVisualStudioGenerator::FillLinkClosure(
         const cmGeneratorTarget *target,
         TargetSet& linked)
 {
-  if(linked.insert(target->Target).second)
+  if(linked.insert(target).second)
     {
     TargetDependSet const& depends =
             this->GetTargetDirectDepends(target);
@@ -326,10 +326,10 @@ void cmGlobalVisualStudioGenerator::FillLinkClosure(
 cmGlobalVisualStudioGenerator::TargetSet const&
 cmGlobalVisualStudioGenerator::GetTargetLinkClosure(cmGeneratorTarget* target)
 {
-  TargetSetMap::iterator i = this->TargetLinkClosure.find(target->Target);
+  TargetSetMap::iterator i = this->TargetLinkClosure.find(target);
   if(i == this->TargetLinkClosure.end())
     {
-    TargetSetMap::value_type entry(target->Target, TargetSet());
+    TargetSetMap::value_type entry(target, TargetSet());
     i = this->TargetLinkClosure.insert(entry).first;
     this->FillLinkClosure(target, i->second);
     }
@@ -338,7 +338,8 @@ cmGlobalVisualStudioGenerator::GetTargetLinkClosure(cmGeneratorTarget* target)
 
 //----------------------------------------------------------------------------
 void cmGlobalVisualStudioGenerator::FollowLinkDepends(
-  cmTarget const* target, std::set<cmTarget const*>& linked)
+        const cmGeneratorTarget *target,
+        std::set<const cmGeneratorTarget *> &linked)
 {
   if(target->GetType() == cmState::INTERFACE_LIBRARY)
     {
@@ -349,14 +350,13 @@ void cmGlobalVisualStudioGenerator::FollowLinkDepends(
     {
     // Static library targets do not list their link dependencies so
     // we must follow them transitively now.
-    cmGeneratorTarget* gt = this->GetGeneratorTarget(target);
-    TargetDependSet const& depends = this->GetTargetDirectDepends(gt);
+    TargetDependSet const& depends = this->GetTargetDirectDepends(target);
     for(TargetDependSet::const_iterator di = depends.begin();
         di != depends.end(); ++di)
       {
       if(di->IsLink())
         {
-        this->FollowLinkDepends((*di)->Target, linked);
+        this->FollowLinkDepends(*di, linked);
         }
       }
     }
@@ -431,7 +431,7 @@ void cmGlobalVisualStudioGenerator::ComputeVSTargetDepends(
   // Collect implicit link dependencies (target_link_libraries).
   // Static libraries cannot depend on their link implementation
   // due to behavior (2), but they do not really need to.
-  std::set<cmTarget const*> linkDepends;
+  std::set<cmGeneratorTarget const*> linkDepends;
   if(target->GetType() != cmState::STATIC_LIBRARY)
     {
     for(TargetDependSet::const_iterator di = depends.begin();
@@ -440,20 +440,20 @@ void cmGlobalVisualStudioGenerator::ComputeVSTargetDepends(
       cmTargetDepend dep = *di;
       if(dep.IsLink())
         {
-        this->FollowLinkDepends(dep->Target, linkDepends);
+        this->FollowLinkDepends(*di, linkDepends);
         }
       }
     }
 
   // Collect explicit util dependencies (add_dependencies).
-  std::set<cmTarget const*> utilDepends;
+  std::set<cmGeneratorTarget const*> utilDepends;
   for(TargetDependSet::const_iterator di = depends.begin();
       di != depends.end(); ++di)
     {
     cmTargetDepend dep = *di;
     if(dep.IsUtil())
       {
-      this->FollowLinkDepends(dep->Target, utilDepends);
+      this->FollowLinkDepends(*di, utilDepends);
       }
     }
 
@@ -466,23 +466,22 @@ void cmGlobalVisualStudioGenerator::ComputeVSTargetDepends(
     }
 
   // Emit link dependencies.
-  for(std::set<cmTarget const*>::iterator di = linkDepends.begin();
+  for(std::set<cmGeneratorTarget const*>::iterator di = linkDepends.begin();
       di != linkDepends.end(); ++di)
     {
-    cmTarget const* dep = *di;
+    cmGeneratorTarget const* dep = *di;
     vsTargetDepend.insert(dep->GetName());
     }
 
   // Emit util dependencies.  Possibly use intermediate targets.
-  for(std::set<cmTarget const*>::iterator di = utilDepends.begin();
+  for(std::set<cmGeneratorTarget const*>::iterator di = utilDepends.begin();
       di != utilDepends.end(); ++di)
     {
-    cmTarget const* dep = *di;
-    cmGeneratorTarget* dgt = this->GetGeneratorTarget(dep);
-    if(allowLinkable || !VSLinkable(dgt) || linked.count(dep))
+    cmGeneratorTarget const* dgt = *di;
+    if(allowLinkable || !VSLinkable(dgt) || linked.count(dgt))
       {
       // Direct dependency allowed.
-      vsTargetDepend.insert(dep->GetName());
+      vsTargetDepend.insert(dgt->GetName());
       }
     else
       {
@@ -892,9 +891,7 @@ cmGlobalVisualStudioGenerator::OrderedTargetDependSet
   for (TargetSet::const_iterator it = targets.begin();
        it != targets.end(); ++it)
     {
-    cmGeneratorTarget* gt =
-        (*it)->GetMakefile()->GetGlobalGenerator()->GetGeneratorTarget(*it);
-    this->insert(gt);
+    this->insert(*it);
     }
 }
 
diff --git a/Source/cmGlobalVisualStudioGenerator.h b/Source/cmGlobalVisualStudioGenerator.h
index c81ddda..f827f26 100644
--- a/Source/cmGlobalVisualStudioGenerator.h
+++ b/Source/cmGlobalVisualStudioGenerator.h
@@ -88,7 +88,7 @@ public:
   /** Return true if building for Windows CE */
   virtual bool TargetsWindowsCE() const { return false; }
 
-  class TargetSet: public std::set<cmTarget const*> {};
+  class TargetSet: public std::set<cmGeneratorTarget const*> {};
   class TargetCompare
   {
     std::string First;
@@ -126,8 +126,9 @@ protected:
   VSDependMap VSTargetDepends;
   void ComputeVSTargetDepends(cmGeneratorTarget *);
 
-  bool CheckTargetLinks(cmTarget& target, const std::string& name);
-  std::string GetUtilityForTarget(cmTarget& target, const std::string&);
+  bool CheckTargetLinks(cmGeneratorTarget& target, const std::string& name);
+  std::string GetUtilityForTarget(cmGeneratorTarget& target,
+                                  const std::string&);
   virtual std::string WriteUtilityDepend(cmGeneratorTarget const*) = 0;
   std::string GetUtilityDepend(const cmGeneratorTarget *target);
   typedef std::map<cmGeneratorTarget const*, std::string> UtilityDependsMap;
@@ -141,13 +142,14 @@ private:
   void PrintCompilerAdvice(std::ostream&, std::string const&,
                            const char*) const {}
 
-  void FollowLinkDepends(cmTarget const* target,
-                         std::set<cmTarget const*>& linked);
+  void FollowLinkDepends(cmGeneratorTarget const* target,
+                         std::set<cmGeneratorTarget const*>& linked);
 
-  class TargetSetMap: public std::map<cmTarget*, TargetSet> {};
+  class TargetSetMap: public std::map<cmGeneratorTarget*, TargetSet> {};
   TargetSetMap TargetLinkClosure;
-  void FillLinkClosure(cmGeneratorTarget const* target, TargetSet& linked);
-  TargetSet const& GetTargetLinkClosure(cmGeneratorTarget *target);
+  void FillLinkClosure(const cmGeneratorTarget *target,
+                       TargetSet& linked);
+  TargetSet const& GetTargetLinkClosure(cmGeneratorTarget* target);
 };
 
 class cmGlobalVisualStudioGenerator::OrderedTargetDependSet:
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index 5ba59ee..ca8d697 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -1186,7 +1186,7 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout,
       }
     fout << "\t\t\t<Tool\n"
          << "\t\t\t\tName=\"" << tool << "\"\n";
-    if(!gg->NeedLinkLibraryDependencies(*target->Target))
+    if(!gg->NeedLinkLibraryDependencies(target))
       {
       fout << "\t\t\t\tLinkLibraryDependencies=\"false\"\n";
       }
@@ -1285,7 +1285,7 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout,
       }
     fout << "\t\t\t<Tool\n"
          << "\t\t\t\tName=\"" << tool << "\"\n";
-    if(!gg->NeedLinkLibraryDependencies(*target->Target))
+    if(!gg->NeedLinkLibraryDependencies(target))
       {
       fout << "\t\t\t\tLinkLibraryDependencies=\"false\"\n";
       }
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 2bb67fd..9c9f5ab 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -2677,7 +2677,7 @@ cmVisualStudio10TargetGenerator::WriteLinkOptions(std::string const& config)
 
   this->WriteString("</Link>\n", 2);
   if(!this->GlobalGenerator->NeedLinkLibraryDependencies(
-              *this->GeneratorTarget->Target))
+              this->GeneratorTarget))
     {
     this->WriteString("<ProjectReference>\n", 2);
     this->WriteString(

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=97b3768898431ffff824388dc263654a35a33aa2
commit 97b3768898431ffff824388dc263654a35a33aa2
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri Oct 23 18:26:47 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Oct 24 09:24:43 2015 +0200

    VS: Port WriteUtilityDepends to cmGeneratorTarget

diff --git a/Source/cmGlobalVisualStudio6Generator.cxx b/Source/cmGlobalVisualStudio6Generator.cxx
index dd4e871..bb494f1 100644
--- a/Source/cmGlobalVisualStudio6Generator.cxx
+++ b/Source/cmGlobalVisualStudio6Generator.cxx
@@ -383,12 +383,14 @@ void cmGlobalVisualStudio6Generator::WriteDSWHeader(std::ostream& fout)
 
 //----------------------------------------------------------------------------
 std::string
-cmGlobalVisualStudio6Generator::WriteUtilityDepend(const cmTarget *target)
+cmGlobalVisualStudio6Generator::WriteUtilityDepend(
+        const cmGeneratorTarget *target)
 {
   std::string pname = target->GetName();
   pname += "_UTILITY";
   pname = GetVS6TargetName(pname.c_str());
-  std::string fname = target->GetMakefile()->GetCurrentBinaryDirectory();
+  std::string fname =
+          target->GetLocalGenerator()->GetCurrentBinaryDirectory();
   fname += "/";
   fname += pname;
   fname += ".dsp";
diff --git a/Source/cmGlobalVisualStudio6Generator.h b/Source/cmGlobalVisualStudio6Generator.h
index edf637f..993a48f 100644
--- a/Source/cmGlobalVisualStudio6Generator.h
+++ b/Source/cmGlobalVisualStudio6Generator.h
@@ -97,7 +97,7 @@ private:
                             const std::string& name, const char* path,
                             const std::set<std::string>& dependencies);
   void WriteDSWFooter(std::ostream& fout);
-  virtual std::string WriteUtilityDepend(cmTarget const* target);
+  virtual std::string WriteUtilityDepend(const cmGeneratorTarget *target);
   std::string MSDevCommand;
   bool MSDevCommandInitialized;
   std::string const& GetMSDevCommand();
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx
index 37f509a..5473247 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -888,13 +888,14 @@ void cmGlobalVisualStudio7Generator::WriteSLNHeader(std::ostream& fout)
 
 //----------------------------------------------------------------------------
 std::string
-cmGlobalVisualStudio7Generator::WriteUtilityDepend(cmTarget const* target)
+cmGlobalVisualStudio7Generator::WriteUtilityDepend(
+        cmGeneratorTarget const* target)
 {
   std::vector<std::string> configs;
-  target->GetMakefile()->GetConfigurations(configs);
+  target->Target->GetMakefile()->GetConfigurations(configs);
   std::string pname = target->GetName();
   pname += "_UTILITY";
-  std::string fname = target->GetMakefile()->GetCurrentBinaryDirectory();
+  std::string fname = target->GetLocalGenerator()->GetCurrentBinaryDirectory();
   fname += "/";
   fname += pname;
   fname += ".vcproj";
diff --git a/Source/cmGlobalVisualStudio7Generator.h b/Source/cmGlobalVisualStudio7Generator.h
index eed6f49..bc91e87 100644
--- a/Source/cmGlobalVisualStudio7Generator.h
+++ b/Source/cmGlobalVisualStudio7Generator.h
@@ -136,7 +136,7 @@ protected:
                                       cmLocalGenerator* root);
   virtual void WriteSLNFooter(std::ostream& fout);
   virtual void WriteSLNHeader(std::ostream& fout);
-  virtual std::string WriteUtilityDepend(cmTarget const* target);
+  virtual std::string WriteUtilityDepend(const cmGeneratorTarget *target);
 
   virtual void WriteTargetsToSolution(
     std::ostream& fout,
diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx
index 3e25559..0ba0ccb 100644
--- a/Source/cmGlobalVisualStudioGenerator.cxx
+++ b/Source/cmGlobalVisualStudioGenerator.cxx
@@ -514,7 +514,7 @@ cmGlobalVisualStudioGenerator::GetUtilityDepend(
   UtilityDependsMap::iterator i = this->UtilityDepends.find(target);
   if(i == this->UtilityDepends.end())
     {
-    std::string name = this->WriteUtilityDepend(target->Target);
+    std::string name = this->WriteUtilityDepend(target);
     UtilityDependsMap::value_type entry(target, name);
     i = this->UtilityDepends.insert(entry).first;
     }
diff --git a/Source/cmGlobalVisualStudioGenerator.h b/Source/cmGlobalVisualStudioGenerator.h
index 6d804d8..c81ddda 100644
--- a/Source/cmGlobalVisualStudioGenerator.h
+++ b/Source/cmGlobalVisualStudioGenerator.h
@@ -128,7 +128,7 @@ protected:
 
   bool CheckTargetLinks(cmTarget& target, const std::string& name);
   std::string GetUtilityForTarget(cmTarget& target, const std::string&);
-  virtual std::string WriteUtilityDepend(cmTarget const*) = 0;
+  virtual std::string WriteUtilityDepend(cmGeneratorTarget const*) = 0;
   std::string GetUtilityDepend(const cmGeneratorTarget *target);
   typedef std::map<cmGeneratorTarget const*, std::string> UtilityDependsMap;
   UtilityDependsMap UtilityDepends;

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=600af01d41e32d304e43dc98783ec0f7f010f40e
commit 600af01d41e32d304e43dc98783ec0f7f010f40e
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri Oct 23 18:26:46 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Oct 24 09:24:43 2015 +0200

    VS: Port utility depends to cmGeneratorTarget

diff --git a/Source/cmGlobalVisualStudio6Generator.cxx b/Source/cmGlobalVisualStudio6Generator.cxx
index 7d0c558..dd4e871 100644
--- a/Source/cmGlobalVisualStudio6Generator.cxx
+++ b/Source/cmGlobalVisualStudio6Generator.cxx
@@ -310,7 +310,7 @@ void cmGlobalVisualStudio6Generator::WriteProject(std::ostream& fout,
     }
   fout << "}}}\n\n";
 
-  UtilityDependsMap::iterator ui = this->UtilityDepends.find(target->Target);
+  UtilityDependsMap::iterator ui = this->UtilityDepends.find(target);
   if(ui != this->UtilityDepends.end())
     {
     const char* uname = ui->second.c_str();
diff --git a/Source/cmGlobalVisualStudio71Generator.cxx b/Source/cmGlobalVisualStudio71Generator.cxx
index 3152e91..8227b82 100644
--- a/Source/cmGlobalVisualStudio71Generator.cxx
+++ b/Source/cmGlobalVisualStudio71Generator.cxx
@@ -180,7 +180,7 @@ cmGlobalVisualStudio71Generator::WriteProject(std::ostream& fout,
 
   fout <<"EndProject\n";
 
-  UtilityDependsMap::iterator ui = this->UtilityDepends.find(t->Target);
+  UtilityDependsMap::iterator ui = this->UtilityDepends.find(t);
   if(ui != this->UtilityDepends.end())
     {
     const char* uname = ui->second.c_str();
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx
index b2ad365..37f509a 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -704,7 +704,7 @@ void cmGlobalVisualStudio7Generator::WriteProject(std::ostream& fout,
        << dspname << ext << "\", \"{"
        << this->GetGUID(dspname) << "}\"\nEndProject\n";
 
-  UtilityDependsMap::iterator ui = this->UtilityDepends.find(target->Target);
+  UtilityDependsMap::iterator ui = this->UtilityDepends.find(target);
   if(ui != this->UtilityDepends.end())
     {
     const char* uname = ui->second.c_str();
@@ -748,7 +748,7 @@ cmGlobalVisualStudio7Generator
     depcount++;
     }
 
-  UtilityDependsMap::iterator ui = this->UtilityDepends.find(target->Target);
+  UtilityDependsMap::iterator ui = this->UtilityDepends.find(target);
   if(ui != this->UtilityDepends.end())
     {
     const char* uname = ui->second.c_str();
diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx
index eb6a4ef..3e25559 100644
--- a/Source/cmGlobalVisualStudioGenerator.cxx
+++ b/Source/cmGlobalVisualStudioGenerator.cxx
@@ -488,7 +488,7 @@ void cmGlobalVisualStudioGenerator::ComputeVSTargetDepends(
       {
       // Direct dependency on linkable target not allowed.
       // Use an intermediate utility target.
-      vsTargetDepend.insert(this->GetUtilityDepend(dep));
+      vsTargetDepend.insert(this->GetUtilityDepend(dgt));
       }
     }
 }
@@ -508,12 +508,13 @@ void cmGlobalVisualStudioGenerator::FindMakeProgram(cmMakefile* mf)
 
 //----------------------------------------------------------------------------
 std::string
-cmGlobalVisualStudioGenerator::GetUtilityDepend(cmTarget const* target)
+cmGlobalVisualStudioGenerator::GetUtilityDepend(
+        cmGeneratorTarget const* target)
 {
   UtilityDependsMap::iterator i = this->UtilityDepends.find(target);
   if(i == this->UtilityDepends.end())
     {
-    std::string name = this->WriteUtilityDepend(target);
+    std::string name = this->WriteUtilityDepend(target->Target);
     UtilityDependsMap::value_type entry(target, name);
     i = this->UtilityDepends.insert(entry).first;
     }
diff --git a/Source/cmGlobalVisualStudioGenerator.h b/Source/cmGlobalVisualStudioGenerator.h
index 0b0b7b1..6d804d8 100644
--- a/Source/cmGlobalVisualStudioGenerator.h
+++ b/Source/cmGlobalVisualStudioGenerator.h
@@ -129,8 +129,8 @@ protected:
   bool CheckTargetLinks(cmTarget& target, const std::string& name);
   std::string GetUtilityForTarget(cmTarget& target, const std::string&);
   virtual std::string WriteUtilityDepend(cmTarget const*) = 0;
-  std::string GetUtilityDepend(cmTarget const* target);
-  typedef std::map<cmTarget const*, std::string> UtilityDependsMap;
+  std::string GetUtilityDepend(const cmGeneratorTarget *target);
+  typedef std::map<cmGeneratorTarget const*, std::string> UtilityDependsMap;
   UtilityDependsMap UtilityDepends;
 
 protected:

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=330bfa83368989f6fd67072ef9f5c9e457230f17
commit 330bfa83368989f6fd67072ef9f5c9e457230f17
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri Oct 23 18:26:45 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Oct 24 09:24:43 2015 +0200

    VS: Port target depends to cmGeneratorTarget

diff --git a/Source/cmGlobalVisualStudio6Generator.cxx b/Source/cmGlobalVisualStudio6Generator.cxx
index 9e411c9..7d0c558 100644
--- a/Source/cmGlobalVisualStudio6Generator.cxx
+++ b/Source/cmGlobalVisualStudio6Generator.cxx
@@ -299,7 +299,7 @@ void cmGlobalVisualStudio6Generator::WriteProject(std::ostream& fout,
   fout << "Package=<5>\n{{{\n}}}\n\n";
   fout << "Package=<4>\n";
   fout << "{{{\n";
-  VSDependSet const& depends = this->VSTargetDepends[target->Target];
+  VSDependSet const& depends = this->VSTargetDepends[target];
   for(VSDependSet::const_iterator di = depends.begin();
       di != depends.end(); ++di)
     {
diff --git a/Source/cmGlobalVisualStudio71Generator.cxx b/Source/cmGlobalVisualStudio71Generator.cxx
index 77c8fc8..3152e91 100644
--- a/Source/cmGlobalVisualStudio71Generator.cxx
+++ b/Source/cmGlobalVisualStudio71Generator.cxx
@@ -206,7 +206,7 @@ cmGlobalVisualStudio71Generator
                       const std::string&,
                       const char*, cmGeneratorTarget const* target)
 {
-  VSDependSet const& depends = this->VSTargetDepends[target->Target];
+  VSDependSet const& depends = this->VSTargetDepends[target];
   for(VSDependSet::const_iterator di = depends.begin();
       di != depends.end(); ++di)
     {
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx
index 972188f..b2ad365 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -730,7 +730,7 @@ cmGlobalVisualStudio7Generator
 {
   int depcount = 0;
   std::string dspguid = this->GetGUID(dspname);
-  VSDependSet const& depends = this->VSTargetDepends[target->Target];
+  VSDependSet const& depends = this->VSTargetDepends[target];
   for(VSDependSet::const_iterator di = depends.begin();
       di != depends.end(); ++di)
     {
diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx
index 39a7bda..eb6a4ef 100644
--- a/Source/cmGlobalVisualStudioGenerator.cxx
+++ b/Source/cmGlobalVisualStudioGenerator.cxx
@@ -380,7 +380,7 @@ bool cmGlobalVisualStudioGenerator::ComputeTargetDepends()
       for(std::vector<cmGeneratorTarget*>::iterator ti = targets.begin();
           ti != targets.end(); ++ti)
         {
-        this->ComputeVSTargetDepends(*(*ti)->Target);
+        this->ComputeVSTargetDepends(*ti);
         }
       }
     }
@@ -394,13 +394,14 @@ static bool VSLinkable(cmGeneratorTarget const* t)
 }
 
 //----------------------------------------------------------------------------
-void cmGlobalVisualStudioGenerator::ComputeVSTargetDepends(cmTarget& target)
+void cmGlobalVisualStudioGenerator::ComputeVSTargetDepends(
+        cmGeneratorTarget* target)
 {
-  if(this->VSTargetDepends.find(&target) != this->VSTargetDepends.end())
+  if(this->VSTargetDepends.find(target) != this->VSTargetDepends.end())
     {
     return;
     }
-  VSDependSet& vsTargetDepend = this->VSTargetDepends[&target];
+  VSDependSet& vsTargetDepend = this->VSTargetDepends[target];
   // VS <= 7.1 has two behaviors that affect solution dependencies.
   //
   // (1) Solution-level dependencies between a linkable target and a
@@ -420,19 +421,18 @@ void cmGlobalVisualStudioGenerator::ComputeVSTargetDepends(cmTarget& target)
   // leaving them out for the static library itself but following them
   // transitively for other targets.
 
-  bool allowLinkable = (target.GetType() != cmState::STATIC_LIBRARY &&
-                        target.GetType() != cmState::SHARED_LIBRARY &&
-                        target.GetType() != cmState::MODULE_LIBRARY &&
-                        target.GetType() != cmState::EXECUTABLE);
+  bool allowLinkable = (target->GetType() != cmState::STATIC_LIBRARY &&
+                        target->GetType() != cmState::SHARED_LIBRARY &&
+                        target->GetType() != cmState::MODULE_LIBRARY &&
+                        target->GetType() != cmState::EXECUTABLE);
 
-  cmGeneratorTarget* gt = this->GetGeneratorTarget(&target);
-  TargetDependSet const& depends = this->GetTargetDirectDepends(gt);
+  TargetDependSet const& depends = this->GetTargetDirectDepends(target);
 
   // Collect implicit link dependencies (target_link_libraries).
   // Static libraries cannot depend on their link implementation
   // due to behavior (2), but they do not really need to.
   std::set<cmTarget const*> linkDepends;
-  if(target.GetType() != cmState::STATIC_LIBRARY)
+  if(target->GetType() != cmState::STATIC_LIBRARY)
     {
     for(TargetDependSet::const_iterator di = depends.begin();
         di != depends.end(); ++di)
@@ -460,9 +460,9 @@ void cmGlobalVisualStudioGenerator::ComputeVSTargetDepends(cmTarget& target)
   // Collect all targets linked by this target so we can avoid
   // intermediate targets below.
   TargetSet linked;
-  if(target.GetType() != cmState::STATIC_LIBRARY)
+  if(target->GetType() != cmState::STATIC_LIBRARY)
     {
-    linked = this->GetTargetLinkClosure(gt);
+    linked = this->GetTargetLinkClosure(target);
     }
 
   // Emit link dependencies.
diff --git a/Source/cmGlobalVisualStudioGenerator.h b/Source/cmGlobalVisualStudioGenerator.h
index f0bc5dc..0b0b7b1 100644
--- a/Source/cmGlobalVisualStudioGenerator.h
+++ b/Source/cmGlobalVisualStudioGenerator.h
@@ -122,9 +122,9 @@ protected:
 
   virtual bool ComputeTargetDepends();
   class VSDependSet: public std::set<std::string> {};
-  class VSDependMap: public std::map<cmTarget const*, VSDependSet> {};
+  class VSDependMap: public std::map<cmGeneratorTarget const*, VSDependSet> {};
   VSDependMap VSTargetDepends;
-  void ComputeVSTargetDepends(cmTarget&);
+  void ComputeVSTargetDepends(cmGeneratorTarget *);
 
   bool CheckTargetLinks(cmTarget& target, const std::string& name);
   std::string GetUtilityForTarget(cmTarget& target, const std::string&);

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b13e26e278dcc34243a2b31dfca8e23b01e15b76
commit b13e26e278dcc34243a2b31dfca8e23b01e15b76
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri Oct 23 18:26:44 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Oct 24 09:24:30 2015 +0200

    VS: Port ProjectDepends to cmGeneratorTarget.

diff --git a/Source/cmGlobalVisualStudio71Generator.cxx b/Source/cmGlobalVisualStudio71Generator.cxx
index 195aaa0..77c8fc8 100644
--- a/Source/cmGlobalVisualStudio71Generator.cxx
+++ b/Source/cmGlobalVisualStudio71Generator.cxx
@@ -175,7 +175,7 @@ cmGlobalVisualStudio71Generator::WriteProject(std::ostream& fout,
        << this->ConvertToSolutionPath(dir) << (dir[0]? "\\":"")
        << dspname << ext << "\", \"{" << guid << "}\"\n";
   fout << "\tProjectSection(ProjectDependencies) = postProject\n";
-  this->WriteProjectDepends(fout, dspname, dir, *t->Target);
+  this->WriteProjectDepends(fout, dspname, dir, t);
   fout << "\tEndProjectSection\n";
 
   fout <<"EndProject\n";
@@ -204,9 +204,9 @@ void
 cmGlobalVisualStudio71Generator
 ::WriteProjectDepends(std::ostream& fout,
                       const std::string&,
-                      const char*, cmTarget const& target)
+                      const char*, cmGeneratorTarget const* target)
 {
-  VSDependSet const& depends = this->VSTargetDepends[&target];
+  VSDependSet const& depends = this->VSTargetDepends[target->Target];
   for(VSDependSet::const_iterator di = depends.begin();
       di != depends.end(); ++di)
     {
@@ -215,7 +215,7 @@ cmGlobalVisualStudio71Generator
     if(guid.empty())
       {
       std::string m = "Target: ";
-      m += target.GetName();
+      m += target->GetName();
       m += " depends on unknown target: ";
       m += name;
       cmSystemTools::Error(m.c_str());
diff --git a/Source/cmGlobalVisualStudio71Generator.h b/Source/cmGlobalVisualStudio71Generator.h
index 074bce5..5035fda 100644
--- a/Source/cmGlobalVisualStudio71Generator.h
+++ b/Source/cmGlobalVisualStudio71Generator.h
@@ -62,7 +62,7 @@ protected:
                             const cmGeneratorTarget *t);
   virtual void WriteProjectDepends(std::ostream& fout,
                            const std::string& name, const char* path,
-                           cmTarget const& t);
+                           cmGeneratorTarget const* t);
   virtual void WriteProjectConfigurations(
     std::ostream& fout, const std::string& name, cmState::TargetType type,
     std::vector<std::string> const& configs,
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx
index 906166c..972188f 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -533,19 +533,19 @@ void cmGlobalVisualStudio7Generator::WriteTargetDepends(
   for(OrderedTargetDependSet::const_iterator tt =
         projectTargets.begin(); tt != projectTargets.end(); ++tt)
     {
-    cmTarget const* target = (*tt)->Target;
+    cmGeneratorTarget const* target = *tt;
     if(target->GetType() == cmState::INTERFACE_LIBRARY)
       {
       continue;
       }
-    cmMakefile* mf = target->GetMakefile();
     const char *vcprojName =
       target->GetProperty("GENERATOR_FILE_NAME");
     if (vcprojName)
       {
-      std::string dir = mf->GetCurrentSourceDirectory();
+      std::string dir = target->GetLocalGenerator()
+              ->GetCurrentSourceDirectory();
       this->WriteProjectDepends(fout, vcprojName,
-                                dir.c_str(), *target);
+                                dir.c_str(), target);
       }
     }
 }
@@ -726,11 +726,11 @@ void
 cmGlobalVisualStudio7Generator
 ::WriteProjectDepends(std::ostream& fout,
                       const std::string& dspname,
-                      const char*, cmTarget const& target)
+                      const char*, cmGeneratorTarget const* target)
 {
   int depcount = 0;
   std::string dspguid = this->GetGUID(dspname);
-  VSDependSet const& depends = this->VSTargetDepends[&target];
+  VSDependSet const& depends = this->VSTargetDepends[target->Target];
   for(VSDependSet::const_iterator di = depends.begin();
       di != depends.end(); ++di)
     {
@@ -739,7 +739,7 @@ cmGlobalVisualStudio7Generator
     if(guid.empty())
       {
       std::string m = "Target: ";
-      m += target.GetName();
+      m += target->GetName();
       m += " depends on unknown target: ";
       m += name;
       cmSystemTools::Error(m.c_str());
@@ -748,7 +748,7 @@ cmGlobalVisualStudio7Generator
     depcount++;
     }
 
-  UtilityDependsMap::iterator ui = this->UtilityDepends.find(&target);
+  UtilityDependsMap::iterator ui = this->UtilityDepends.find(target->Target);
   if(ui != this->UtilityDepends.end())
     {
     const char* uname = ui->second.c_str();
diff --git a/Source/cmGlobalVisualStudio7Generator.h b/Source/cmGlobalVisualStudio7Generator.h
index a514dcd..eed6f49 100644
--- a/Source/cmGlobalVisualStudio7Generator.h
+++ b/Source/cmGlobalVisualStudio7Generator.h
@@ -126,7 +126,7 @@ protected:
                             const cmGeneratorTarget *t);
   virtual void WriteProjectDepends(std::ostream& fout,
                            const std::string& name, const char* path,
-                           cmTarget const&t);
+                           cmGeneratorTarget const* t);
   virtual void WriteProjectConfigurations(
     std::ostream& fout, const std::string& name, cmState::TargetType type,
     std::vector<std::string> const& configs,
diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx
index a22315c..9b8b9fd 100644
--- a/Source/cmGlobalVisualStudio8Generator.cxx
+++ b/Source/cmGlobalVisualStudio8Generator.cxx
@@ -441,9 +441,9 @@ bool cmGlobalVisualStudio8Generator::ComputeTargetDepends()
 
 //----------------------------------------------------------------------------
 void cmGlobalVisualStudio8Generator::WriteProjectDepends(
-  std::ostream& fout, const std::string&, const char*, cmTarget const& t)
+  std::ostream& fout, const std::string&, const char*,
+        cmGeneratorTarget const* gt)
 {
-  cmGeneratorTarget* gt = this->GetGeneratorTarget(&t);
   TargetDependSet const& unordered = this->GetTargetDirectDepends(gt);
   OrderedTargetDependSet depends(unordered, std::string());
   for(OrderedTargetDependSet::const_iterator i = depends.begin();
diff --git a/Source/cmGlobalVisualStudio8Generator.h b/Source/cmGlobalVisualStudio8Generator.h
index 60c63d1..c05e5fa 100644
--- a/Source/cmGlobalVisualStudio8Generator.h
+++ b/Source/cmGlobalVisualStudio8Generator.h
@@ -91,7 +91,8 @@ protected:
   virtual bool ComputeTargetDepends();
   virtual void WriteProjectDepends(std::ostream& fout,
                                    const std::string& name,
-                                   const char* path, cmTarget const& t);
+                                   const char* path,
+                                   const cmGeneratorTarget *t);
 
   std::string Name;
   std::string WindowsCEVersion;

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

Summary of changes:


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list