Add method to allow variables to be marked as used
This commit is contained in:
parent
a0b0d23f0c
commit
02a114dfe8
|
@ -1735,6 +1735,11 @@ void cmMakefile::AddDefinition(const char* name, bool value)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void cmMakefile::MarkVariableAsUsed(const char* var)
|
||||||
|
{
|
||||||
|
this->Internal->VarUsageStack.top().insert(var);
|
||||||
|
}
|
||||||
|
|
||||||
bool cmMakefile::VariableInitialized(const char* var) const
|
bool cmMakefile::VariableInitialized(const char* var) const
|
||||||
{
|
{
|
||||||
if(this->Internal->VarInitStack.top().find(var) != this->Internal->VarInitStack.top().end())
|
if(this->Internal->VarInitStack.top().find(var) != this->Internal->VarInitStack.top().end())
|
||||||
|
|
|
@ -61,6 +61,8 @@ public:
|
||||||
unsigned int GetCacheMajorVersion();
|
unsigned int GetCacheMajorVersion();
|
||||||
unsigned int GetCacheMinorVersion();
|
unsigned int GetCacheMinorVersion();
|
||||||
|
|
||||||
|
/* Mark a variable as used */
|
||||||
|
void MarkVariableAsUsed(const char* var);
|
||||||
/* return true if a variable has been initialized */
|
/* return true if a variable has been initialized */
|
||||||
bool VariableInitialized(const char* ) const;
|
bool VariableInitialized(const char* ) const;
|
||||||
/* return true if a variable has been used */
|
/* return true if a variable has been used */
|
||||||
|
|
Loading…
Reference in New Issue