From 4419909756751170d6fd4248b205c96767220dee Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 24 May 2016 11:38:18 -0400 Subject: cmMakefile: Optimize AddSystemIncludeDirectories for empty set Do not bother looping over all targets if we have no system include directories to add anyway. --- Source/cmMakefile.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 7e99f2c..e684689 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1574,6 +1574,10 @@ void cmMakefile::AddIncludeDirectories(const std::vector& incs, void cmMakefile::AddSystemIncludeDirectories(const std::set& incs) { + if (incs.empty()) { + return; + } + this->SystemIncludeDirectories.insert(incs.begin(), incs.end()); for (cmTargets::iterator l = this->Targets.begin(); l != this->Targets.end(); -- cgit v0.12