diff options
author | Stephen Kelly <steveire@gmail.com> | 2013-07-01 20:28:26 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2013-07-02 14:40:02 (GMT) |
commit | f1fcbe3fdedb0d04fe89423331c0f2789bfe911e (patch) | |
tree | fafa4caa5f9329d8e5dedad0d27d1cf18dde7c2f /Source/cmLocalGenerator.cxx | |
parent | 2679a34a943cddb61f816299476f15997f9b5980 (diff) | |
download | CMake-f1fcbe3fdedb0d04fe89423331c0f2789bfe911e.zip CMake-f1fcbe3fdedb0d04fe89423331c0f2789bfe911e.tar.gz CMake-f1fcbe3fdedb0d04fe89423331c0f2789bfe911e.tar.bz2 |
Add Target API to determine if an include is a system include.
The implementation can be modified later so that system includes
can be determined on a per-target basis.
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 83f1d6d..2971c3b 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -577,7 +577,7 @@ void cmLocalGenerator::AddCustomCommandToCreateObject(const char* ofname, { std::vector<std::string> includes; this->GetIncludeDirectories(includes, &target, lang); - flags += this->GetIncludeFlags(includes, lang); + flags += this->GetIncludeFlags(includes, &target, lang); } flags += this->Makefile->GetDefineFlags(); @@ -1224,6 +1224,7 @@ cmLocalGenerator::ConvertToIncludeReference(std::string const& path) //---------------------------------------------------------------------------- std::string cmLocalGenerator::GetIncludeFlags( const std::vector<std::string> &includes, + cmGeneratorTarget* target, const char* lang, bool forResponseFile, const char *config) { @@ -1296,8 +1297,8 @@ std::string cmLocalGenerator::GetIncludeFlags( if(!flagUsed || repeatFlag) { - if(sysIncludeFlag && - this->Makefile->IsSystemIncludeDirectory(i->c_str(), config)) + if(sysIncludeFlag && target && + target->IsSystemIncludeDirectory(i->c_str(), config)) { includeFlags << sysIncludeFlag; } |