summaryrefslogtreecommitdiff
path: root/Source/cmTargetIncludeDirectoriesCommand.cxx
diff options
context:
space:
mode:
authorKévin THIERRY <kevin.thierry@open.eurogiciel.org>2014-12-23 09:30:24 +0100
committerKévin THIERRY <kevin.thierry@open.eurogiciel.org>2014-12-23 09:30:24 +0100
commit317dbdb79761ef65e45c7358cfc7571c6afa54ad (patch)
treed6e8d59029aea04ca4a0579fb1c19c3e493af78f /Source/cmTargetIncludeDirectoriesCommand.cxx
parent297c63fa65327491a2b50e521b661c5835a19fe4 (diff)
downloadcmake-317dbdb79761ef65e45c7358cfc7571c6afa54ad.tar.gz
cmake-317dbdb79761ef65e45c7358cfc7571c6afa54ad.tar.bz2
cmake-317dbdb79761ef65e45c7358cfc7571c6afa54ad.zip
Imported Upstream version 2.8.12.2upstream/2.8.12.2sandbox/kevinthierry/upstream
Diffstat (limited to 'Source/cmTargetIncludeDirectoriesCommand.cxx')
-rw-r--r--Source/cmTargetIncludeDirectoriesCommand.cxx34
1 files changed, 32 insertions, 2 deletions
diff --git a/Source/cmTargetIncludeDirectoriesCommand.cxx b/Source/cmTargetIncludeDirectoriesCommand.cxx
index 12d0a515f..e7b906c9e 100644
--- a/Source/cmTargetIncludeDirectoriesCommand.cxx
+++ b/Source/cmTargetIncludeDirectoriesCommand.cxx
@@ -15,7 +15,8 @@
bool cmTargetIncludeDirectoriesCommand
::InitialPass(std::vector<std::string> const& args, cmExecutionStatus &)
{
- return this->HandleArguments(args, "INCLUDE_DIRECTORIES", PROCESS_BEFORE);
+ return this->HandleArguments(args, "INCLUDE_DIRECTORIES",
+ ArgumentFlags(PROCESS_BEFORE | PROCESS_SYSTEM));
}
//----------------------------------------------------------------------------
@@ -65,10 +66,39 @@ std::string cmTargetIncludeDirectoriesCommand
//----------------------------------------------------------------------------
void cmTargetIncludeDirectoriesCommand
::HandleDirectContent(cmTarget *tgt, const std::vector<std::string> &content,
- bool prepend)
+ bool prepend, bool system)
{
cmListFileBacktrace lfbt;
this->Makefile->GetBacktrace(lfbt);
cmValueWithOrigin entry(this->Join(content), lfbt);
tgt->InsertInclude(entry, prepend);
+ if (system)
+ {
+ tgt->AddSystemIncludeDirectories(content);
+ }
+}
+
+//----------------------------------------------------------------------------
+void cmTargetIncludeDirectoriesCommand
+::HandleInterfaceContent(cmTarget *tgt,
+ const std::vector<std::string> &content,
+ bool prepend, bool system)
+{
+ cmTargetPropCommandBase::HandleInterfaceContent(tgt, content,
+ prepend, system);
+
+ if (system)
+ {
+ std::string joined;
+ std::string sep;
+ for(std::vector<std::string>::const_iterator it = content.begin();
+ it != content.end(); ++it)
+ {
+ joined += sep;
+ sep = ";";
+ joined += *it;
+ }
+ tgt->AppendProperty("INTERFACE_SYSTEM_INCLUDE_DIRECTORIES",
+ joined.c_str());
+ }
}