diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2010-09-16 17:52:17 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2010-09-16 17:52:17 (GMT) |
commit | 995cfb0e2a4d2787371f87568bc943e6ad34d55c (patch) | |
tree | b93c994fe1728bc0677eca08350877dd2fe912e7 /Source | |
parent | aefc91dd3750430e085417ed7047ca3c64cdab56 (diff) | |
download | CMake-995cfb0e2a4d2787371f87568bc943e6ad34d55c.zip CMake-995cfb0e2a4d2787371f87568bc943e6ad34d55c.tar.gz CMake-995cfb0e2a4d2787371f87568bc943e6ad34d55c.tar.bz2 |
Don't warn if the variable wasn't defined
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmMakefile.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index a7f86ae..1e12658 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1783,8 +1783,13 @@ void cmMakefile::CheckForUnused(const char* reason, const char* name) const void cmMakefile::RemoveDefinition(const char* name) { this->Internal->VarStack.top().Set(name, 0); + if (this->Internal->VarUsageStack.size() && + this->VariableInitialized(name)) + { + this->CheckForUnused("unsetting", name); + this->Internal->VarUsageStack.top().erase(name); + } this->Internal->VarInitStack.top().insert(name); - this->CheckForUnused("unsetting", name); #ifdef CMAKE_BUILD_WITH_CMAKE cmVariableWatch* vv = this->GetVariableWatch(); if ( vv ) |