cmMakefile: Move condition to the only calling context where it is true.
Call the Internal method with equivalent parameters, passing a null first argument. A duplicate path computation exists inside the external_in condition now, but that is harmless at this point.
This commit is contained in:
parent
5d4480a8c7
commit
9db1595410
|
@ -532,7 +532,11 @@ bool cmMakefile::ProcessBuildsystemFile(const char* listfile)
|
||||||
bool cmMakefile::ReadDependentFile(const char* listfile, bool noPolicyScope)
|
bool cmMakefile::ReadDependentFile(const char* listfile, bool noPolicyScope)
|
||||||
{
|
{
|
||||||
this->AddDefinition("CMAKE_PARENT_LIST_FILE", this->GetCurrentListFile());
|
this->AddDefinition("CMAKE_PARENT_LIST_FILE", this->GetCurrentListFile());
|
||||||
return this->ReadListFile(this->GetCurrentListFile(), listfile,
|
std::string filenametoread =
|
||||||
|
cmSystemTools::CollapseFullPath(listfile,
|
||||||
|
this->cmStartDirectory.c_str());
|
||||||
|
this->cmCurrentListFile = filenametoread;
|
||||||
|
return this->ReadListFile(0, filenametoread.c_str(),
|
||||||
noPolicyScope);
|
noPolicyScope);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -550,13 +554,6 @@ bool cmMakefile::ReadListFile(const char* filename_in,
|
||||||
filenametoread = filename_in;
|
filenametoread = filename_in;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (external_in && filename_in)
|
|
||||||
{
|
|
||||||
filenametoread =
|
|
||||||
cmSystemTools::CollapseFullPath(filename_in,
|
|
||||||
this->cmStartDirectory.c_str());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!filenametoread.empty())
|
if (!filenametoread.empty())
|
||||||
{
|
{
|
||||||
this->cmCurrentListFile = filenametoread;
|
this->cmCurrentListFile = filenametoread;
|
||||||
|
|
Loading…
Reference in New Issue