Use new top-level check abstraction.
This commit is contained in:
parent
c5059c9000
commit
115e919982
|
@ -522,7 +522,7 @@ cmGlobalUnixMakefileGenerator3
|
||||||
cmLocalUnixMakefileGenerator3* lg)
|
cmLocalUnixMakefileGenerator3* lg)
|
||||||
{
|
{
|
||||||
// Only subdirectories need these rules.
|
// Only subdirectories need these rules.
|
||||||
if(!lg->GetParent())
|
if(lg->IsRootMakefile())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1027,7 +1027,7 @@ void cmGlobalUnixMakefileGenerator3::WriteHelpRule
|
||||||
static_cast<cmLocalUnixMakefileGenerator3 *>(this->LocalGenerators[i]);
|
static_cast<cmLocalUnixMakefileGenerator3 *>(this->LocalGenerators[i]);
|
||||||
// for the passed in makefile or if this is the top Makefile wripte out
|
// for the passed in makefile or if this is the top Makefile wripte out
|
||||||
// the targets
|
// the targets
|
||||||
if (lg2 == lg || !lg->GetParent())
|
if (lg2 == lg || lg->IsRootMakefile())
|
||||||
{
|
{
|
||||||
// for each target Generate the rule files for each target.
|
// for each target Generate the rule files for each target.
|
||||||
cmTargets& targets = lg2->GetMakefile()->GetTargets();
|
cmTargets& targets = lg2->GetMakefile()->GetTargets();
|
||||||
|
|
|
@ -53,7 +53,7 @@ bool cmProjectCommand
|
||||||
// CMAKE_PROJECT_NAME will match PROJECT_NAME, and cmake --build
|
// CMAKE_PROJECT_NAME will match PROJECT_NAME, and cmake --build
|
||||||
// will work.
|
// will work.
|
||||||
if(!this->Makefile->GetDefinition("CMAKE_PROJECT_NAME")
|
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->AddDefinition("CMAKE_PROJECT_NAME", args[0].c_str());
|
||||||
this->Makefile->AddCacheDefinition
|
this->Makefile->AddCacheDefinition
|
||||||
|
|
Loading…
Reference in New Issue