diff options
author | Stephen Kelly <steveire@gmail.com> | 2013-07-01 20:55:25 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2013-07-02 14:40:02 (GMT) |
commit | 83498d413530570f7ab9affee5b8301c888bf91e (patch) | |
tree | 08f4c2ce8a7ec31b8061369a4113af29fe504f33 /Source/cmTarget.cxx | |
parent | f1fcbe3fdedb0d04fe89423331c0f2789bfe911e (diff) | |
download | CMake-83498d413530570f7ab9affee5b8301c888bf91e.zip CMake-83498d413530570f7ab9affee5b8301c888bf91e.tar.gz CMake-83498d413530570f7ab9affee5b8301c888bf91e.tar.bz2 |
Store system include directories in the cmTarget.
Entries from the cmMakefile are processed and maintained similarly
to other include directories. The include_directories(SYSTEM)
signature affects all following targets, and all prior targets
in the same makefile.
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r-- | Source/cmTarget.cxx | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index a90fa74..7ad42f8 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -1647,6 +1647,17 @@ void cmTarget::SetMakefile(cmMakefile* mf) { this->InsertInclude(*it); } + + const std::set<cmStdString> parentSystemIncludes = + this->Makefile->GetSystemIncludeDirectories(); + + for (std::set<cmStdString>::const_iterator it + = parentSystemIncludes.begin(); + it != parentSystemIncludes.end(); ++it) + { + this->SystemIncludeDirectories.insert(*it); + } + const std::vector<cmValueWithOrigin> parentOptions = this->Makefile->GetCompileOptionsEntries(); @@ -2524,6 +2535,28 @@ void cmTarget::AddLinkLibrary(cmMakefile& mf, //---------------------------------------------------------------------------- void +cmTarget::AddSystemIncludeDirectories(const std::set<cmStdString> &incs) +{ + for(std::set<cmStdString>::const_iterator li = incs.begin(); + li != incs.end(); ++li) + { + this->SystemIncludeDirectories.insert(*li); + } +} + +//---------------------------------------------------------------------------- +void +cmTarget::AddSystemIncludeDirectories(const std::vector<std::string> &incs) +{ + for(std::vector<std::string>::const_iterator li = incs.begin(); + li != incs.end(); ++li) + { + this->SystemIncludeDirectories.insert(*li); + } +} + +//---------------------------------------------------------------------------- +void cmTarget::AnalyzeLibDependencies( const cmMakefile& mf ) { // There are two key parts of the dependency analysis: (1) |