diff options
author | Brad King <brad.king@kitware.com> | 2016-05-24 15:38:18 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-05-24 15:40:35 (GMT) |
commit | 4419909756751170d6fd4248b205c96767220dee (patch) | |
tree | 92752b521bc9abf39fbcc3f3076ff080889fa8b1 | |
parent | a896043bacdd0cb2597fa10074302ed8a9a5e138 (diff) | |
download | CMake-4419909756751170d6fd4248b205c96767220dee.zip CMake-4419909756751170d6fd4248b205c96767220dee.tar.gz CMake-4419909756751170d6fd4248b205c96767220dee.tar.bz2 |
cmMakefile: Optimize AddSystemIncludeDirectories for empty set
Do not bother looping over all targets if we have no system include
directories to add anyway.
-rw-r--r-- | Source/cmMakefile.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
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<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(); |