ENH: Improve dynamic variable scope implementation

Previously each new variable scope (subdirectory or function call) in
the CMake language created a complete copy of the key->value definition
map.  This avoids the copy using transitive lookups up the scope stack.
Results of queries answered by parents are stored locally to maintain
locality of reference.

The class cmDefinitions replaces cmMakefile::DefinitionsMap, and is
aware of its enclosing scope.  Each scope stores only the definitions
set (or unset!) inside it relative to the enclosing scope.
This commit is contained in:
Brad King
2009-07-22 14:22:45 -04:00
parent 267085f338
commit fd10589995
6 changed files with 302 additions and 96 deletions

View File

@@ -172,6 +172,7 @@ CMAKE_CXX_SOURCES="\
cmCommandArgumentLexer \
cmCommandArgumentParser \
cmCommandArgumentParserHelper \
cmDefinitions \
cmDepends \
cmDependsC \
cmDocumentationFormatter \