mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-14 10:30:15 -05:00
BUG: Fix PARENT_DIRECTORY property in top-level to not crash.
This commit is contained in:
@@ -2908,8 +2908,10 @@ const char *cmMakefile::GetProperty(const char* prop,
|
||||
output = "";
|
||||
if (!strcmp("PARENT_DIRECTORY",prop))
|
||||
{
|
||||
output = this->LocalGenerator->GetParent()
|
||||
->GetMakefile()->GetStartDirectory();
|
||||
if(cmLocalGenerator* plg = this->LocalGenerator->GetParent())
|
||||
{
|
||||
output = plg->GetMakefile()->GetStartDirectory();
|
||||
}
|
||||
return output.c_str();
|
||||
}
|
||||
else if (!strcmp("INCLUDE_REGULAR_EXPRESSION",prop) )
|
||||
|
||||
Reference in New Issue
Block a user