diff options
author | Stephen Kelly <steveire@gmail.com> | 2012-09-16 08:03:42 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2012-09-19 13:32:09 (GMT) |
commit | 290e92ada86c5b74669be48ee901494ae8e48ee3 (patch) | |
tree | 7325c7513406bd1258892a5bfa0b5cbb69b079a1 /Source/cmGeneratorTarget.cxx | |
parent | f9146f6b90d381a70bdb6a3c97742e3a53bb6235 (diff) | |
download | CMake-290e92ada86c5b74669be48ee901494ae8e48ee3.zip CMake-290e92ada86c5b74669be48ee901494ae8e48ee3.tar.gz CMake-290e92ada86c5b74669be48ee901494ae8e48ee3.tar.bz2 |
Move GetIncludeDirectories to cmGeneratorTarget.
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r-- | Source/cmGeneratorTarget.cxx | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 03f511f..044d8ee 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -355,3 +355,27 @@ const char* cmGeneratorTarget::GetCreateRuleVariable() } return ""; } + +//---------------------------------------------------------------------------- +std::vector<std::string> cmGeneratorTarget::GetIncludeDirectories() +{ + std::vector<std::string> includes; + const char *prop = this->Target->GetProperty("INCLUDE_DIRECTORIES"); + if(prop) + { + cmSystemTools::ExpandListArgument(prop, 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) + { + if(uniqueIncludes.insert(*li).second) + { + orderedAndUniqueIncludes.push_back(*li); + } + } + + return orderedAndUniqueIncludes; +} |