summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-06-21 17:46:03 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-06-21 18:10:48 (GMT)
commit27f229b9707f3a87c3ed0d469b5b2d08c80076c5 (patch)
tree5a3e800b403210535d869c95c90274fe24f0c841 /Source
parent9166b49d70746dcd36e6e891c78734b559e0fccf (diff)
downloadCMake-27f229b9707f3a87c3ed0d469b5b2d08c80076c5.zip
CMake-27f229b9707f3a87c3ed0d469b5b2d08c80076c5.tar.gz
CMake-27f229b9707f3a87c3ed0d469b5b2d08c80076c5.tar.bz2
cmMakefile: Move include scope out of ReadListFileInternal.
Simplify the ReadListFileInternal API.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmMakefile.cxx13
-rw-r--r--Source/cmMakefile.h4
2 files changed, 8 insertions, 9 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 15a3710..836667c 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -586,7 +586,12 @@ bool cmMakefile::ReadListFile(const char* listfile,
this->MarkVariableAsUsed("CMAKE_CURRENT_LIST_FILE");
this->MarkVariableAsUsed("CMAKE_CURRENT_LIST_DIR");
- this->ReadListFileInternal(listFile, filenametoread.c_str(), noPolicyScope);
+ IncludeScope incScope(this, filenametoread.c_str(), noPolicyScope);
+ this->ReadListFileInternal(listFile);
+ if(cmSystemTools::GetFatalErrorOccured())
+ {
+ incScope.Quiet();
+ }
this->CheckForUnusedVariables();
this->AddDefinition("CMAKE_PARENT_LIST_FILE", currentParentFile.c_str());
@@ -600,12 +605,9 @@ bool cmMakefile::ReadListFile(const char* listfile,
return true;
}
-void cmMakefile::ReadListFileInternal(cmListFile const& listFile,
- const char* filenametoread,
- bool noPolicyScope)
+void cmMakefile::ReadListFileInternal(cmListFile const& listFile)
{
// Enforce balanced blocks (if/endif, function/endfunction, etc.).
- IncludeScope incScope(this, filenametoread, noPolicyScope);
LexicalPushPop lexScope(this);
// Run the parsed commands.
@@ -618,7 +620,6 @@ void cmMakefile::ReadListFileInternal(cmListFile const& listFile,
{
// Exit early due to error.
lexScope.Quiet();
- incScope.Quiet();
break;
}
if(status.GetReturnInvoked())
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index b80a1ee..2db7c93 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -918,9 +918,7 @@ private:
bool noPolicyScope,
bool requireProjectCommand);
- void ReadListFileInternal(cmListFile const& listFile,
- const char* filenametoread,
- bool noPolicyScope);
+ void ReadListFileInternal(cmListFile const& listFile);
bool ParseDefineFlag(std::string const& definition, bool remove);