Skip to content
Snippets Groups Projects
Forked from CMake / CMake
Loading
  • Brad King's avatar
    fd105899
    ENH: Improve dynamic variable scope implementation · fd105899
    Brad King authored
    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.
    fd105899
    History
    ENH: Improve dynamic variable scope implementation
    Brad King authored
    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.