[Cmake-commits] CMake branch, next, updated. v2.8.12.1-6887-g79c53ac

Stephen Kelly steveire at gmail.com
Wed Jan 8 17:16:16 EST 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  79c53ac951d837d224ec9a582fc933cc0bb608f6 (commit)
       via  b6597e5fcac5974336e5b965acce382f934757ff (commit)
       via  f6b938d020f91ab752b226b72e922619c3de94d5 (commit)
      from  2fd6d081371b9359cbba6bf14abfea5ebe7784bf (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=79c53ac951d837d224ec9a582fc933cc0bb608f6
commit 79c53ac951d837d224ec9a582fc933cc0bb608f6
Merge: 2fd6d08 b6597e5
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Wed Jan 8 17:16:15 2014 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Jan 8 17:16:15 2014 -0500

    Merge topic 'minor-cleanups' into next
    
    b6597e5 Fix width.
    f6b938d Use out-vectors instead of return values.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b6597e5fcac5974336e5b965acce382f934757ff
commit b6597e5fcac5974336e5b965acce382f934757ff
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Wed Jan 8 22:56:25 2014 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Wed Jan 8 23:13:57 2014 +0100

    Fix width.

diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 0791a10..7f90078 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -430,7 +430,8 @@ void cmMakefileTargetGenerator::WriteObjectRuleFiles(cmSourceFile& source)
     }
 
   // Get the full path name of the object file.
-  std::string const& objectName = this->GeneratorTarget->GetObjectName(&source);
+  std::string const& objectName = this->GeneratorTarget
+                                      ->GetObjectName(&source);
   std::string obj = this->LocalGenerator->GetTargetDirectory(*this->Target);
   obj += "/";
   obj += objectName;

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f6b938d020f91ab752b226b72e922619c3de94d5
commit f6b938d020f91ab752b226b72e922619c3de94d5
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Wed Jan 8 22:55:04 2014 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Wed Jan 8 23:13:57 2014 +0100

    Use out-vectors instead of return values.

diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 498b3ec..5cd1f42 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -135,46 +135,49 @@ bool cmGeneratorTarget::HasExplicitObjectName(cmSourceFile const* file) const
 }
 
 //----------------------------------------------------------------------------
-std::vector<cmSourceFile*> const& cmGeneratorTarget::GetResxSources() const
+void cmGeneratorTarget::GetResxSources(std::vector<cmSourceFile*>& srcs) const
 {
-  return this->ResxSources;
+  srcs = this->ResxSources;
 }
 
 //----------------------------------------------------------------------------
-std::vector<cmSourceFile*> const& cmGeneratorTarget::GetIDLSources() const
+void cmGeneratorTarget::GetIDLSources(std::vector<cmSourceFile*>& srcs) const
 {
-  return this->IDLSources;
+  srcs = this->IDLSources;
 }
 
 //----------------------------------------------------------------------------
-std::vector<cmSourceFile*> const& cmGeneratorTarget::GetHeaderSources() const
+void
+cmGeneratorTarget::GetHeaderSources(std::vector<cmSourceFile*>& srcs) const
 {
-  return this->HeaderSources;
+  srcs = this->HeaderSources;
 }
 
 //----------------------------------------------------------------------------
-std::vector<cmSourceFile*> const& cmGeneratorTarget::GetExtraSources() const
+void cmGeneratorTarget::GetExtraSources(std::vector<cmSourceFile*>& srcs) const
 {
-  return this->ExtraSources;
+  srcs = this->ExtraSources;
 }
 
 //----------------------------------------------------------------------------
-std::vector<cmSourceFile*> const& cmGeneratorTarget::GetCustomCommands() const
+void
+cmGeneratorTarget::GetCustomCommands(std::vector<cmSourceFile*>& srcs) const
 {
-  return this->CustomCommands;
+  srcs = this->CustomCommands;
 }
 
 //----------------------------------------------------------------------------
-std::set<std::string> const& cmGeneratorTarget::GetExpectedResxHeaders() const
+void
+cmGeneratorTarget::GetExpectedResxHeaders(std::set<std::string>& srcs) const
 {
-  return this->ExpectedResxHeaders;
+  srcs = this->ExpectedResxHeaders;
 }
 
 //----------------------------------------------------------------------------
-std::vector<cmSourceFile*> const&
-cmGeneratorTarget::GetExternalObjects() const
+void
+cmGeneratorTarget::GetExternalObjects(std::vector<cmSourceFile*>& srcs) const
 {
-  return this->ExternalObjects;
+  srcs = this->ExternalObjects;
 }
 
 //----------------------------------------------------------------------------
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index 3390b2f..17a223a 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -39,13 +39,13 @@ public:
   bool HasExplicitObjectName(cmSourceFile const* file) const;
   void AddExplicitObjectName(cmSourceFile* sf);
 
-  std::vector<cmSourceFile*> const& GetResxSources() const;
-  std::vector<cmSourceFile*> const& GetIDLSources() const;
-  std::vector<cmSourceFile*> const& GetExternalObjects() const;
-  std::vector<cmSourceFile*> const& GetHeaderSources() const;
-  std::vector<cmSourceFile*> const& GetExtraSources() const;
-  std::vector<cmSourceFile*> const& GetCustomCommands() const;
-  std::set<std::string> const& GetExpectedResxHeaders() const;
+  void GetResxSources(std::vector<cmSourceFile*>&) const;
+  void GetIDLSources(std::vector<cmSourceFile*>&) const;
+  void GetExternalObjects(std::vector<cmSourceFile*>&) const;
+  void GetHeaderSources(std::vector<cmSourceFile*>&) const;
+  void GetExtraSources(std::vector<cmSourceFile*>&) const;
+  void GetCustomCommands(std::vector<cmSourceFile*>&) const;
+  void GetExpectedResxHeaders(std::set<std::string>&) const;
 
   cmTarget* Target;
   cmMakefile* Makefile;
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 9c34bb7..0791a10 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -151,9 +151,11 @@ void cmMakefileTargetGenerator::WriteTargetBuildRules()
 
   // First generate the object rule files.  Save a list of all object
   // files for this target.
+  std::vector<cmSourceFile*> customCommands;
+  this->GeneratorTarget->GetCustomCommands(customCommands);
   for(std::vector<cmSourceFile*>::const_iterator
-        si = this->GeneratorTarget->GetCustomCommands().begin();
-      si != this->GeneratorTarget->GetCustomCommands().end(); ++si)
+        si = customCommands.begin();
+      si != customCommands.end(); ++si)
     {
     cmCustomCommand const* cc = (*si)->GetCustomCommand();
     this->GenerateCustomRuleFile(*cc);
@@ -170,15 +172,21 @@ void cmMakefileTargetGenerator::WriteTargetBuildRules()
         }
       }
     }
+  std::vector<cmSourceFile*> headerSources;
+  this->GeneratorTarget->GetHeaderSources(headerSources);
   this->OSXBundleGenerator->GenerateMacOSXContentStatements(
-    this->GeneratorTarget->GetHeaderSources(),
+    headerSources,
     this->MacOSXContentGenerator);
+  std::vector<cmSourceFile*> extraSources;
+  this->GeneratorTarget->GetExtraSources(extraSources);
   this->OSXBundleGenerator->GenerateMacOSXContentStatements(
-    this->GeneratorTarget->GetExtraSources(),
+    extraSources,
     this->MacOSXContentGenerator);
+  std::vector<cmSourceFile*> externalObjects;
+  this->GeneratorTarget->GetExternalObjects(externalObjects);
   for(std::vector<cmSourceFile*>::const_iterator
-        si = this->GeneratorTarget->GetExternalObjects().begin();
-      si != this->GeneratorTarget->GetExternalObjects().end(); ++si)
+        si = externalObjects.begin();
+      si != externalObjects.end(); ++si)
     {
     this->ExternalObjects.push_back((*si)->GetFullPath());
     }
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index cd657d8..82f8d1b 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -459,22 +459,30 @@ cmNinjaTargetGenerator
     << this->GetTargetName()
     << "\n\n";
 
+  std::vector<cmSourceFile*> customCommands;
+  this->GeneratorTarget->GetCustomCommands(customCommands);
   for(std::vector<cmSourceFile*>::const_iterator
-        si = this->GeneratorTarget->GetCustomCommands().begin();
-      si != this->GeneratorTarget->GetCustomCommands().end(); ++si)
+        si = customCommands.begin();
+      si != customCommands.end(); ++si)
      {
      cmCustomCommand const* cc = (*si)->GetCustomCommand();
      this->GetLocalGenerator()->AddCustomCommandTarget(cc, this->GetTarget());
      }
+  std::vector<cmSourceFile*> headerSources;
+  this->GeneratorTarget->GetHeaderSources(headerSources);
   this->OSXBundleGenerator->GenerateMacOSXContentStatements(
-    this->GeneratorTarget->GetHeaderSources(),
+    headerSources,
     this->MacOSXContentGenerator);
+  std::vector<cmSourceFile*> extraSources;
+  this->GeneratorTarget->GetExtraSources(extraSources);
   this->OSXBundleGenerator->GenerateMacOSXContentStatements(
-    this->GeneratorTarget->GetExtraSources(),
+    extraSources,
     this->MacOSXContentGenerator);
+  std::vector<cmSourceFile*> externalObjects;
+  this->GeneratorTarget->GetExternalObjects(externalObjects);
   for(std::vector<cmSourceFile*>::const_iterator
-        si = this->GeneratorTarget->GetExternalObjects().begin();
-      si != this->GeneratorTarget->GetExternalObjects().end(); ++si)
+        si = externalObjects.begin();
+      si != externalObjects.end(); ++si)
     {
     this->Objects.push_back(this->GetSourceFilePath(*si));
     }
@@ -541,9 +549,11 @@ cmNinjaTargetGenerator
   }
 
   // Add order-only dependencies on custom command outputs.
+  std::vector<cmSourceFile*> customCommands;
+  this->GeneratorTarget->GetCustomCommands(customCommands);
   for(std::vector<cmSourceFile*>::const_iterator
-        si = this->GeneratorTarget->GetCustomCommands().begin();
-      si != this->GeneratorTarget->GetCustomCommands().end(); ++si)
+        si = customCommands.begin();
+      si != customCommands.end(); ++si)
     {
     cmCustomCommand const* cc = (*si)->GetCustomCommand();
     const std::vector<std::string>& ccoutputs = cc->GetOutputs();
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 62fc16f..30fcce7 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -376,8 +376,8 @@ void cmVisualStudio10TargetGenerator::WriteDotNetReferences()
 
 void cmVisualStudio10TargetGenerator::WriteEmbeddedResourceGroup()
 {
-  std::vector<cmSourceFile*> const& resxObjs =
-    this->GeneratorTarget->GetResxSources();
+  std::vector<cmSourceFile*> resxObjs;
+    this->GeneratorTarget->GetResxSources(resxObjs);
   if(!resxObjs.empty())
     {
     this->WriteString("<ItemGroup>\n", 1);
@@ -550,9 +550,11 @@ void cmVisualStudio10TargetGenerator::WriteProjectConfigurationValues()
 void cmVisualStudio10TargetGenerator::WriteCustomCommands()
 {
   this->SourcesVisited.clear();
+  std::vector<cmSourceFile*> customCommands;
+  this->GeneratorTarget->GetCustomCommands(customCommands);
   for(std::vector<cmSourceFile*>::const_iterator
-        si = this->GeneratorTarget->GetCustomCommands().begin();
-      si != this->GeneratorTarget->GetCustomCommands().end(); ++si)
+        si = customCommands.begin();
+      si != customCommands.end(); ++si)
     {
     this->WriteCustomCommand(*si);
     }
@@ -741,8 +743,8 @@ void cmVisualStudio10TargetGenerator::WriteGroups()
     this->WriteGroupSources(ti->first.c_str(), ti->second, sourceGroups);
     }
 
-  std::vector<cmSourceFile*> const& resxObjs =
-    this->GeneratorTarget->GetResxSources();
+  std::vector<cmSourceFile*> resxObjs;
+    this->GeneratorTarget->GetResxSources(resxObjs);
   if(!resxObjs.empty())
     {
     this->WriteString("<ItemGroup>\n", 1);
@@ -814,7 +816,9 @@ void cmVisualStudio10TargetGenerator::WriteGroups()
     this->WriteString("</Filter>\n", 2);
     }
 
-  if(!this->GeneratorTarget->GetResxSources().empty())
+  std::vector<cmSourceFile*> resxObjs;
+  this->GeneratorTarget->GetResxSources(resxObjs);
+  if(!resxObjs.empty())
     {
     this->WriteString("<Filter Include=\"Resource Files\">\n", 2);
     std::string guidName = "SG_Filter_Resource Files";
@@ -997,8 +1001,12 @@ void cmVisualStudio10TargetGenerator::WriteAllSources()
     }
   this->WriteString("<ItemGroup>\n", 1);
 
-  this->WriteSources("ClInclude", this->GeneratorTarget->GetHeaderSources());
-  this->WriteSources("Midl", this->GeneratorTarget->GetIDLSources());
+  std::vector<cmSourceFile*> headerSources;
+  this->GeneratorTarget->GetHeaderSources(headerSources);
+  this->WriteSources("ClInclude", headerSources);
+  std::vector<cmSourceFile*> idlSources;
+  this->GeneratorTarget->GetIDLSources(idlSources);
+  this->WriteSources("Midl", idlSources);
 
   std::vector<cmSourceFile*> objectSources;
   this->GeneratorTarget->GetObjectSources(objectSources);
@@ -1045,15 +1053,17 @@ void cmVisualStudio10TargetGenerator::WriteAllSources()
     {
     // For VS >= 11 we use LinkObjects to avoid linking custom command
     // outputs.  Use Object for all external objects, generated or not.
-    this->WriteSources("Object", this->GeneratorTarget->GetExternalObjects());
+    std::vector<cmSourceFile*> externalObjects;
+    this->GeneratorTarget->GetExternalObjects(externalObjects);
+    this->WriteSources("Object", externalObjects);
     }
   else
     {
     // If an object file is generated in this target, then vs10 will use
     // it in the build, and we have to list it as None instead of Object.
     for(std::vector<cmSourceFile*>::const_iterator
-          si = this->GeneratorTarget->GetExternalObjects().begin();
-        si != this->GeneratorTarget->GetExternalObjects().end(); ++si)
+          si = externalObjects.begin();
+        si != externalObjects.end(); ++si)
       {
       std::vector<cmSourceFile*> const* d =
                                 this->GeneratorTarget->GetSourceDepends(*si);
@@ -1061,7 +1071,9 @@ void cmVisualStudio10TargetGenerator::WriteAllSources()
       }
     }
 
-  this->WriteSources("None", this->GeneratorTarget->GetExtraSources());
+  std::vector<cmSourceFile*> extraSources;
+  this->GeneratorTarget->GetExtraSources(extraSources);
+  this->WriteSources("None", extraSources);
 
   // Add object library contents as external objects.
   std::vector<std::string> objs;
@@ -1884,8 +1896,10 @@ void cmVisualStudio10TargetGenerator::WriteProjectReferences()
 bool cmVisualStudio10TargetGenerator::
   IsResxHeader(const std::string& headerFile)
 {
-  std::set<std::string>::const_iterator it =
-      this->GeneratorTarget->GetExpectedResxHeaders().find(headerFile);
+  std::set<std::string> expectedResxHeaders;
+  this->GeneratorTarget->GetExpectedResxHeaders(expectedResxHeaders);
 
-  return it != this->GeneratorTarget->GetExpectedResxHeaders().end();
+  std::set<std::string>::const_iterator it =
+                                        expectedResxHeaders.find(headerFile);
+  return it != expectedResxHeaders.end();
 }

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

Summary of changes:
 Source/cmGeneratorTarget.cxx               |   33 +++++++++++---------
 Source/cmGeneratorTarget.h                 |   14 ++++----
 Source/cmMakefileTargetGenerator.cxx       |   23 ++++++++++----
 Source/cmNinjaTargetGenerator.cxx          |   26 +++++++++++-----
 Source/cmVisualStudio10TargetGenerator.cxx |   46 ++++++++++++++++++----------
 5 files changed, 89 insertions(+), 53 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list