summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.h
diff options
context:
space:
mode:
authorFrank Winklmeier <frank.winklmeier@cern.ch>2018-01-29 15:11:07 (GMT)
committerBrad King <brad.king@kitware.com>2018-01-30 19:04:37 (GMT)
commitaed227fd5ae6775a5bbdd54540666a70163c9fcb (patch)
tree534caecf1db814281af95dbbe695f51d7e0ab740 /Source/cmLocalGenerator.h
parent4443adc1c0450a49a4413669a8ade5487f9f3026 (diff)
downloadCMake-aed227fd5ae6775a5bbdd54540666a70163c9fcb.zip
CMake-aed227fd5ae6775a5bbdd54540666a70163c9fcb.tar.gz
CMake-aed227fd5ae6775a5bbdd54540666a70163c9fcb.tar.bz2
cmLocalGenerator: change ImportedGeneratorTargets from vector to map
For large number of targets significant amount of time is spent in cmLocalGenerator::FindGeneratorTargetToUse, which uses find_if on a vector to locate the given target. Using a map instead of vector for ImportedGeneratorTargets (as done for cmMakefile::ImportedTargets) provides a significant speedup (up to factor of 2).
Diffstat (limited to 'Source/cmLocalGenerator.h')
-rw-r--r--Source/cmLocalGenerator.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index 2131085..58bbe77 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -389,7 +389,7 @@ protected:
std::vector<cmGeneratorTarget*> GeneratorTargets;
std::set<cmGeneratorTarget const*> WarnCMP0063;
- std::vector<cmGeneratorTarget*> ImportedGeneratorTargets;
+ GeneratorTargetMap ImportedGeneratorTargets;
std::vector<cmGeneratorTarget*> OwnedImportedGeneratorTargets;
std::map<std::string, std::string> AliasTargets;