[Cmake-commits] CMake branch, next, updated. v2.8.10.2-2572-gf61b00c

Stephen Kelly steveire at gmail.com
Mon Mar 18 10:11:44 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  f61b00cc4a2d3f6ea4441ec29e33db8e067ac212 (commit)
       via  7a619fa6fbebdd907815be2d0edaef0184a3ad95 (commit)
      from  be01944460c01694cc8d69d067b3fbb7779e9d51 (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=f61b00cc4a2d3f6ea4441ec29e33db8e067ac212
commit f61b00cc4a2d3f6ea4441ec29e33db8e067ac212
Merge: be01944 7a619fa
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Mar 18 10:11:42 2013 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Mar 18 10:11:42 2013 -0400

    Merge topic 'fix-genex-preprocess' into next
    
    7a619fa Fix cmGeneratorExpression::Preprocess for interleaved inputs.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7a619fa6fbebdd907815be2d0edaef0184a3ad95
commit 7a619fa6fbebdd907815be2d0edaef0184a3ad95
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Mar 14 21:40:21 2013 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Mar 18 15:09:47 2013 +0100

    Fix cmGeneratorExpression::Preprocess for interleaved inputs.
    
    We can't find both preprocessing expressions at once, because then
    the BUILD_INTERFACE will always be favored if both are present, even
    if INSTALL_INTERFACE appears first.
    
    This was affecting the behavior of install(EXPORT) because the
    INTERFACE_INCLUDE_DIRECTORIES contained entries like
    
     /foo/include;$<INSTALL_INTERFACE:/bar/include>
    
    As the INSTALL_INTERFACE always evaluates to '0', it always needs
    to be preprocessed properly.

diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx
index 3f59129..ab8bd13 100644
--- a/Source/cmGeneratorExpression.cxx
+++ b/Source/cmGeneratorExpression.cxx
@@ -236,9 +236,29 @@ static std::string stripExportInterface(const std::string &input,
 
   std::string::size_type pos = 0;
   std::string::size_type lastPos = pos;
-  while((pos = input.find("$<BUILD_INTERFACE:", lastPos)) != input.npos
-    || (pos = input.find("$<INSTALL_INTERFACE:", lastPos)) != input.npos)
+  while (true)
     {
+    std::string::size_type bPos = input.find("$<BUILD_INTERFACE:", lastPos);
+    std::string::size_type iPos = input.find("$<INSTALL_INTERFACE:", lastPos);
+
+    if (bPos == std::string::npos && iPos == std::string::npos)
+      {
+      break;
+      }
+
+    if (bPos == std::string::npos)
+      {
+      pos = iPos;
+      }
+    else if (iPos == std::string::npos)
+      {
+      pos = bPos;
+      }
+    else
+      {
+      pos = (bPos < iPos) ? bPos : iPos;
+      }
+
     result += input.substr(lastPos, pos - lastPos);
     const bool gotInstallInterface = input[pos + 2] == 'I';
     pos += gotInstallInterface ? sizeof("$<INSTALL_INTERFACE:") - 1
diff --git a/Tests/ExportImport/Export/CMakeLists.txt b/Tests/ExportImport/Export/CMakeLists.txt
index c00ef82..337168f 100644
--- a/Tests/ExportImport/Export/CMakeLists.txt
+++ b/Tests/ExportImport/Export/CMakeLists.txt
@@ -148,6 +148,10 @@ set_property(TARGET testLibRequired APPEND PROPERTY
     $<BUILD_INTERFACE:$<TARGET_PROPERTY:testLibIncludeRequired4,INTERFACE_INCLUDE_DIRECTORIES>>
     $<BUILD_INTERFACE:$<TARGET_PROPERTY:testLibIncludeRequired5,INTERFACE_INCLUDE_DIRECTORIES>>
     $<INSTALL_INTERFACE:$<TARGET_PROPERTY:testLibIncludeRequired6,INTERFACE_INCLUDE_DIRECTORIES>>
+    # The BUILD_INTERFACE entry from above is duplicated below. This is to test that
+    # the INSTALL_INTERFACE entry bound by a BUILD_INTERFACE entry on either side is
+    # preprocessed correctly on install(EXPORT).
+    $<BUILD_INTERFACE:$<TARGET_PROPERTY:testLibIncludeRequired5,INTERFACE_INCLUDE_DIRECTORIES>>
     # Test that the below is non-fatal
     $<$<STREQUAL:one,two>:$<TARGET_PROPERTY:not_a_target,INTERFACE_INCLUDE_DIRECTORIES>>
 )

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

Summary of changes:


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list