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
provides a significant speedup. In our project with 16k targets I measured a factor 2 speedup in the Generate stage (from 7 to 3.5 minutes).
In addition the unused public GetImportedGeneratorTargets
method has been removed.