[Cmake-commits] CMake branch, next, updated. v2.8.11-2083-g1c42ac9

Stephen Kelly steveire at gmail.com
Mon May 20 06:32:48 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  1c42ac9387102d50f29ca00266319a5d04935f1d (commit)
       via  1e21ce29dd949ded0443d31857f0659a74f26472 (commit)
       via  03071d30fee82919ca005758867224f937e15836 (commit)
       via  cd82e3f8f5f0c2d8a48b38e474bb19fb3b95e4f0 (commit)
      from  565dc913be2c11c76462f05c86a43e915f0d6daf (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=1c42ac9387102d50f29ca00266319a5d04935f1d
commit 1c42ac9387102d50f29ca00266319a5d04935f1d
Merge: 565dc91 1e21ce2
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon May 20 06:32:43 2013 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon May 20 06:32:43 2013 -0400

    Merge topic 'fix-include_directories-whitespace-handling' into next
    
    1e21ce2 Fix handling of empty entries in include_directories
    03071d3 CMake Nightly Date Stamp
    cd82e3f CMake Nightly Date Stamp


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1e21ce29dd949ded0443d31857f0659a74f26472
commit 1e21ce29dd949ded0443d31857f0659a74f26472
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon May 20 12:25:59 2013 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon May 20 12:30:23 2013 +0200

    Fix handling of empty entries in include_directories
    
    This is a regression introduced in commit 0d46e9a0 (Store includes
    from the same include_directories call together., 2013-01-20).
    
    Reported at
    
     http://thread.gmane.org/gmane.comp.programming.tools.cmake.user/46695/focus=7847

diff --git a/Source/cmIncludeDirectoryCommand.cxx b/Source/cmIncludeDirectoryCommand.cxx
index ffb0e80..30c1743 100644
--- a/Source/cmIncludeDirectoryCommand.cxx
+++ b/Source/cmIncludeDirectoryCommand.cxx
@@ -116,13 +116,19 @@ void cmIncludeDirectoryCommand::GetIncludes(const std::string &arg,
       {
       std::string inc = arg.substr(lastPos,pos);
       this->NormalizeInclude(inc);
-      incs.push_back(inc);
+      if (!inc.empty())
+        {
+        incs.push_back(inc);
+        }
       }
     lastPos = pos + 1;
     }
   std::string inc = arg.substr(lastPos);
   this->NormalizeInclude(inc);
-  incs.push_back(inc);
+  if (!inc.empty())
+    {
+    incs.push_back(inc);
+    }
 }
 
 void cmIncludeDirectoryCommand::NormalizeInclude(std::string &inc)
@@ -133,6 +139,11 @@ void cmIncludeDirectoryCommand::NormalizeInclude(std::string &inc)
     {
     inc.assign(inc, b, 1+e-b);   // copy the remaining substring
     }
+  else
+    {
+    inc = "";
+    return;
+    }
 
   if (!cmSystemTools::IsOff(inc.c_str()))
     {
diff --git a/Tests/IncludeDirectories/CMakeLists.txt b/Tests/IncludeDirectories/CMakeLists.txt
index 8a60f17..3e3ecc9 100644
--- a/Tests/IncludeDirectories/CMakeLists.txt
+++ b/Tests/IncludeDirectories/CMakeLists.txt
@@ -58,3 +58,14 @@ get_property(propContentAfter DIRECTORY PROPERTY INCLUDE_DIRECTORIES)
 if (NOT propContentAfter STREQUAL "")
   message(SEND_ERROR "Clearing DIRECTORY property failed.")
 endif()
+
+add_library(empty_entry_test SHARED empty.cpp)
+set_target_properties(empty_entry_test PROPERTIES INCLUDE_DIRECTORIES "")
+include_directories(/one/two
+  " "
+  "  "
+)
+get_target_property(incs empty_entry_test INCLUDE_DIRECTORIES)
+if (NOT incs STREQUAL ";/one/two")
+  message(SEND_ERROR "Empty include_directories entry was not ignored.")
+endif()
diff --git a/Tests/IncludeDirectories/empty.cpp b/Tests/IncludeDirectories/empty.cpp
new file mode 100644
index 0000000..ab32cf6
--- /dev/null
+++ b/Tests/IncludeDirectories/empty.cpp
@@ -0,0 +1 @@
+// No content

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

Summary of changes:
 Source/CMakeVersion.cmake                          |    2 +-
 Source/cmIncludeDirectoryCommand.cxx               |   15 +++++++++++++--
 Tests/IncludeDirectories/CMakeLists.txt            |   11 +++++++++++
 .../empty.cpp                                      |    0
 4 files changed, 25 insertions(+), 3 deletions(-)
 copy Tests/{CMakeCommands/target_link_libraries => IncludeDirectories}/empty.cpp (100%)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list