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

cmMakefile: Inline ReadListFileInternal into caller.

parent 254be613
......@@ -595,22 +595,6 @@ bool cmMakefile::ReadListFile(const char* listfile,
this->MarkVariableAsUsed("CMAKE_CURRENT_LIST_FILE");
this->MarkVariableAsUsed("CMAKE_CURRENT_LIST_DIR");
this->ReadListFileInternal(listFile);
this->CheckForUnusedVariables();
this->AddDefinition("CMAKE_PARENT_LIST_FILE", currentParentFile.c_str());
this->AddDefinition("CMAKE_CURRENT_LIST_FILE", currentFile.c_str());
this->AddDefinition("CMAKE_CURRENT_LIST_DIR",
cmSystemTools::GetFilenamePath(currentFile).c_str());
this->MarkVariableAsUsed("CMAKE_PARENT_LIST_FILE");
this->MarkVariableAsUsed("CMAKE_CURRENT_LIST_FILE");
this->MarkVariableAsUsed("CMAKE_CURRENT_LIST_DIR");
return true;
}
void cmMakefile::ReadListFileInternal(cmListFile const& listFile)
{
// Enforce balanced blocks (if/endif, function/endfunction, etc.).
LexicalPushPop lexScope(this);
......@@ -632,6 +616,17 @@ void cmMakefile::ReadListFileInternal(cmListFile const& listFile)
break;
}
}
this->CheckForUnusedVariables();
this->AddDefinition("CMAKE_PARENT_LIST_FILE", currentParentFile.c_str());
this->AddDefinition("CMAKE_CURRENT_LIST_FILE", currentFile.c_str());
this->AddDefinition("CMAKE_CURRENT_LIST_DIR",
cmSystemTools::GetFilenamePath(currentFile).c_str());
this->MarkVariableAsUsed("CMAKE_PARENT_LIST_FILE");
this->MarkVariableAsUsed("CMAKE_CURRENT_LIST_FILE");
this->MarkVariableAsUsed("CMAKE_CURRENT_LIST_DIR");
return true;
}
//----------------------------------------------------------------------------
......
......@@ -917,8 +917,6 @@ private:
bool ReadListFile(const char* listfile,
bool requireProjectCommand);
void ReadListFileInternal(cmListFile const& listFile);
bool ParseDefineFlag(std::string const& definition, bool remove);
bool EnforceUniqueDir(const std::string& srcPath,
......
Markdown is supported
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