mirror of
https://github.com/Kitware/CMake.git
synced 2026-03-18 01:31:04 -05:00
cmMakefile: Simplify filename handling.
This method has only one caller.
This commit is contained in:
@@ -536,21 +536,17 @@ bool cmMakefile::ProcessBuildsystemFile(const char* filename)
|
||||
{
|
||||
this->AddDefinition("CMAKE_PARENT_LIST_FILE", filename);
|
||||
std::string curSrc = this->GetCurrentSourceDirectory();
|
||||
std::string filenametoread =
|
||||
cmSystemTools::CollapseFullPath(filename,
|
||||
this->GetCurrentSourceDirectory());
|
||||
|
||||
this->ListFileStack.push_back(filenametoread);
|
||||
this->ListFileStack.push_back(filename);
|
||||
|
||||
cmListFile listFile;
|
||||
if (!listFile.ParseFile(filenametoread.c_str(),
|
||||
curSrc == this->GetHomeDirectory(), this))
|
||||
if (!listFile.ParseFile(filename, curSrc == this->GetHomeDirectory(), this))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
this->PushPolicyBarrier();
|
||||
this->ReadListFile(listFile, filenametoread);
|
||||
this->ReadListFile(listFile, filename);
|
||||
this->PopPolicyBarrier(!cmSystemTools::GetFatalErrorOccured());
|
||||
this->EnforceDirectoryLevelRules();
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user