Commit ac10fc09 authored by Stephen Kelly's avatar Stephen Kelly
Browse files

cmMakefile: Move listfile parsing responsibility.

parent 155ef535
...@@ -576,8 +576,14 @@ bool cmMakefile::ReadListFile(const char* listfile, ...@@ -576,8 +576,14 @@ bool cmMakefile::ReadListFile(const char* listfile,
this->ListFileStack.push_back(filenametoread); this->ListFileStack.push_back(filenametoread);
bool res = this->ReadListFileInternal(filenametoread.c_str(), cmListFile cacheFile;
noPolicyScope, requireProjectCommand); bool res = cacheFile.ParseFile(filenametoread.c_str(),
requireProjectCommand, this);
if (res)
{
this->ReadListFileInternal(cacheFile, filenametoread.c_str(),
noPolicyScope);
}
this->AddDefinition("CMAKE_PARENT_LIST_FILE", currentParentFile.c_str()); this->AddDefinition("CMAKE_PARENT_LIST_FILE", currentParentFile.c_str());
this->AddDefinition("CMAKE_CURRENT_LIST_FILE", currentFile.c_str()); this->AddDefinition("CMAKE_CURRENT_LIST_FILE", currentFile.c_str());
...@@ -595,15 +601,10 @@ bool cmMakefile::ReadListFile(const char* listfile, ...@@ -595,15 +601,10 @@ bool cmMakefile::ReadListFile(const char* listfile,
return res; return res;
} }
bool cmMakefile::ReadListFileInternal(const char* filenametoread, bool cmMakefile::ReadListFileInternal(cmListFile const& cacheFile,
bool noPolicyScope, const char* filenametoread,
bool requireProjectCommand) bool noPolicyScope)
{ {
cmListFile cacheFile;
if( !cacheFile.ParseFile(filenametoread, requireProjectCommand, this) )
{
return false;
}
// add this list file to the list of dependencies // add this list file to the list of dependencies
this->ListFiles.push_back( filenametoread); this->ListFiles.push_back( filenametoread);
......
...@@ -918,9 +918,9 @@ private: ...@@ -918,9 +918,9 @@ private:
bool noPolicyScope, bool noPolicyScope,
bool requireProjectCommand); bool requireProjectCommand);
bool ReadListFileInternal(const char* filenametoread, bool ReadListFileInternal(cmListFile const& cacheFile,
bool noPolicyScope, const char* filenametoread,
bool requireProjectCommand); bool noPolicyScope);
bool ParseDefineFlag(std::string const& definition, bool remove); bool ParseDefineFlag(std::string const& definition, bool remove);
......
Supports Markdown
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