[Cmake-commits] CMake branch, next, updated. v2.8.11.2-4171-ga869622

Stephen Kelly steveire at gmail.com
Fri Sep 13 12:22:01 EDT 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  a8696225f7f4ff5668bc70b14fc5af30a1effcaa (commit)
       via  70089d0769902c58da925eb571ad430bec40e9da (commit)
      from  054acd0a4fb7f6fe0024d2b195fbb4d553c4ab9d (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=a8696225f7f4ff5668bc70b14fc5af30a1effcaa
commit a8696225f7f4ff5668bc70b14fc5af30a1effcaa
Merge: 054acd0 70089d0
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri Sep 13 12:22:00 2013 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Sep 13 12:22:00 2013 -0400

    Merge topic 'fix-genex-preprocessing-incomplete' into next
    
    70089d0 genex: Fix preprocessing with incomplete content (#14410).


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=70089d0769902c58da925eb571ad430bec40e9da
commit 70089d0769902c58da925eb571ad430bec40e9da
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri Sep 13 17:22:05 2013 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Fri Sep 13 18:21:37 2013 +0200

    genex: Fix preprocessing with incomplete content (#14410).
    
    Similar incomplete generator expressions are already tested
    in the GeneratorExpression unit test, but those are executed
    with add_custom_target. The generator expressions in the include
    directories are run through the preprocessor, whereas the ones
    run through add_custom_target are not.

diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx
index e962313..127cf6b 100644
--- a/Source/cmGeneratorExpression.cxx
+++ b/Source/cmGeneratorExpression.cxx
@@ -192,11 +192,12 @@ static std::string stripAllGeneratorExpressions(const std::string &input)
   std::string result;
   std::string::size_type pos = 0;
   std::string::size_type lastPos = pos;
+  int nestingLevel = 0;
   while((pos = input.find("$<", lastPos)) != input.npos)
     {
     result += input.substr(lastPos, pos - lastPos);
     pos += 2;
-    int nestingLevel = 1;
+    nestingLevel = 1;
     const char *c = input.c_str() + pos;
     const char * const cStart = c;
     for ( ; *c; ++c)
@@ -224,7 +225,10 @@ static std::string stripAllGeneratorExpressions(const std::string &input)
     pos += traversed;
     lastPos = pos;
     }
-  result += input.substr(lastPos);
+  if (nestingLevel == 0)
+    {
+    result += input.substr(lastPos);
+    }
   return cmGeneratorExpression::StripEmptyListElements(result);
 }
 
@@ -253,6 +257,7 @@ static std::string stripExportInterface(const std::string &input,
 {
   std::string result;
 
+  int nestingLevel = 0;
   std::string::size_type pos = 0;
   std::string::size_type lastPos = pos;
   while (true)
@@ -282,7 +287,7 @@ static std::string stripExportInterface(const std::string &input,
     const bool gotInstallInterface = input[pos + 2] == 'I';
     pos += gotInstallInterface ? sizeof("$<INSTALL_INTERFACE:") - 1
                                : sizeof("$<BUILD_INTERFACE:") - 1;
-    int nestingLevel = 1;
+    nestingLevel = 1;
     const char *c = input.c_str() + pos;
     const char * const cStart = c;
     for ( ; *c; ++c)
@@ -331,7 +336,10 @@ static std::string stripExportInterface(const std::string &input,
     pos += traversed;
     lastPos = pos;
     }
-  result += input.substr(lastPos);
+  if (nestingLevel == 0)
+    {
+    result += input.substr(lastPos);
+    }
 
   return cmGeneratorExpression::StripEmptyListElements(result);
 }

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

Summary of changes:


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list