From 5e24ff17a22b780947e98eabc1d25320104f7b21 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sun, 21 Jun 2015 19:43:55 +0200 Subject: cmMakefile: Split file handling from execution. --- Source/cmMakefile.cxx | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 6b3c7df..e3a2e4c 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -561,6 +561,17 @@ bool cmMakefile::ReadListFile(const char* listfile, cmSystemTools::CollapseFullPath(listfile, this->GetCurrentSourceDirectory()); + this->ListFileStack.push_back(filenametoread); + + cmListFile listFile; + bool res = listFile.ParseFile(filenametoread.c_str(), + requireProjectCommand, this); + if (res) + { + // add this list file to the list of dependencies + this->ListFiles.push_back(filenametoread); + } + std::string currentParentFile = this->GetSafeDefinition("CMAKE_PARENT_LIST_FILE"); std::string currentFile @@ -574,16 +585,8 @@ bool cmMakefile::ReadListFile(const char* listfile, this->MarkVariableAsUsed("CMAKE_CURRENT_LIST_FILE"); this->MarkVariableAsUsed("CMAKE_CURRENT_LIST_DIR"); - this->ListFileStack.push_back(filenametoread); - - cmListFile listFile; - bool res = listFile.ParseFile(filenametoread.c_str(), - requireProjectCommand, this); if (res) { - // add this list file to the list of dependencies - this->ListFiles.push_back(filenametoread); - this->ReadListFileInternal(listFile, filenametoread.c_str(), noPolicyScope); -- cgit v0.12