[Cmake-commits] CMake branch, next, updated. v3.0.0-rc1-1070-gb2a3672

Stephen Kelly steveire at gmail.com
Sat Mar 15 04:29:08 EDT 2014


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  b2a3672e54584f6c17448bfc5a2ac97db46e6dc3 (commit)
       via  c6ed80f0d879720ec5d0e26bf8c37350ee81d9f3 (commit)
      from  b27fc923f1da5c208fd0ff9356fc9ee888b611fe (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=b2a3672e54584f6c17448bfc5a2ac97db46e6dc3
commit b2a3672e54584f6c17448bfc5a2ac97db46e6dc3
Merge: b27fc92 c6ed80f
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Mar 15 04:29:08 2014 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sat Mar 15 04:29:08 2014 -0400

    Merge topic 'target-objects-refactor' into next
    
    c6ed80f0 Revert "cmGlobalGenerator: Make ComputeTargetObjects non-virtual"


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c6ed80f0d879720ec5d0e26bf8c37350ee81d9f3
commit c6ed80f0d879720ec5d0e26bf8c37350ee81d9f3
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Mar 15 09:28:40 2014 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Mar 15 09:28:40 2014 +0100

    Revert "cmGlobalGenerator: Make ComputeTargetObjects non-virtual"
    
    This reverts commit 67dd2c6f3d9250e5089fec0f1289ae6315ec4715.

diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 5b6d729..c9ae799 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1516,26 +1516,9 @@ cmGlobalGenerator::GetGeneratorTarget(cmTarget const* t) const
 }
 
 //----------------------------------------------------------------------------
-void cmGlobalGenerator::ComputeTargetObjects(cmGeneratorTarget* gt) const
+void cmGlobalGenerator::ComputeTargetObjects(cmGeneratorTarget*) const
 {
-  std::vector<cmSourceFile const*> objectSources;
-  gt->GetObjectSources(objectSources);
-
-  std::map<cmSourceFile const*, std::string> mapping;
-  for(std::vector<cmSourceFile const*>::const_iterator it
-      = objectSources.begin(); it != objectSources.end(); ++it)
-    {
-    mapping[*it];
-    }
-
-  gt->LocalGenerator->ComputeObjectFilenames(mapping, gt);
-
-  for(std::map<cmSourceFile const*, std::string>::const_iterator it
-      = mapping.begin(); it != mapping.end(); ++it)
-    {
-    assert(!it->second.empty());
-    gt->AddObject(it->first, it->second);
-    }
+  // Implemented in generator subclasses that need this.
 }
 
 //----------------------------------------------------------------------------
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index 49a418d..ed07b10 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -443,7 +443,7 @@ private:
   void CreateGeneratorTargets(cmMakefile* mf);
   void CreateGeneratorTargets();
   void ComputeGeneratorTargetObjects();
-  void ComputeTargetObjects(cmGeneratorTarget* gt) const;
+  virtual void ComputeTargetObjects(cmGeneratorTarget* gt) const;
 
   void ClearGeneratorMembers();
 
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index 49ce1b5..08507eb 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -632,6 +632,29 @@ std::string cmGlobalNinjaGenerator::GetEditCacheCommand() const
   return cmSystemTools::GetCMakeGUICommand();
 }
 
+// TODO: Refactor to combine with cmGlobalUnixMakefileGenerator3 impl.
+void cmGlobalNinjaGenerator::ComputeTargetObjects(cmGeneratorTarget* gt) const
+{
+  std::vector<cmSourceFile const*> objectSources;
+  gt->GetObjectSources(objectSources);
+
+  std::map<cmSourceFile const*, std::string> mapping;
+  for(std::vector<cmSourceFile const*>::const_iterator it
+      = objectSources.begin(); it != objectSources.end(); ++it)
+    {
+    mapping[*it];
+    }
+
+  gt->LocalGenerator->ComputeObjectFilenames(mapping, gt);
+
+  for(std::map<cmSourceFile const*, std::string>::const_iterator it
+      = mapping.begin(); it != mapping.end(); ++it)
+    {
+    assert(!it->second.empty());
+    gt->AddObject(it->first, it->second);
+    }
+}
+
 //----------------------------------------------------------------------------
 void cmGlobalNinjaGenerator
 ::ComputeTargetObjectDirectory(cmGeneratorTarget* gt) const
diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h
index f2643af..e3a22e5 100644
--- a/Source/cmGlobalNinjaGenerator.h
+++ b/Source/cmGlobalNinjaGenerator.h
@@ -310,6 +310,8 @@ protected:
 private:
   virtual std::string GetEditCacheCommand() const;
 
+  /// @see cmGlobalGenerator::ComputeTargetObjects
+  virtual void ComputeTargetObjects(cmGeneratorTarget* gt) const;
 
   void OpenBuildFileStream();
   void CloseBuildFileStream();
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx
index 4632071..91258ed0 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@ -106,6 +106,30 @@ std::string cmGlobalUnixMakefileGenerator3::GetEditCacheCommand() const
 //----------------------------------------------------------------------------
 void
 cmGlobalUnixMakefileGenerator3
+::ComputeTargetObjects(cmGeneratorTarget* gt) const
+{
+  std::vector<cmSourceFile const*> objectSources;
+  gt->GetObjectSources(objectSources);
+
+  std::map<cmSourceFile const*, std::string> mapping;
+  for(std::vector<cmSourceFile const*>::const_iterator it
+      = objectSources.begin(); it != objectSources.end(); ++it)
+    {
+    mapping[*it];
+    }
+
+  gt->LocalGenerator->ComputeObjectFilenames(mapping, gt);
+
+  for(std::map<cmSourceFile const*, std::string>::const_iterator it
+      = mapping.begin(); it != mapping.end(); ++it)
+    {
+    gt->AddObject(it->first, it->second);
+    }
+}
+
+//----------------------------------------------------------------------------
+void
+cmGlobalUnixMakefileGenerator3
 ::ComputeTargetObjectDirectory(cmGeneratorTarget* gt) const
 {
   cmTarget* target = gt->Target;
diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h
index d003789..42453f2 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.h
+++ b/Source/cmGlobalUnixMakefileGenerator3.h
@@ -199,6 +199,7 @@ protected:
 private:
   virtual const char* GetBuildIgnoreErrorsFlag() const { return "-i"; }
   virtual std::string GetEditCacheCommand() const;
+  virtual void ComputeTargetObjects(cmGeneratorTarget* gt) const;
 };
 
 #endif
diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx
index 749517c..9740fbf 100644
--- a/Source/cmGlobalVisualStudioGenerator.cxx
+++ b/Source/cmGlobalVisualStudioGenerator.cxx
@@ -118,6 +118,30 @@ void cmGlobalVisualStudioGenerator::Generate()
 }
 
 //----------------------------------------------------------------------------
+void
+cmGlobalVisualStudioGenerator
+::ComputeTargetObjects(cmGeneratorTarget* gt) const
+{
+  std::vector<cmSourceFile const*> objectSources;
+  gt->GetObjectSources(objectSources);
+
+  std::map<cmSourceFile const*, std::string> mapping;
+  for(std::vector<cmSourceFile const*>::const_iterator it
+      = objectSources.begin(); it != objectSources.end(); ++it)
+    {
+    mapping[*it];
+    }
+
+  gt->LocalGenerator->ComputeObjectFilenames(mapping, gt);
+
+  for(std::map<cmSourceFile const*, std::string>::const_iterator it
+      = mapping.begin(); it != mapping.end(); ++it)
+    {
+    gt->AddObject(it->first, it->second);
+    }
+}
+
+//----------------------------------------------------------------------------
 void cmGlobalVisualStudioGenerator
 ::ComputeTargetObjectDirectory(cmGeneratorTarget* gt) const
 {
diff --git a/Source/cmGlobalVisualStudioGenerator.h b/Source/cmGlobalVisualStudioGenerator.h
index 1ab8990..f957056 100644
--- a/Source/cmGlobalVisualStudioGenerator.h
+++ b/Source/cmGlobalVisualStudioGenerator.h
@@ -117,6 +117,7 @@ private:
   virtual std::string GetVSMakeProgram() = 0;
   void PrintCompilerAdvice(std::ostream&, std::string const&,
                            const char*) const {}
+  void ComputeTargetObjects(cmGeneratorTarget* gt) const;
 
   void FollowLinkDepends(cmTarget const* target,
                          std::set<cmTarget const*>& linked);
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index d4eb85b..0a4b51c 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -3934,6 +3934,30 @@ bool cmGlobalXCodeGenerator::IsMultiConfig()
   return true;
 }
 
+ //----------------------------------------------------------------------------
+void
+cmGlobalXCodeGenerator
+::ComputeTargetObjects(cmGeneratorTarget* gt) const
+{
+  std::vector<cmSourceFile const*> objectSources;
+  gt->GetObjectSources(objectSources);
+
+  std::map<cmSourceFile const*, std::string> mapping;
+  for(std::vector<cmSourceFile const*>::const_iterator it
+      = objectSources.begin(); it != objectSources.end(); ++it)
+    {
+    mapping[*it];
+    }
+
+  gt->LocalGenerator->ComputeObjectFilenames(mapping, gt);
+
+  for(std::map<cmSourceFile const*, std::string>::const_iterator it
+      = mapping.begin(); it != mapping.end(); ++it)
+    {
+    gt->AddObject(it->first, it->second);
+    }
+}
+
 //----------------------------------------------------------------------------
 void cmGlobalXCodeGenerator
 ::ComputeTargetObjectDirectory(cmGeneratorTarget* gt) const
diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h
index 23616b4..f9dd58f 100644
--- a/Source/cmGlobalXCodeGenerator.h
+++ b/Source/cmGlobalXCodeGenerator.h
@@ -217,6 +217,7 @@ protected:
 private:
   void PrintCompilerAdvice(std::ostream&, std::string const&,
                            const char*) const {}
+  void ComputeTargetObjects(cmGeneratorTarget* gt) const;
 
   std::string GetObjectsNormalDirectory(
     const std::string &projName,

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

Summary of changes:
 Source/cmGlobalGenerator.cxx              |   21 ++-------------------
 Source/cmGlobalGenerator.h                |    2 +-
 Source/cmGlobalNinjaGenerator.cxx         |   23 +++++++++++++++++++++++
 Source/cmGlobalNinjaGenerator.h           |    2 ++
 Source/cmGlobalUnixMakefileGenerator3.cxx |   24 ++++++++++++++++++++++++
 Source/cmGlobalUnixMakefileGenerator3.h   |    1 +
 Source/cmGlobalVisualStudioGenerator.cxx  |   24 ++++++++++++++++++++++++
 Source/cmGlobalVisualStudioGenerator.h    |    1 +
 Source/cmGlobalXCodeGenerator.cxx         |   24 ++++++++++++++++++++++++
 Source/cmGlobalXCodeGenerator.h           |    1 +
 10 files changed, 103 insertions(+), 20 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list