Keep the INCLUDE_DIRECTORIES target property up to date.
The directory level property changes need to be added to it.
This commit is contained in:
parent
a4d5f7b9b2
commit
840509babb
|
@ -1648,6 +1648,15 @@ void cmMakefile::AddIncludeDirectory(const char* inc, bool before)
|
||||||
cmProperty *prop =
|
cmProperty *prop =
|
||||||
this->GetProperties().GetOrCreateProperty("INCLUDE_DIRECTORIES");
|
this->GetProperties().GetOrCreateProperty("INCLUDE_DIRECTORIES");
|
||||||
AddStringToProperty(prop, "INCLUDE_DIRECTORIES", inc, before);
|
AddStringToProperty(prop, "INCLUDE_DIRECTORIES", inc, before);
|
||||||
|
|
||||||
|
// Property on each target:
|
||||||
|
for (cmTargets::iterator l = this->Targets.begin();
|
||||||
|
l != this->Targets.end(); ++l)
|
||||||
|
{
|
||||||
|
cmTarget &t = l->second;
|
||||||
|
prop = t.GetProperties().GetOrCreateProperty("INCLUDE_DIRECTORIES");
|
||||||
|
AddStringToProperty(prop, "INCLUDE_DIRECTORIES", inc, before);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
|
|
@ -1279,6 +1279,11 @@ void cmTarget::SetMakefile(cmMakefile* mf)
|
||||||
// Save the backtrace of target construction.
|
// Save the backtrace of target construction.
|
||||||
this->Makefile->GetBacktrace(this->Internal->Backtrace);
|
this->Makefile->GetBacktrace(this->Internal->Backtrace);
|
||||||
|
|
||||||
|
// Initialize the INCLUDE_DIRECTORIES property based on the current value
|
||||||
|
// of the same directory property:
|
||||||
|
this->SetProperty("INCLUDE_DIRECTORIES",
|
||||||
|
this->Makefile->GetProperty("INCLUDE_DIRECTORIES"));
|
||||||
|
|
||||||
// Record current policies for later use.
|
// Record current policies for later use.
|
||||||
this->PolicyStatusCMP0003 =
|
this->PolicyStatusCMP0003 =
|
||||||
this->Makefile->GetPolicyStatus(cmPolicies::CMP0003);
|
this->Makefile->GetPolicyStatus(cmPolicies::CMP0003);
|
||||||
|
|
Loading…
Reference in New Issue