[Cmake-commits] CMake branch, next, updated. v3.4.0-rc2-929-gb7fb0ad

Stephen Kelly steveire at gmail.com
Sat Oct 24 03:09:13 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  b7fb0ad756d908018ecc53ab50c153ec22b4bf4a (commit)
       via  5d7a437bcb781a6c8b0d2b29cc2c6cc911de661e (commit)
      from  5a023c8cf5bd0eb30e9a1b6805fdda04f339fb87 (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=b7fb0ad756d908018ecc53ab50c153ec22b4bf4a
commit b7fb0ad756d908018ecc53ab50c153ec22b4bf4a
Merge: 5a023c8 5d7a437
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Oct 24 03:09:12 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sat Oct 24 03:09:12 2015 -0400

    Merge topic 'use-generator-target' into next
    
    5d7a437b VS: Port interface to cmGeneratorTarget


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5d7a437bcb781a6c8b0d2b29cc2c6cc911de661e
commit 5d7a437bcb781a6c8b0d2b29cc2c6cc911de661e
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:08:58 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..e185c8e 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 =
+        this->FindGeneratorTarget(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(

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

Summary of changes:


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list