[Cmake-commits] CMake branch, next, updated. v3.1.2-1079-gf72dfcb

Stephen Kelly steveire at gmail.com
Fri Feb 6 13:03:35 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  f72dfcb7ccca2d134aa456eb771aee7178bd5675 (commit)
       via  c6c6b26accc13ad50cad5130e44d06d52d6f2c1f (commit)
       via  861b1bd67d3f80ecff62a4598036924c0b527cb6 (commit)
      from  9d3b0dfd93694ffee04c5b4b5795aa7ebf6ca059 (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=f72dfcb7ccca2d134aa456eb771aee7178bd5675
commit f72dfcb7ccca2d134aa456eb771aee7178bd5675
Merge: 9d3b0df c6c6b26
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri Feb 6 13:03:35 2015 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Feb 6 13:03:35 2015 -0500

    Merge topic 'use-algorithms' into next
    
    c6c6b26a Revert "cmListCommand: Use std::find algorithm for FIND subcommand."
    861b1bd6 Revert "Convert a nested loop to use an algorithm."


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c6c6b26accc13ad50cad5130e44d06d52d6f2c1f
commit c6c6b26accc13ad50cad5130e44d06d52d6f2c1f
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri Feb 6 19:01:24 2015 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Fri Feb 6 19:01:24 2015 +0100

    Revert "cmListCommand: Use std::find algorithm for FIND subcommand."
    
    This reverts commit 7b2c2fb83d9973fce37864827024ec4f07de8684.

diff --git a/Source/cmListCommand.cxx b/Source/cmListCommand.cxx
index d24af46..107dca9 100644
--- a/Source/cmListCommand.cxx
+++ b/Source/cmListCommand.cxx
@@ -287,14 +287,18 @@ bool cmListCommand::HandleFindCommand(std::vector<std::string> const& args)
     return true;
     }
 
-  std::vector<std::string>::iterator it =
-      std::find(varArgsExpanded.begin(), varArgsExpanded.end(), args[2]);
-  if (it != varArgsExpanded.end())
+  std::vector<std::string>::iterator it;
+  unsigned int index = 0;
+  for ( it = varArgsExpanded.begin(); it != varArgsExpanded.end(); ++ it )
     {
-    char indexString[32];
-    sprintf(indexString, "%zu", std::distance(varArgsExpanded.begin(), it));
-    this->Makefile->AddDefinition(variableName, indexString);
-    return true;
+    if ( *it == args[2] )
+      {
+      char indexString[32];
+      sprintf(indexString, "%d", index);
+      this->Makefile->AddDefinition(variableName, indexString);
+      return true;
+      }
+    index++;
     }
 
   this->Makefile->AddDefinition(variableName, "-1");

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=861b1bd67d3f80ecff62a4598036924c0b527cb6
commit 861b1bd67d3f80ecff62a4598036924c0b527cb6
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri Feb 6 19:01:14 2015 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Fri Feb 6 19:01:14 2015 +0100

    Revert "Convert a nested loop to use an algorithm."
    
    This reverts commit 3fe17c6d70797ce4d73aac1942c2f6036ce660c8.

diff --git a/Source/cmListCommand.cxx b/Source/cmListCommand.cxx
index f76e428..d24af46 100644
--- a/Source/cmListCommand.cxx
+++ b/Source/cmListCommand.cxx
@@ -372,10 +372,18 @@ bool cmListCommand
   size_t cc;
   for ( cc = 2; cc < args.size(); ++ cc )
     {
-    varArgsExpanded.erase(
-        std::remove(varArgsExpanded.begin(), varArgsExpanded.end(),
-                    args[cc]),
-        varArgsExpanded.end());
+    size_t kk = 0;
+    while ( kk < varArgsExpanded.size() )
+      {
+      if ( varArgsExpanded[kk] == args[cc] )
+        {
+        varArgsExpanded.erase(varArgsExpanded.begin()+kk);
+        }
+      else
+        {
+        kk ++;
+        }
+      }
     }
 
 

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

Summary of changes:
 Source/cmListCommand.cxx |   34 +++++++++++++++++++++++-----------
 1 file changed, 23 insertions(+), 11 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list