summaryrefslogtreecommitdiffstats
path: root/Source/cmIncludeDirectoryCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-10-05 12:55:59 (GMT)
committerBrad King <brad.king@kitware.com>2006-10-05 12:55:59 (GMT)
commitc11cf31c9b70b21ba171bb2682ea5304e8d00de8 (patch)
tree3d6aaf2ef210a0a725346db4b708240d06edc06f /Source/cmIncludeDirectoryCommand.cxx
parente36eb719135b8c5ce6ff317614df5e0d961718f2 (diff)
downloadCMake-c11cf31c9b70b21ba171bb2682ea5304e8d00de8.zip
CMake-c11cf31c9b70b21ba171bb2682ea5304e8d00de8.tar.gz
CMake-c11cf31c9b70b21ba171bb2682ea5304e8d00de8.tar.bz2
ENH: Adding SYSTEM option to INCLUDE_DIRECTORIES command. This addresses bug #3462.
Diffstat (limited to 'Source/cmIncludeDirectoryCommand.cxx')
-rw-r--r--Source/cmIncludeDirectoryCommand.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/cmIncludeDirectoryCommand.cxx b/Source/cmIncludeDirectoryCommand.cxx
index 193b3cc..a34b116 100644
--- a/Source/cmIncludeDirectoryCommand.cxx
+++ b/Source/cmIncludeDirectoryCommand.cxx
@@ -28,6 +28,7 @@ bool cmIncludeDirectoryCommand
std::vector<std::string>::const_iterator i = args.begin();
bool before = this->Makefile->IsOn("CMAKE_INCLUDE_DIRECTORIES_BEFORE");
+ bool system = false;
if ((*i) == "BEFORE")
{
@@ -42,6 +43,11 @@ bool cmIncludeDirectoryCommand
for(; i != args.end(); ++i)
{
+ if(*i == "SYSTEM")
+ {
+ system = true;
+ continue;
+ }
if(i->size() == 0)
{
cmSystemTools::Error
@@ -60,6 +66,10 @@ bool cmIncludeDirectoryCommand
}
}
this->Makefile->AddIncludeDirectory(unixPath.c_str(), before);
+ if(system)
+ {
+ this->Makefile->AddSystemIncludeDirectory(unixPath.c_str());
+ }
}
return true;
}