Initialize the usage stack earlier

This commit is contained in:
Ben Boeckel 2010-09-22 12:41:29 -04:00
parent c6e7fabc0f
commit 62be1f78ae
1 changed files with 2 additions and 14 deletions

View File

@ -54,6 +54,7 @@ cmMakefile::cmMakefile(): Internal(new Internals)
const std::set<cmStdString> 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<cmStdString> globalKeys = defs.LocalKeys();
this->WarnUnused = this->GetCMakeInstance()->GetWarnUnused();
if (this->WarnUnused)
{
this->Internal->VarUsageStack.push(globalKeys);
}
else
{
this->Internal->VarUsageStack.push(std::set<cmStdString>());
}
}
this->CheckSystemVars = this->GetCMakeInstance()->GetCheckSystemVars();
}