summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-01-20 11:28:59 (GMT)
committerStephen Kelly <steveire@gmail.com>2013-01-21 08:12:22 (GMT)
commit0d46e9a0297d78dabc9988604a15c0096c702855 (patch)
tree1f948251b0c737c1bb31ddd81a592936669b83a0 /Source/cmMakefile.cxx
parent5e572619c67c5ba38a68179111f7dea9648690ab (diff)
downloadCMake-0d46e9a0297d78dabc9988604a15c0096c702855.zip
CMake-0d46e9a0297d78dabc9988604a15c0096c702855.tar.gz
CMake-0d46e9a0297d78dabc9988604a15c0096c702855.tar.bz2
Store includes from the same include_directories call together.
Otherwise, we get a separate IncludeDirectoriesEntry for each include, and that causes unnecessary and confusing splitting in the output when debugging the INCLUDE_DIRECTORIES property.
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx30
1 files changed, 23 insertions, 7 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index b432986..7e77664 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -1616,20 +1616,31 @@ void cmMakefile::AddSubDirectory(const char* srcPath, const char *binPath,
}
//----------------------------------------------------------------------------
-void cmMakefile::AddIncludeDirectory(const char* inc, bool before)
+void cmMakefile::AddIncludeDirectories(const std::vector<std::string> &incs,
+ bool before)
{
- if (!inc)
+ if (incs.empty())
{
return;
}
+ std::string incString;
+ std::string sep;
+
+ for(std::vector<std::string>::const_iterator li = incs.begin();
+ li != incs.end(); ++li)
+ {
+ incString += sep + *li;
+ sep = ";";
+ }
+
std::vector<IncludeDirectoriesEntry>::iterator position =
- before ? this->IncludeDirectoriesEntries.begin()
- : this->IncludeDirectoriesEntries.end();
+ before ? this->IncludeDirectoriesEntries.begin()
+ : this->IncludeDirectoriesEntries.end();
cmListFileBacktrace lfbt;
this->GetBacktrace(lfbt);
- IncludeDirectoriesEntry entry(inc, lfbt);
+ IncludeDirectoriesEntry entry(incString, lfbt);
this->IncludeDirectoriesEntries.insert(position, entry);
// Property on each target:
@@ -1642,9 +1653,14 @@ void cmMakefile::AddIncludeDirectory(const char* inc, bool before)
}
//----------------------------------------------------------------------------
-void cmMakefile::AddSystemIncludeDirectory(const char* dir)
+void
+cmMakefile::AddSystemIncludeDirectories(const std::set<cmStdString> &incs)
{
- this->SystemIncludeDirectories.insert(dir);
+ for(std::set<cmStdString>::const_iterator li = incs.begin();
+ li != incs.end(); ++li)
+ {
+ this->SystemIncludeDirectories.insert(*li);
+ }
}
//----------------------------------------------------------------------------