Performance: Improve efficiency of source file lookup in cmMakefile

Aaron Orenstein requested to merge aorenste/cmake:perf3 into master

This reintroduces !1154 (merged) which was rolled back by !1308 (merged) due to incompatibilities found.

Fixed the issue found by still iterating through the files in the original order but using the trimmed name to bucket the search list to a more reasonable size.

Topic-rename: perf-source-lookup

Edited by Brad King

Merge request reports