cmMakefile: Simplify filename handling.
This method has only one caller.
This commit is contained in:
parent
5c83768628
commit
81eb2c58a1
|
@ -536,21 +536,17 @@ bool cmMakefile::ProcessBuildsystemFile(const char* filename)
|
||||||
{
|
{
|
||||||
this->AddDefinition("CMAKE_PARENT_LIST_FILE", filename);
|
this->AddDefinition("CMAKE_PARENT_LIST_FILE", filename);
|
||||||
std::string curSrc = this->GetCurrentSourceDirectory();
|
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;
|
cmListFile listFile;
|
||||||
if (!listFile.ParseFile(filenametoread.c_str(),
|
if (!listFile.ParseFile(filename, curSrc == this->GetHomeDirectory(), this))
|
||||||
curSrc == this->GetHomeDirectory(), this))
|
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
this->PushPolicyBarrier();
|
this->PushPolicyBarrier();
|
||||||
this->ReadListFile(listFile, filenametoread);
|
this->ReadListFile(listFile, filename);
|
||||||
this->PopPolicyBarrier(!cmSystemTools::GetFatalErrorOccured());
|
this->PopPolicyBarrier(!cmSystemTools::GetFatalErrorOccured());
|
||||||
this->EnforceDirectoryLevelRules();
|
this->EnforceDirectoryLevelRules();
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue