[Cmake-commits] CMake branch, next, updated. v2.8.10.2-2358-g466d4c7

Stephen Kelly steveire at gmail.com
Thu Feb 28 11:59:40 EST 2013


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  466d4c7333cae2467eb6fd1e5169054677a89fae (commit)
       via  f93a388c9c65ae9c8f74055e18ddf85be10a8a34 (commit)
      from  810d5c6d5f66f3d4f04cf69cb83b76e5f21d2ca1 (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=466d4c7333cae2467eb6fd1e5169054677a89fae
commit 466d4c7333cae2467eb6fd1e5169054677a89fae
Merge: 810d5c6 f93a388
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Feb 28 11:59:39 2013 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Feb 28 11:59:39 2013 -0500

    Merge topic 'fix-genex-split-duplication' into next
    
    f93a388 Fix the cmGeneratorExpression::Split when leading chars are present.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f93a388c9c65ae9c8f74055e18ddf85be10a8a34
commit f93a388c9c65ae9c8f74055e18ddf85be10a8a34
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Feb 28 17:39:27 2013 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Thu Feb 28 17:54:11 2013 +0100

    Fix the cmGeneratorExpression::Split when leading chars are present.
    
    In the case of input like
    
     foo$<1:bar>
    
    the preGenex should be 'foo'. In that case, the search for a ';'
    will not find one, and there is no preceding input to process as a
    non-genex list.
    
    Previously, the result of 'splitting' such a string would instead
    be a vector containing the same string two times.

diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx
index 34d80ec..7ea58fa 100644
--- a/Source/cmGeneratorExpression.cxx
+++ b/Source/cmGeneratorExpression.cxx
@@ -302,12 +302,20 @@ void cmGeneratorExpression::Split(const std::string &input,
     if (!part.empty())
       {
       std::string::size_type startPos = input.rfind(";", pos);
-      if (startPos != pos - 1 && startPos >= lastPos)
+      if (startPos == std::string::npos)
+        {
+        preGenex = part;
+        part = "";
+        }
+      else if (startPos != pos - 1 && startPos >= lastPos)
         {
         part = input.substr(lastPos, startPos - lastPos);
         preGenex = input.substr(startPos + 1, pos - startPos - 1);
         }
-      cmSystemTools::ExpandListArgument(part.c_str(), output);
+      if(!part.empty())
+        {
+        cmSystemTools::ExpandListArgument(part.c_str(), output);
+        }
       }
     pos += 2;
     int nestingLevel = 1;

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

Summary of changes:
 Source/cmGeneratorExpression.cxx |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list