diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2010-09-15 15:34:35 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2010-09-15 15:34:35 (GMT) |
commit | 02a114dfe8304e6fa90b9c6565349eb7e0fb1168 (patch) | |
tree | a2420a27a7c010d76daa16163e4c1959784e788e /Source | |
parent | a0b0d23f0cc3f596135ace5d675bbb09911b7f02 (diff) | |
download | CMake-02a114dfe8304e6fa90b9c6565349eb7e0fb1168.zip CMake-02a114dfe8304e6fa90b9c6565349eb7e0fb1168.tar.gz CMake-02a114dfe8304e6fa90b9c6565349eb7e0fb1168.tar.bz2 |
Add method to allow variables to be marked as used
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmMakefile.cxx | 5 | ||||
-rw-r--r-- | Source/cmMakefile.h | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 4084d0e..85a0ccc 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1735,6 +1735,11 @@ void cmMakefile::AddDefinition(const char* name, bool value) #endif } +void cmMakefile::MarkVariableAsUsed(const char* var) +{ + this->Internal->VarUsageStack.top().insert(var); +} + bool cmMakefile::VariableInitialized(const char* var) const { if(this->Internal->VarInitStack.top().find(var) != this->Internal->VarInitStack.top().end()) diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 89979d6..6b0bfa2 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -61,6 +61,8 @@ public: unsigned int GetCacheMajorVersion(); unsigned int GetCacheMinorVersion(); + /* Mark a variable as used */ + void MarkVariableAsUsed(const char* var); /* return true if a variable has been initialized */ bool VariableInitialized(const char* ) const; /* return true if a variable has been used */ |