summaryrefslogtreecommitdiff
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2011-12-04 16:40:39 +0100
committerDavid Cole <david.cole@kitware.com>2012-02-22 06:31:50 -0500
commit840509babb2d1c8fc5167c4580fef58546c06700 (patch)
tree0735d96313a32b0572048d4cfb59005766d7799c /Source/cmMakefile.cxx
parenta4d5f7b9b270d3fa85e8a0a1608c4205dff744d9 (diff)
downloadcmake-840509babb2d1c8fc5167c4580fef58546c06700.tar.gz
Keep the INCLUDE_DIRECTORIES target property up to date.
The directory level property changes need to be added to it.
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index cdb699ebb0..62904121d1 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -1648,6 +1648,15 @@ void cmMakefile::AddIncludeDirectory(const char* inc, bool before)
cmProperty *prop =
this->GetProperties().GetOrCreateProperty("INCLUDE_DIRECTORIES");
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);
+ }
}
//----------------------------------------------------------------------------