summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmMakefile.h')
-rw-r--r--Source/cmMakefile.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index bf97975..5e87393 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -821,7 +821,18 @@ protected:
// libraries, classes, and executables
mutable cmTargets Targets;
std::map<std::string, std::string> AliasTargets;
- std::vector<cmSourceFile*> SourceFiles;
+
+ typedef std::vector<cmSourceFile*> SourceFileVec;
+ SourceFileVec SourceFiles;
+
+ // Because cmSourceFile names are compared in a fuzzy way (see
+ // cmSourceFileLocation::Match()) we can't have a straight mapping from
+ // filename to cmSourceFile. To make lookups more efficient we store the
+ // Name portion of the cmSourceFileLocation and then compare on the list of
+ // cmSourceFiles that might match that name. Note that on platforms which
+ // have a case-insensitive filesystem we store the key in all lowercase.
+ typedef std::unordered_map<std::string, SourceFileVec> SourceFileMap;
+ SourceFileMap SourceFileSearchIndex;
// Tests
std::map<std::string, cmTest*> Tests;