Commit ddd6ce04 authored by Brad King's avatar Brad King
Browse files

BUG: Make sure at least one policy stack entry is created for every cmMakefile instance.

parent 2f922c62
......@@ -46,6 +46,9 @@ cmMakefile::cmMakefile()
{
this->DefinitionStack.push_back(DefinitionMap());
// Enter a policy level for this directory.
this->PushPolicy();
// Setup the default include file regular expression (match everything).
this->IncludeFileRegularExpression = "^.*$";
// Setup the default include complaint regular expression (match nothing).
......@@ -3314,7 +3317,7 @@ bool cmMakefile::PushPolicy()
bool cmMakefile::PopPolicy()
{
if (PolicyStack.size() == 0)
if (PolicyStack.size() == 1)
{
cmSystemTools::Error("Attempt to pop the policy stack past "
"it's beginning.");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment