From 590d238914ff1b8652c0074e6715f51cad5eb7db Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Wed, 8 Jan 2014 00:38:54 +0100 Subject: [PATCH] cmTarget: Handle NO_SYSTEM_FROM_IMPORTED. This handling was lost in commit faedd2be (cmTarget: Fix system include annotation propagation., 2014-01-01). --- Source/cmGeneratorTarget.cxx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 6894cfcca..2c976cd31 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -65,7 +65,8 @@ cmGeneratorTarget::GetSourceDepends(cmSourceFile* sf) const static void handleSystemIncludesDep(cmMakefile *mf, const std::string &name, const char *config, cmTarget *headTarget, cmGeneratorExpressionDAGChecker *dagChecker, - std::vector& result) + std::vector& result, + bool excludeImported) { cmTarget* depTgt = mf->FindTargetToUse(name.c_str()); @@ -85,7 +86,7 @@ static void handleSystemIncludesDep(cmMakefile *mf, const std::string &name, config, false, headTarget, depTgt, dagChecker), result); } - if (!depTgt->IsImported()) + if (!depTgt->IsImported() || excludeImported) { return; } @@ -130,6 +131,9 @@ bool cmGeneratorTarget::IsSystemIncludeDirectory(const char *dir, this->GetName(), "SYSTEM_INCLUDE_DIRECTORIES", 0, 0); + bool excludeImported + = this->Target->GetPropertyAsBool("NO_SYSTEM_FROM_IMPORTED"); + std::vector result; for (std::set::const_iterator it = this->Target->GetSystemIncludeDirectories().begin(); @@ -156,7 +160,7 @@ bool cmGeneratorTarget::IsSystemIncludeDirectory(const char *dir, } handleSystemIncludesDep(this->Makefile, *li, config, this->Target, - &dagChecker, result); + &dagChecker, result, excludeImported); std::vector deps; tgt->GetTransitivePropertyLinkLibraries(config, this->Target, deps); @@ -167,7 +171,7 @@ bool cmGeneratorTarget::IsSystemIncludeDirectory(const char *dir, if (uniqueDeps.insert(*di).second) { handleSystemIncludesDep(this->Makefile, *di, config, this->Target, - &dagChecker, result); + &dagChecker, result, excludeImported); } } }