cmCommonTargetGenerator: Adopt ConfigName member
De-duplicate the member from the Makefile and Ninja target generators.
This commit is contained in:
parent
9d41f6d87b
commit
abfa5f2d1f
|
@ -23,9 +23,15 @@ cmCommonTargetGenerator::cmCommonTargetGenerator(cmGeneratorTarget* gt)
|
|||
, LocalGenerator(static_cast<cmLocalCommonGenerator*>(gt->LocalGenerator))
|
||||
, GlobalGenerator(static_cast<cmGlobalCommonGenerator*>(
|
||||
gt->LocalGenerator->GetGlobalGenerator()))
|
||||
, ConfigName(LocalGenerator->GetConfigName())
|
||||
{
|
||||
}
|
||||
|
||||
cmCommonTargetGenerator::~cmCommonTargetGenerator()
|
||||
{
|
||||
}
|
||||
|
||||
std::string const& cmCommonTargetGenerator::GetConfigName() const
|
||||
{
|
||||
return this->ConfigName;
|
||||
}
|
||||
|
|
|
@ -29,12 +29,15 @@ public:
|
|||
cmCommonTargetGenerator(cmGeneratorTarget* gt);
|
||||
virtual ~cmCommonTargetGenerator();
|
||||
|
||||
std::string const& GetConfigName() const;
|
||||
|
||||
protected:
|
||||
cmGeneratorTarget* GeneratorTarget;
|
||||
cmTarget* Target;
|
||||
cmMakefile* Makefile;
|
||||
cmLocalCommonGenerator* LocalGenerator;
|
||||
cmGlobalCommonGenerator* GlobalGenerator;
|
||||
std::string ConfigName;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -44,7 +44,6 @@ cmMakefileTargetGenerator::cmMakefileTargetGenerator(cmGeneratorTarget* target)
|
|||
this->FortranModuleDirectoryComputed = false;
|
||||
this->LocalGenerator =
|
||||
static_cast<cmLocalUnixMakefileGenerator3*>(target->GetLocalGenerator());
|
||||
this->ConfigName = this->LocalGenerator->GetConfigName().c_str();
|
||||
this->GlobalGenerator =
|
||||
static_cast<cmGlobalUnixMakefileGenerator3*>(
|
||||
this->LocalGenerator->GetGlobalGenerator());
|
||||
|
|
|
@ -177,7 +177,6 @@ protected:
|
|||
std::string& linkFlags);
|
||||
cmLocalUnixMakefileGenerator3 *LocalGenerator;
|
||||
cmGlobalUnixMakefileGenerator3 *GlobalGenerator;
|
||||
std::string ConfigName;
|
||||
|
||||
enum CustomCommandDriveType { OnBuild, OnDepends, OnUtility };
|
||||
CustomCommandDriveType CustomCommandDriver;
|
||||
|
|
|
@ -89,11 +89,6 @@ cmGlobalNinjaGenerator* cmNinjaTargetGenerator::GetGlobalGenerator() const
|
|||
return this->LocalGenerator->GetGlobalNinjaGenerator();
|
||||
}
|
||||
|
||||
std::string const& cmNinjaTargetGenerator::GetConfigName() const
|
||||
{
|
||||
return this->LocalGenerator->GetConfigName();
|
||||
}
|
||||
|
||||
std::string cmNinjaTargetGenerator::LanguageCompilerRule(
|
||||
const std::string& lang) const
|
||||
{
|
||||
|
|
|
@ -67,8 +67,6 @@ protected:
|
|||
cmMakefile* GetMakefile() const
|
||||
{ return this->Makefile; }
|
||||
|
||||
std::string const& GetConfigName() const;
|
||||
|
||||
std::string LanguageCompilerRule(const std::string& lang) const;
|
||||
|
||||
const char* GetFeature(const std::string& feature);
|
||||
|
|
Loading…
Reference in New Issue