From 115e9199822a6c9395cc3bb55c57e061b5fc6315 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Thu, 14 May 2015 20:47:36 +0200 Subject: [PATCH] Use new top-level check abstraction. --- Source/cmGlobalUnixMakefileGenerator3.cxx | 4 ++-- Source/cmProjectCommand.cxx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index f5731f4d5..a4df493a0 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -522,7 +522,7 @@ cmGlobalUnixMakefileGenerator3 cmLocalUnixMakefileGenerator3* lg) { // Only subdirectories need these rules. - if(!lg->GetParent()) + if(lg->IsRootMakefile()) { return; } @@ -1027,7 +1027,7 @@ void cmGlobalUnixMakefileGenerator3::WriteHelpRule static_cast(this->LocalGenerators[i]); // for the passed in makefile or if this is the top Makefile wripte out // the targets - if (lg2 == lg || !lg->GetParent()) + if (lg2 == lg || lg->IsRootMakefile()) { // for each target Generate the rule files for each target. cmTargets& targets = lg2->GetMakefile()->GetTargets(); diff --git a/Source/cmProjectCommand.cxx b/Source/cmProjectCommand.cxx index a9029a00f..176cb0d71 100644 --- a/Source/cmProjectCommand.cxx +++ b/Source/cmProjectCommand.cxx @@ -53,7 +53,7 @@ bool cmProjectCommand // CMAKE_PROJECT_NAME will match PROJECT_NAME, and cmake --build // will work. if(!this->Makefile->GetDefinition("CMAKE_PROJECT_NAME") - || (this->Makefile->GetLocalGenerator()->GetParent() == 0) ) + || (this->Makefile->GetLocalGenerator()->IsRootMakefile())) { this->Makefile->AddDefinition("CMAKE_PROJECT_NAME", args[0].c_str()); this->Makefile->AddCacheDefinition