[Cmake-commits] CMake branch, next, updated. v2.8.11.2-4167-g39943fc

Stephen Kelly steveire at gmail.com
Fri Sep 13 11:52:05 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  39943fc3bc6647e110afaeb565ae3d3d3d38074b (commit)
       via  66fd53601016796379b2890929db7d310662a545 (commit)
       via  ec8ca59159a1bfb6101559f7ba3206c76329e6eb (commit)
      from  e7d147909a4161d0814ebeb774f5df1204d85196 (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=39943fc3bc6647e110afaeb565ae3d3d3d38074b
commit 39943fc3bc6647e110afaeb565ae3d3d3d38074b
Merge: e7d1479 66fd536
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri Sep 13 11:52:03 2013 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Sep 13 11:52:03 2013 -0400

    Merge topic 'fix-genex-preprocessing-incomplete-test' into next
    
    66fd536 Genex: Test preprocessing incomplete expressions.
    ec8ca59 genex: Fix preprocessing with incomplete content (#14410).


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=66fd53601016796379b2890929db7d310662a545
commit 66fd53601016796379b2890929db7d310662a545
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri Sep 13 17:51:10 2013 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Fri Sep 13 17:51:10 2013 +0200

    Genex: Test preprocessing incomplete expressions.

diff --git a/Tests/RunCMake/include_directories/RunCMakeTest.cmake b/Tests/RunCMake/include_directories/RunCMakeTest.cmake
index f0704f4..f66823e 100644
--- a/Tests/RunCMake/include_directories/RunCMakeTest.cmake
+++ b/Tests/RunCMake/include_directories/RunCMakeTest.cmake
@@ -10,3 +10,4 @@ run_cmake(ImportedTarget)
 run_cmake(RelativePathInGenex)
 run_cmake(CMP0021)
 run_cmake(install_config)
+run_cmake(incomplete-genex)
diff --git a/Tests/RunCMake/include_directories/incomplete-genex.cmake b/Tests/RunCMake/include_directories/incomplete-genex.cmake
new file mode 100644
index 0000000..bb9f607
--- /dev/null
+++ b/Tests/RunCMake/include_directories/incomplete-genex.cmake
@@ -0,0 +1,15 @@
+project(incomplete-genex)
+
+cmake_policy(SET CMP0022 NEW)
+cmake_policy(SET CMP0023 NEW)
+
+add_library(somelib empty.cpp)
+target_include_directories(somelib PUBLIC
+
+  "/s;$<BUILD_INTERFACE:s"
+)
+
+export(TARGETS somelib FILE somelibTargets.cmake)
+
+install(TARGETS somelib EXPORT someExport DESTINATION prefix)
+install(EXPORT someExport DESTINATION prefix)

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ec8ca59159a1bfb6101559f7ba3206c76329e6eb
commit ec8ca59159a1bfb6101559f7ba3206c76329e6eb
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 17:50:17 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..978c217 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 = 1;
   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:
 Source/cmGeneratorExpression.cxx                   |   16 ++++++++++++----
 .../include_directories/RunCMakeTest.cmake         |    1 +
 .../include_directories/incomplete-genex.cmake     |   15 +++++++++++++++
 3 files changed, 28 insertions(+), 4 deletions(-)
 create mode 100644 Tests/RunCMake/include_directories/incomplete-genex.cmake


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list