Use new top-level check abstraction.

This commit is contained in:
Stephen Kelly 2015-05-14 20:47:36 +02:00
parent c5059c9000
commit 115e919982
2 changed files with 3 additions and 3 deletions

View File

@ -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<cmLocalUnixMakefileGenerator3 *>(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();

View File

@ -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