summaryrefslogtreecommitdiff
path: root/Tests/IncludeDirectories
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-05-20 12:25:59 +0200
committerBrad King <brad.king@kitware.com>2013-05-21 15:20:46 -0400
commit2f84dfec93b6a5d8b4db89bafe09688382b96997 (patch)
tree8d60fce3ce64afe43535dc6bb845c13b4b136c89 /Tests/IncludeDirectories
parent5dd8c01429da90a7417b72f17e784cc98f70f57c (diff)
downloadcmake-2f84dfec93b6a5d8b4db89bafe09688382b96997.tar.gz
include_directories: Fix handling of empty or space-only entries
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
Diffstat (limited to 'Tests/IncludeDirectories')
-rw-r--r--Tests/IncludeDirectories/CMakeLists.txt11
-rw-r--r--Tests/IncludeDirectories/empty.cpp1
2 files changed, 12 insertions, 0 deletions
diff --git a/Tests/IncludeDirectories/CMakeLists.txt b/Tests/IncludeDirectories/CMakeLists.txt
index 8a60f17d82..3e3ecc90dc 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 0000000000..ab32cf6c8a
--- /dev/null
+++ b/Tests/IncludeDirectories/empty.cpp
@@ -0,0 +1 @@
+// No content