summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2011-12-04 15:32:13 (GMT)
committerDavid Cole <david.cole@kitware.com>2012-02-22 11:31:49 (GMT)
commita4d5f7b9b270d3fa85e8a0a1608c4205dff744d9 (patch)
treea310848179c4f7c1a069e2d315d2f56bfdbf2067 /Source/cmTarget.cxx
parent8adaee2b0b2651cfd93bb4a915d11bdd4cba1b51 (diff)
downloadCMake-a4d5f7b9b270d3fa85e8a0a1608c4205dff744d9.zip
CMake-a4d5f7b9b270d3fa85e8a0a1608c4205dff744d9.tar.gz
CMake-a4d5f7b9b270d3fa85e8a0a1608c4205dff744d9.tar.bz2
Add API to get the ordered includes for a target.
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx24
1 files changed, 24 insertions, 0 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 0c79b30..5c902e1 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -4676,6 +4676,30 @@ cmTarget::GetLinkInformation(const char* config)
}
//----------------------------------------------------------------------------
+std::vector<std::string> cmTarget::GetIncludeDirectories()
+{
+ std::vector<std::string> includes;
+ const char *prop = this->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;
+}
+
+//----------------------------------------------------------------------------
cmTargetLinkInformationMap
::cmTargetLinkInformationMap(cmTargetLinkInformationMap const& r): derived()
{