diff options
Diffstat (limited to 'Source/cmIncludeDirectoryCommand.cxx')
-rw-r--r-- | Source/cmIncludeDirectoryCommand.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Source/cmIncludeDirectoryCommand.cxx b/Source/cmIncludeDirectoryCommand.cxx index b493eb3..86618b5 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,12 +43,19 @@ bool cmIncludeDirectoryCommand for(; i != args.end(); ++i) { + if(*i == "SYSTEM") + { + system = true; + continue; + } if(i->size() == 0) { cmSystemTools::Error ("Empty Include Directory Passed into INCLUDE_DIRECTORIES command."); } std::string unixPath = *i; + if (!cmSystemTools::IsOff(unixPath.c_str())) + { cmSystemTools::ConvertToUnixSlashes(unixPath); if(!cmSystemTools::FileIsFullPath(unixPath.c_str())) { @@ -56,7 +64,12 @@ bool cmIncludeDirectoryCommand tmp += unixPath; unixPath = tmp; } + } this->Makefile->AddIncludeDirectory(unixPath.c_str(), before); + if(system) + { + this->Makefile->AddSystemIncludeDirectory(unixPath.c_str()); + } } return true; } |