diff options
author | Stephen Kelly <steveire@gmail.com> | 2014-01-01 14:49:05 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2014-01-06 16:25:10 (GMT) |
commit | faedd2bea9c98fddd9e9f70deebdb53f8f369124 (patch) | |
tree | 9bd680db2dfc528aa600494acb4f865e5fe31e1e /Source/cmTarget.cxx | |
parent | 9eb06d0dde52203d3f8ac91ea9a1c5396a09f8af (diff) | |
download | CMake-faedd2bea9c98fddd9e9f70deebdb53f8f369124.zip CMake-faedd2bea9c98fddd9e9f70deebdb53f8f369124.tar.gz CMake-faedd2bea9c98fddd9e9f70deebdb53f8f369124.tar.bz2 |
cmTarget: Fix system include annotation propagation.
Direct users of IMPORTED targets treat INTERFACE_INCLUDE_DIRECTORIES
as SYSTEM, after commit a63fcbcb (Always consider includes from IMPORTED
targets to be SYSTEM., 2013-08-29). It was intended that transitive
use of an IMPORTED target would have the same behavior, but that
did not work. The implementation processed only direct dependencies
in cmTarget::FinalizeSystemIncludeDirectories.
Implement transitive evaluation of dependencies by traversing the
link interface of each target in the link implementation.
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r-- | Source/cmTarget.cxx | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 4b7bd3b..b06480b 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -1042,62 +1042,6 @@ cmTarget::AddSystemIncludeDirectories(const std::vector<std::string> &incs) } //---------------------------------------------------------------------------- -void cmTarget::FinalizeSystemIncludeDirectories() -{ - for (std::vector<cmValueWithOrigin>::const_iterator - it = this->Internal->LinkImplementationPropertyEntries.begin(), - end = this->Internal->LinkImplementationPropertyEntries.end(); - it != end; ++it) - { - if (!cmGeneratorExpression::IsValidTargetName(it->Value) - && cmGeneratorExpression::Find(it->Value) == std::string::npos) - { - continue; - } - { - cmListFileBacktrace lfbt; - cmGeneratorExpression ge(lfbt); - cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = - ge.Parse(it->Value); - std::string targetName = cge->Evaluate(this->Makefile, 0, - false, this, 0, 0); - cmTarget *tgt = this->Makefile->FindTargetToUse(targetName.c_str()); - if (!tgt || tgt == this) - { - continue; - } - if (tgt->IsImported() - && tgt->GetProperty("INTERFACE_INCLUDE_DIRECTORIES") - && !this->GetPropertyAsBool("NO_SYSTEM_FROM_IMPORTED")) - { - std::string includeGenex = "$<TARGET_PROPERTY:" + - it->Value + ",INTERFACE_INCLUDE_DIRECTORIES>"; - if (cmGeneratorExpression::Find(it->Value) != std::string::npos) - { - // Because it->Value is a generator expression, ensure that it - // evaluates to the non-empty string before being used in the - // TARGET_PROPERTY expression. - includeGenex = "$<$<BOOL:" + it->Value + ">:" + includeGenex + ">"; - } - this->SystemIncludeDirectories.insert(includeGenex); - return; // The INTERFACE_SYSTEM_INCLUDE_DIRECTORIES are a subset - // of the INTERFACE_INCLUDE_DIRECTORIES - } - } - std::string includeGenex = "$<TARGET_PROPERTY:" + - it->Value + ",INTERFACE_SYSTEM_INCLUDE_DIRECTORIES>"; - if (cmGeneratorExpression::Find(it->Value) != std::string::npos) - { - // Because it->Value is a generator expression, ensure that it - // evaluates to the non-empty string before being used in the - // TARGET_PROPERTY expression. - includeGenex = "$<$<BOOL:" + it->Value + ">:" + includeGenex + ">"; - } - this->SystemIncludeDirectories.insert(includeGenex); - } -} - -//---------------------------------------------------------------------------- void cmTarget::AnalyzeLibDependencies( const cmMakefile& mf ) { |