Commit 5b5a365a authored by Brad King's avatar Brad King 💬 Committed by Kitware Robot
Browse files

Merge topic 'fix-clear-INCLUDE_DIRECTORIES-prop'

5a5e0fa9 Fix clearing of the INCLUDE_DIRECTORIES DIRECTORY property.
parents f2958ff9 5a5e0fa9
...@@ -3458,6 +3458,10 @@ void cmMakefile::SetProperty(const char* prop, const char* value) ...@@ -3458,6 +3458,10 @@ void cmMakefile::SetProperty(const char* prop, const char* value)
if (propname == "INCLUDE_DIRECTORIES") if (propname == "INCLUDE_DIRECTORIES")
{ {
this->IncludeDirectoriesEntries.clear(); this->IncludeDirectoriesEntries.clear();
if (!value)
{
return;
}
cmListFileBacktrace lfbt; cmListFileBacktrace lfbt;
this->GetBacktrace(lfbt); this->GetBacktrace(lfbt);
this->IncludeDirectoriesEntries.push_back( this->IncludeDirectoriesEntries.push_back(
......
...@@ -47,3 +47,14 @@ else() ...@@ -47,3 +47,14 @@ else()
endif() endif()
add_subdirectory(TargetIncludeDirectories) 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()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment