From 2dd5d42f5254abda64009434f0b11a47ca16640e Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Fri, 15 May 2015 00:09:53 +0200 Subject: [PATCH] cmMakefile: Make the public ReadListFile method take one param. Make the existing method a private overload. All external callers invoke the method with only one argument. --- Source/cmMakefile.cxx | 10 ++++++---- Source/cmMakefile.h | 11 +++++------ 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index e69c2bab0..016425e14 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -610,12 +610,14 @@ bool cmMakefile::ReadDependentFile(const char* listfile, bool noPolicyScope) { this->AddDefinition("CMAKE_PARENT_LIST_FILE", this->GetDefinition("CMAKE_CURRENT_LIST_FILE")); - return this->ReadListFile(listfile, noPolicyScope); + return this->ReadListFile(listfile, noPolicyScope, false); +} + +bool cmMakefile::ReadListFile(const char* listfile) +{ + return this->ReadListFile(listfile, true, false); } -//---------------------------------------------------------------------------- -// Parse the given CMakeLists.txt file executing all commands -// bool cmMakefile::ReadListFile(const char* listfile, bool noPolicyScope, bool requireProjectCommand) diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 2a72cca5d..8c50e8ee0 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -84,12 +84,7 @@ public: */ ~cmMakefile(); - /** - * Read and parse a CMakeLists.txt file. - */ - bool ReadListFile(const char* listfile, - bool noPolicyScope = true, - bool requireProjectCommand = false); + bool ReadListFile(const char* listfile); bool ReadDependentFile(const char* listfile, bool noPolicyScope = true); @@ -902,6 +897,10 @@ private: cmState::Snapshot StateSnapshot; + bool ReadListFile(const char* listfile, + bool noPolicyScope, + bool requireProjectCommand); + bool ReadListFileInternal(const char* filenametoread, bool noPolicyScope, bool requireProjectCommand);