summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2008-03-06 15:57:59 (GMT)
committerKen Martin <ken.martin@kitware.com>2008-03-06 15:57:59 (GMT)
commitadddcea5d7e52d4ef0522a2dbefa3d952f1da333 (patch)
tree922dceb2f4c400e2d0a1dfed6c799f828a553f10 /Source/cmMakefile.cxx
parentea525a4fb4d04dcaaf074544126db9b700e38457 (diff)
downloadCMake-adddcea5d7e52d4ef0522a2dbefa3d952f1da333.zip
CMake-adddcea5d7e52d4ef0522a2dbefa3d952f1da333.tar.gz
CMake-adddcea5d7e52d4ef0522a2dbefa3d952f1da333.tar.bz2
BUG: change the handling of CMAKE_MINIMUM_REQUIRED and BACKWARDS_COMPATIBILITY and extend the documentaiton quite a bit
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx15
1 files changed, 9 insertions, 6 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 370439d..df93dc0 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -46,9 +46,6 @@ 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).
@@ -138,7 +135,6 @@ cmMakefile::cmMakefile(const cmMakefile& mf)
this->PreOrder = mf.PreOrder;
this->ListFileStack = mf.ListFileStack;
this->Initialize();
- this->PushPolicy();
}
//----------------------------------------------------------------------------
@@ -147,6 +143,9 @@ void cmMakefile::Initialize()
this->cmDefineRegex.compile("#cmakedefine[ \t]+([A-Za-z_0-9]*)");
this->cmDefine01Regex.compile("#cmakedefine01[ \t]+([A-Za-z_0-9]*)");
this->cmAtVarRegex.compile("(@[A-Za-z_0-9/.+-]+@)");
+
+ // Enter a policy level for this directory.
+ this->PushPolicy();
}
unsigned int cmMakefile::GetCacheMajorVersion()
@@ -208,7 +207,11 @@ cmMakefile::~cmMakefile()
delete b;
}
this->FunctionBlockers.clear();
- this->PolicyStack.pop_back();
+ if (this->PolicyStack.size() != 1)
+ {
+ cmSystemTools::Error("Internal CMake Error, Policy Stack has not been"
+ " popped properly");
+ }
}
void cmMakefile::PrintStringVector(const char* s,
@@ -453,7 +456,7 @@ bool cmMakefile::ReadListFile(const char* filename_in,
*fullPath=filenametoread;
}
cmListFile cacheFile;
- if( !cacheFile.ParseFile(filenametoread, requireProjectCommand) )
+ if( !cacheFile.ParseFile(filenametoread, requireProjectCommand, this) )
{
// pop the listfile off the stack
this->ListFileStack.pop_back();