cmMakefile: Use the state to determine the parent directory.
Do not depend on the local generator for that.
This commit is contained in:
parent
115e919982
commit
894961af16
|
@ -4117,11 +4117,12 @@ const char *cmMakefile::GetProperty(const std::string& prop,
|
||||||
output = "";
|
output = "";
|
||||||
if (prop == "PARENT_DIRECTORY")
|
if (prop == "PARENT_DIRECTORY")
|
||||||
{
|
{
|
||||||
if(cmLocalGenerator* plg = this->LocalGenerator->GetParent())
|
cmState::Snapshot parent = this->StateSnapshot.GetParent();
|
||||||
|
if(parent.IsValid())
|
||||||
{
|
{
|
||||||
output = plg->GetMakefile()->GetCurrentSourceDirectory();
|
return parent.GetCurrentSourceDirectory();
|
||||||
}
|
}
|
||||||
return output.c_str();
|
return "";
|
||||||
}
|
}
|
||||||
else if (prop == "INCLUDE_REGULAR_EXPRESSION" )
|
else if (prop == "INCLUDE_REGULAR_EXPRESSION" )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue