[Cmake-commits] CMake branch, next, updated. v3.1.3-1335-g3df0a0a

Stephen Kelly steveire at gmail.com
Thu Feb 12 14:31:25 EST 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  3df0a0aa91f24dbd08d310e13cd44e8d88524922 (commit)
       via  78757e7ffce9fb6297a2d501989e9b172e6151dc (commit)
       via  fc1cf2654de04ed8f6954dc1907ab1dcb8bb946e (commit)
       via  e5ebeae768a8310b5cfdce0aeff9419e1de51eaa (commit)
      from  2aa7f9aec3ab5608b8a5f38c6d07bf647bc2c084 (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=3df0a0aa91f24dbd08d310e13cd44e8d88524922
commit 3df0a0aa91f24dbd08d310e13cd44e8d88524922
Merge: 2aa7f9a 78757e7
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Feb 12 14:31:24 2015 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Feb 12 14:31:24 2015 -0500

    Merge topic 'clean-up-cmFunctionCommand' into next
    
    78757e7f cmFunctionCommand: Replace loops with cmJoin.
    fc1cf265 cmFunctionCommand: Remove counting variable.
    e5ebeae7 cmFunctionCommand: Split loop in two.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=78757e7ffce9fb6297a2d501989e9b172e6151dc
commit 78757e7ffce9fb6297a2d501989e9b172e6151dc
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Wed Feb 11 23:33:03 2015 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Thu Feb 12 20:25:21 2015 +0100

    cmFunctionCommand: Replace loops with cmJoin.

diff --git a/Source/cmFunctionCommand.cxx b/Source/cmFunctionCommand.cxx
index 088a697..a4d9357 100644
--- a/Source/cmFunctionCommand.cxx
+++ b/Source/cmFunctionCommand.cxx
@@ -126,25 +126,10 @@ bool cmFunctionHelperCommand::InvokeInitialPass
     }
 
   // define ARGV and ARGN
-  std::vector<std::string>::const_iterator eit;
-  std::string argvDef;
-  for ( eit = expandedArgs.begin(); eit != expandedArgs.end(); ++eit )
-    {
-    if (!argvDef.empty())
-      {
-      argvDef += ";";
-      }
-    argvDef += *eit;
-    }
-  std::string argnDef;
-  eit = expandedArgs.begin() + (this->Args.size()-1);
-  for ( ; eit != expandedArgs.end(); ++eit)
-    if (!argnDef.empty())
-      {
-      argnDef += ";";
-      }
-    argnDef += *eit;
-    }
+  std::string argvDef = cmJoin(expandedArgs, ";");
+  std::vector<std::string>::const_iterator eit
+      = expandedArgs.begin() + (this->Args.size()-1);
+  std::string argnDef = cmJoin(cmRange(eit, expandedArgs.end()), ";");
   this->Makefile->AddDefinition("ARGV", argvDef.c_str());
   this->Makefile->MarkVariableAsUsed("ARGV");
   this->Makefile->AddDefinition("ARGN", argnDef.c_str());

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fc1cf2654de04ed8f6954dc1907ab1dcb8bb946e
commit fc1cf2654de04ed8f6954dc1907ab1dcb8bb946e
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Wed Feb 11 23:31:22 2015 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Thu Feb 12 20:25:21 2015 +0100

    cmFunctionCommand: Remove counting variable.
    
    Start iteration at correct starting point directly.

diff --git a/Source/cmFunctionCommand.cxx b/Source/cmFunctionCommand.cxx
index a0a14e8..088a697 100644
--- a/Source/cmFunctionCommand.cxx
+++ b/Source/cmFunctionCommand.cxx
@@ -137,17 +137,13 @@ bool cmFunctionHelperCommand::InvokeInitialPass
     argvDef += *eit;
     }
   std::string argnDef;
-  unsigned int cnt = 0;
-  for ( eit = expandedArgs.begin(); eit != expandedArgs.end(); ++eit )
-    if ( cnt >= this->Args.size()-1 )
+  eit = expandedArgs.begin() + (this->Args.size()-1);
+  for ( ; eit != expandedArgs.end(); ++eit)
+    if (!argnDef.empty())
       {
-      if (!argnDef.empty())
-        {
-        argnDef += ";";
-        }
-      argnDef += *eit;
+      argnDef += ";";
       }
-    cnt ++;
+    argnDef += *eit;
     }
   this->Makefile->AddDefinition("ARGV", argvDef.c_str());
   this->Makefile->MarkVariableAsUsed("ARGV");

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e5ebeae768a8310b5cfdce0aeff9419e1de51eaa
commit e5ebeae768a8310b5cfdce0aeff9419e1de51eaa
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Wed Feb 11 23:29:04 2015 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Thu Feb 12 20:25:20 2015 +0100

    cmFunctionCommand: Split loop in two.

diff --git a/Source/cmFunctionCommand.cxx b/Source/cmFunctionCommand.cxx
index b44e228..a0a14e8 100644
--- a/Source/cmFunctionCommand.cxx
+++ b/Source/cmFunctionCommand.cxx
@@ -128,8 +128,6 @@ bool cmFunctionHelperCommand::InvokeInitialPass
   // define ARGV and ARGN
   std::vector<std::string>::const_iterator eit;
   std::string argvDef;
-  std::string argnDef;
-  unsigned int cnt = 0;
   for ( eit = expandedArgs.begin(); eit != expandedArgs.end(); ++eit )
     {
     if (!argvDef.empty())
@@ -137,6 +135,10 @@ bool cmFunctionHelperCommand::InvokeInitialPass
       argvDef += ";";
       }
     argvDef += *eit;
+    }
+  std::string argnDef;
+  unsigned int cnt = 0;
+  for ( eit = expandedArgs.begin(); eit != expandedArgs.end(); ++eit )
     if ( cnt >= this->Args.size()-1 )
       {
       if (!argnDef.empty())

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

Summary of changes:
 Source/cmFunctionCommand.cxx |   25 ++++---------------------
 1 file changed, 4 insertions(+), 21 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list