diff options
author | Brad King <brad.king@kitware.com> | 2015-03-09 17:37:15 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-03-09 17:37:15 (GMT) |
commit | 244e3d0fc97433a9e75a82a64f98ea25ab11d3bb (patch) | |
tree | ed707c528027a48a1c4b820b8ec0505fc42b3891 | |
parent | 77f3804ab2c10228b55ce8f5d255ba5bef1537c1 (diff) | |
parent | a6b09085715d0d7f299e9ca76a4835ce5f5acfaf (diff) | |
download | CMake-244e3d0fc97433a9e75a82a64f98ea25ab11d3bb.zip CMake-244e3d0fc97433a9e75a82a64f98ea25ab11d3bb.tar.gz CMake-244e3d0fc97433a9e75a82a64f98ea25ab11d3bb.tar.bz2 |
Merge branch 'ninja-check-root-robustly' into release
-rw-r--r-- | Source/cmLocalGenerator.h | 2 | ||||
-rw-r--r-- | Source/cmLocalNinjaGenerator.cxx | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index 3a9d5be..d64ae0f 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -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 diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index 413dc0f..640c1b3 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -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() |