cmMakefileTargetGenerator: Require cmGeneratorTarget.

This commit is contained in:
Stephen Kelly 2015-06-06 14:57:26 +02:00 committed by Brad King
parent bb88668add
commit 5aa556be56
5 changed files with 8 additions and 9 deletions

View File

@ -22,7 +22,7 @@
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
cmMakefileExecutableTargetGenerator cmMakefileExecutableTargetGenerator
::cmMakefileExecutableTargetGenerator(cmGeneratorTarget* target): ::cmMakefileExecutableTargetGenerator(cmGeneratorTarget* target):
cmMakefileTargetGenerator(target->Target) cmMakefileTargetGenerator(target)
{ {
this->CustomCommandDriver = OnDepends; this->CustomCommandDriver = OnDepends;
this->Target->GetExecutableNames( this->Target->GetExecutableNames(

View File

@ -22,7 +22,7 @@
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
cmMakefileLibraryTargetGenerator cmMakefileLibraryTargetGenerator
::cmMakefileLibraryTargetGenerator(cmGeneratorTarget* target): ::cmMakefileLibraryTargetGenerator(cmGeneratorTarget* target):
cmMakefileTargetGenerator(target->Target) cmMakefileTargetGenerator(target)
{ {
this->CustomCommandDriver = OnDepends; this->CustomCommandDriver = OnDepends;
if (this->Target->GetType() != cmTarget::INTERFACE_LIBRARY) if (this->Target->GetType() != cmTarget::INTERFACE_LIBRARY)

View File

@ -32,7 +32,7 @@
#include <ctype.h> #include <ctype.h>
cmMakefileTargetGenerator::cmMakefileTargetGenerator(cmTarget* target) cmMakefileTargetGenerator::cmMakefileTargetGenerator(cmGeneratorTarget* target)
: OSXBundleGenerator(0) : OSXBundleGenerator(0)
, MacOSXContentGenerator(0) , MacOSXContentGenerator(0)
{ {
@ -41,16 +41,15 @@ cmMakefileTargetGenerator::cmMakefileTargetGenerator(cmTarget* target)
this->FlagFileStream = 0; this->FlagFileStream = 0;
this->CustomCommandDriver = OnBuild; this->CustomCommandDriver = OnBuild;
this->FortranModuleDirectoryComputed = false; this->FortranModuleDirectoryComputed = false;
this->Target = target; this->Target = target->Target;
this->Makefile = this->Target->GetMakefile(); this->Makefile = this->Target->GetMakefile();
this->LocalGenerator = this->LocalGenerator =
static_cast<cmLocalUnixMakefileGenerator3*>( static_cast<cmLocalUnixMakefileGenerator3*>(target->GetLocalGenerator());
this->Makefile->GetLocalGenerator());
this->ConfigName = this->LocalGenerator->ConfigurationName.c_str(); this->ConfigName = this->LocalGenerator->ConfigurationName.c_str();
this->GlobalGenerator = this->GlobalGenerator =
static_cast<cmGlobalUnixMakefileGenerator3*>( static_cast<cmGlobalUnixMakefileGenerator3*>(
this->LocalGenerator->GetGlobalGenerator()); this->LocalGenerator->GetGlobalGenerator());
this->GeneratorTarget = this->GlobalGenerator->GetGeneratorTarget(target); this->GeneratorTarget = target;
cmake* cm = this->GlobalGenerator->GetCMakeInstance(); cmake* cm = this->GlobalGenerator->GetCMakeInstance();
this->NoRuleMessages = false; this->NoRuleMessages = false;
if(const char* ruleStatus = cm->GetState() if(const char* ruleStatus = cm->GetState()

View File

@ -34,7 +34,7 @@ class cmMakefileTargetGenerator
{ {
public: public:
// constructor to set the ivars // constructor to set the ivars
cmMakefileTargetGenerator(cmTarget* target); cmMakefileTargetGenerator(cmGeneratorTarget* target);
virtual ~cmMakefileTargetGenerator(); virtual ~cmMakefileTargetGenerator();
// construct using this factory call // construct using this factory call

View File

@ -21,7 +21,7 @@
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
cmMakefileUtilityTargetGenerator cmMakefileUtilityTargetGenerator
::cmMakefileUtilityTargetGenerator(cmGeneratorTarget* target): ::cmMakefileUtilityTargetGenerator(cmGeneratorTarget* target):
cmMakefileTargetGenerator(target->Target) cmMakefileTargetGenerator(target)
{ {
this->CustomCommandDriver = OnUtility; this->CustomCommandDriver = OnUtility;
this->OSXBundleGenerator = new cmOSXBundleGenerator(target, this->OSXBundleGenerator = new cmOSXBundleGenerator(target,