summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-07-22 18:22:45 (GMT)
committerBrad King <brad.king@kitware.com>2009-07-22 18:22:45 (GMT)
commitfd10589995fe942ceecbc0e1d5f869a534abdbba (patch)
treeccf5fcb2f87b072108fb9f859d311e345720007a /Source/cmMakefile.h
parent267085f338c917f72950ca55f5cc09760cb4a894 (diff)
downloadCMake-fd10589995fe942ceecbc0e1d5f869a534abdbba.zip
CMake-fd10589995fe942ceecbc0e1d5f869a534abdbba.tar.gz
CMake-fd10589995fe942ceecbc0e1d5f869a534abdbba.tar.bz2
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.
Diffstat (limited to 'Source/cmMakefile.h')
-rw-r--r--Source/cmMakefile.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 7a235f9..5cd3587 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -56,6 +56,8 @@ class cmCMakePolicyCommand;
*/
class cmMakefile
{
+ class Internals;
+ cmsys::auto_ptr<Internals> Internal;
public:
/**
* Return the major and minor version of the cmake that
@@ -792,7 +794,6 @@ public:
// Get the properties
cmPropertyMap &GetProperties() { return this->Properties; };
- typedef std::map<cmStdString, cmStdString> DefinitionMap;
///! Initialize a makefile from its parent
void InitializeFromParent();
@@ -889,7 +890,6 @@ protected:
std::vector<cmSourceGroup> SourceGroups;
#endif
- std::vector<DefinitionMap> DefinitionStack;
std::vector<cmCommand*> UsedCommands;
cmLocalGenerator* LocalGenerator;
bool IsFunctionBlocked(const cmListFileFunction& lff,
@@ -924,8 +924,6 @@ private:
StringStringMap MacrosMap;
std::map<cmStdString, bool> SubDirectoryOrder;
- // used in AddDefinition for performance improvement
- DefinitionMap::key_type TemporaryDefinitionKey;
cmsys::RegularExpression cmDefineRegex;
cmsys::RegularExpression cmDefine01Regex;