mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 13:51:33 -06:00
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
This commit is contained in:
@@ -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()
|
||||
|
||||
1
Tests/IncludeDirectories/empty.cpp
Normal file
1
Tests/IncludeDirectories/empty.cpp
Normal file
@@ -0,0 +1 @@
|
||||
// No content
|
||||
Reference in New Issue
Block a user