summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-01-03 18:53:21 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2013-01-03 18:53:21 (GMT)
commit9f8975a1a9438d506b1c223f8a37fb5276032ec0 (patch)
tree12bab4a3208d59760b63844390ca6c3a1e534d90 /Source/cmGeneratorTarget.cxx
parente2969c503b125a40376ec4ac0399e462e3011077 (diff)
parent0941d6232a979a129a651915972ab7332c15550d (diff)
downloadCMake-9f8975a1a9438d506b1c223f8a37fb5276032ec0.zip
CMake-9f8975a1a9438d506b1c223f8a37fb5276032ec0.tar.gz
CMake-9f8975a1a9438d506b1c223f8a37fb5276032ec0.tar.bz2
Merge topic 'include-dirs-debugging'
0941d62 Add a way to print the origins of used include directories. 18a3195 Keep track of INCLUDE_DIRECTORIES as a vector of structs. 76ea420 Use cmsys::auto_ptr to manage cmCompiledGeneratorExpressions
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx42
1 files changed, 2 insertions, 40 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index de8b5e3..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);
}
//----------------------------------------------------------------------------
@@ -315,7 +277,7 @@ std::string cmGeneratorTarget::GetCompileDefinitions(const char *config)
cmGeneratorExpressionDAGChecker dagChecker(lfbt,
this->GetName(),
defPropName, 0, 0);
- return ge.Parse(prop).Evaluate(this->Makefile,
+ return ge.Parse(prop)->Evaluate(this->Makefile,
config,
false,
this->Target,