diff options
author | Brad King <brad.king@kitware.com> | 2008-03-04 23:57:14 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-03-04 23:57:14 (GMT) |
commit | ddd6ce04ecc2cd86c77f43b61563652b2a801fed (patch) | |
tree | 9ef32e314ba48f6cbfba3b891f42d6ac22305514 /Source/cmMakefile.cxx | |
parent | 2f922c6220704490912ce78a7dc5c8e07532b582 (diff) | |
download | CMake-ddd6ce04ecc2cd86c77f43b61563652b2a801fed.zip CMake-ddd6ce04ecc2cd86c77f43b61563652b2a801fed.tar.gz CMake-ddd6ce04ecc2cd86c77f43b61563652b2a801fed.tar.bz2 |
BUG: Make sure at least one policy stack entry is created for every cmMakefile instance.
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index a7488bd..9d109b6 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -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."); |