diff options
author | Stephen Kelly <steveire@gmail.com> | 2012-11-19 21:47:30 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-01-03 18:45:40 (GMT) |
commit | 18a3195ad57cafd06851ecf4cb7265cab95cfa38 (patch) | |
tree | cf7c122414198cdcada824f567f1b3c6bec7c00f /Source/cmGeneratorTarget.cxx | |
parent | 76ea420fb9a8ceada0e806f1201230e5a7c1202c (diff) | |
download | CMake-18a3195ad57cafd06851ecf4cb7265cab95cfa38.zip CMake-18a3195ad57cafd06851ecf4cb7265cab95cfa38.tar.gz CMake-18a3195ad57cafd06851ecf4cb7265cab95cfa38.tar.bz2 |
Keep track of INCLUDE_DIRECTORIES as a vector of structs.
The struct can keep track of where the include came from, which gives
us proper backtraces.
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r-- | Source/cmGeneratorTarget.cxx | 40 |
1 files changed, 1 insertions, 39 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 55507dd..62ee26a 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -252,45 +252,7 @@ const char* cmGeneratorTarget::GetCreateRuleVariable() std::vector<std::string> cmGeneratorTarget::GetIncludeDirectories( const char *config) { - std::vector<std::string> includes; - const char *prop = this->Target->GetProperty("INCLUDE_DIRECTORIES"); - if(!prop) - { - return includes; - } - - cmListFileBacktrace lfbt; - cmGeneratorExpression ge(lfbt); - - cmGeneratorExpressionDAGChecker dagChecker(lfbt, - this->GetName(), - "INCLUDE_DIRECTORIES", 0, 0); - - cmSystemTools::ExpandListArgument(ge.Parse(prop) - ->Evaluate(this->Makefile, - config, - false, - this->Target, - &dagChecker), - includes); - - std::set<std::string> uniqueIncludes; - std::vector<std::string> orderedAndUniqueIncludes; - for(std::vector<std::string>::const_iterator - li = includes.begin(); li != includes.end(); ++li) - { - std::string inc = *li; - if (!cmSystemTools::IsOff(inc.c_str())) - { - cmSystemTools::ConvertToUnixSlashes(inc); - } - if(uniqueIncludes.insert(inc).second) - { - orderedAndUniqueIncludes.push_back(inc); - } - } - - return orderedAndUniqueIncludes; + return this->Target->GetIncludeDirectories(config); } //---------------------------------------------------------------------------- |