From 62be1f78aea0f38e245e7f8b748a24f95eadb37a Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Wed, 22 Sep 2010 12:41:29 -0400 Subject: Initialize the usage stack earlier --- Source/cmMakefile.cxx | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 5aa643c..70d3495 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -54,6 +54,7 @@ cmMakefile::cmMakefile(): Internal(new Internals) const std::set globalKeys = defs.LocalKeys(); this->Internal->VarStack.push(defs); this->Internal->VarInitStack.push(globalKeys); + this->Internal->VarUsageStack.push(globalKeys); // Setup the default include file regular expression (match everything). this->IncludeFileRegularExpression = "^.*$"; @@ -775,20 +776,7 @@ void cmMakefile::SetLocalGenerator(cmLocalGenerator* lg) this->AddSourceGroup("Resources", "\\.plist$"); #endif - if (this->Internal->VarUsageStack.empty()) - { - const cmDefinitions& defs = cmDefinitions(); - const std::set globalKeys = defs.LocalKeys(); - this->WarnUnused = this->GetCMakeInstance()->GetWarnUnused(); - if (this->WarnUnused) - { - this->Internal->VarUsageStack.push(globalKeys); - } - else - { - this->Internal->VarUsageStack.push(std::set()); - } - } + this->WarnUnused = this->GetCMakeInstance()->GetWarnUnused(); this->CheckSystemVars = this->GetCMakeInstance()->GetCheckSystemVars(); } -- cgit v0.12