summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2010-09-16 17:52:17 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2010-09-16 17:52:17 (GMT)
commit995cfb0e2a4d2787371f87568bc943e6ad34d55c (patch)
treeb93c994fe1728bc0677eca08350877dd2fe912e7 /Source/cmMakefile.cxx
parentaefc91dd3750430e085417ed7047ca3c64cdab56 (diff)
downloadCMake-995cfb0e2a4d2787371f87568bc943e6ad34d55c.zip
CMake-995cfb0e2a4d2787371f87568bc943e6ad34d55c.tar.gz
CMake-995cfb0e2a4d2787371f87568bc943e6ad34d55c.tar.bz2
Don't warn if the variable wasn't defined
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx7
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 )