Merge topic 'ninja-check-root-robustly'
a6b09085
Ninja: Improve internal check for generating at the top-level (#15436)
This commit is contained in:
commit
01fadeb205
|
@ -130,7 +130,7 @@ public:
|
|||
std::string ConvertToOptionallyRelativeOutputPath(const std::string& remote);
|
||||
|
||||
///! set/get the parent generator
|
||||
cmLocalGenerator* GetParent(){return this->Parent;}
|
||||
cmLocalGenerator* GetParent() const {return this->Parent;}
|
||||
void SetParent(cmLocalGenerator* g) { this->Parent = g; g->AddChild(this); }
|
||||
|
||||
///! set/get the children
|
||||
|
|
|
@ -182,8 +182,7 @@ cmake* cmLocalNinjaGenerator::GetCMakeInstance()
|
|||
|
||||
bool cmLocalNinjaGenerator::isRootMakefile() const
|
||||
{
|
||||
return (strcmp(this->Makefile->GetCurrentDirectory(),
|
||||
this->GetCMakeInstance()->GetHomeDirectory()) == 0);
|
||||
return !this->GetParent();
|
||||
}
|
||||
|
||||
void cmLocalNinjaGenerator::WriteBuildFileTop()
|
||||
|
|
Loading…
Reference in New Issue