diff options
author | Brad King <brad.king@kitware.com> | 2013-04-17 15:35:14 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2013-04-17 15:35:14 (GMT) |
commit | 5b5a365aa676d93d7b574735e80e9625d57c8e52 (patch) | |
tree | 9a1a5dded97556102f4af484ee4835dd82964e81 | |
parent | f2958ff984bb38319f988eb39c09cc8792ed4ca5 (diff) | |
parent | 5a5e0fa9d35ea49ef9d31993ab415fc0e390e8b0 (diff) | |
download | CMake-5b5a365aa676d93d7b574735e80e9625d57c8e52.zip CMake-5b5a365aa676d93d7b574735e80e9625d57c8e52.tar.gz CMake-5b5a365aa676d93d7b574735e80e9625d57c8e52.tar.bz2 |
Merge topic 'fix-clear-INCLUDE_DIRECTORIES-prop'
5a5e0fa Fix clearing of the INCLUDE_DIRECTORIES DIRECTORY property.
-rw-r--r-- | Source/cmMakefile.cxx | 4 | ||||
-rw-r--r-- | Tests/IncludeDirectories/CMakeLists.txt | 11 |
2 files changed, 15 insertions, 0 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 25ccbc7..47a6d2e 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -3458,6 +3458,10 @@ void cmMakefile::SetProperty(const char* prop, const char* value) if (propname == "INCLUDE_DIRECTORIES") { this->IncludeDirectoriesEntries.clear(); + if (!value) + { + return; + } cmListFileBacktrace lfbt; this->GetBacktrace(lfbt); this->IncludeDirectoriesEntries.push_back( diff --git a/Tests/IncludeDirectories/CMakeLists.txt b/Tests/IncludeDirectories/CMakeLists.txt index 60f5e5e..8a60f17 100644 --- a/Tests/IncludeDirectories/CMakeLists.txt +++ b/Tests/IncludeDirectories/CMakeLists.txt @@ -47,3 +47,14 @@ else() endif() add_subdirectory(TargetIncludeDirectories) + +set_property(DIRECTORY PROPERTY INCLUDE_DIRECTORIES "${CMAKE_BINARY_DIR}") +get_property(propContent DIRECTORY PROPERTY INCLUDE_DIRECTORIES) +if (NOT propContent STREQUAL "${CMAKE_BINARY_DIR}") + message(SEND_ERROR "Setting DIRECTORY property failed.") +endif() +set_property(DIRECTORY PROPERTY INCLUDE_DIRECTORIES) +get_property(propContentAfter DIRECTORY PROPERTY INCLUDE_DIRECTORIES) +if (NOT propContentAfter STREQUAL "") + message(SEND_ERROR "Clearing DIRECTORY property failed.") +endif() |