summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-02-07 18:35:00 (GMT)
committerStephen Kelly <steveire@gmail.com>2013-02-08 11:54:27 (GMT)
commit4de71786e89ba35190e23ae9e1c05f902c5350ff (patch)
treea29da4eca9becfab9a0b7b34f7ebeb23ec96b082 /Source/cmTarget.cxx
parentdf74bc34d4219a8d6e63ec7e41a9ca4fbe355581 (diff)
downloadCMake-4de71786e89ba35190e23ae9e1c05f902c5350ff.zip
CMake-4de71786e89ba35190e23ae9e1c05f902c5350ff.tar.gz
CMake-4de71786e89ba35190e23ae9e1c05f902c5350ff.tar.bz2
Ensure that the build interface includes have been added.
This is needed in the case that Automoc is used, as that calls GetIncludeDirectories, which may cache the resulting include dirs too early in the generate step. Also, because the automoc step is so early, we can't cache the include directories at that point. At that point the build interface of all dependencies are not populated yet, so we'd be caching the includes before appending the build interface. Only start caching when we're definitely generating the buildsystem. At that point, the includes should be stable. We still need to invoke AppendBuildInterfaceIncludes in the GlobalGenerator because the build interface includes affect mostly the dependencies of targets (such as the automoc targets), rather than the targets themselves, so the build interface needs to be appended for all targets before generation is done.
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 2945173..59afcb6 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -2767,6 +2767,7 @@ std::vector<std::string> cmTarget::GetIncludeDirectories(const char *config)
this->GetName(),
"INCLUDE_DIRECTORIES", 0, 0);
+ this->AppendBuildInterfaceIncludes();
std::vector<std::string> debugProperties;
const char *debugProp =
@@ -2808,7 +2809,8 @@ std::vector<std::string> cmTarget::GetIncludeDirectories(const char *config)
this,
&dagChecker),
entryIncludes);
- if (!(*it)->ge->GetHadContextSensitiveCondition())
+ if (this->Makefile->IsGeneratingBuildSystem()
+ && !(*it)->ge->GetHadContextSensitiveCondition())
{
cacheIncludes = true;
}