cmMakefile: Optimize AddSystemIncludeDirectories for empty set

Do not bother looping over all targets if we have no system include
directories to add anyway.
This commit is contained in:
Brad King 2016-05-24 11:38:18 -04:00
parent a896043bac
commit 4419909756
1 changed files with 4 additions and 0 deletions

View File

@ -1574,6 +1574,10 @@ void cmMakefile::AddIncludeDirectories(const std::vector<std::string>& incs,
void cmMakefile::AddSystemIncludeDirectories(const std::set<std::string>& incs)
{
if (incs.empty()) {
return;
}
this->SystemIncludeDirectories.insert(incs.begin(), incs.end());
for (cmTargets::iterator l = this->Targets.begin(); l != this->Targets.end();