cmCommonTargetGenerator: Adopt ConfigName member

De-duplicate the member from the Makefile and Ninja target generators.
This commit is contained in:
Brad King 2015-07-08 15:02:11 -04:00
parent 9d41f6d87b
commit abfa5f2d1f
6 changed files with 9 additions and 9 deletions

View File

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

View File

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

View File

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

View File

@ -177,7 +177,6 @@ protected:
std::string& linkFlags);
cmLocalUnixMakefileGenerator3 *LocalGenerator;
cmGlobalUnixMakefileGenerator3 *GlobalGenerator;
std::string ConfigName;
enum CustomCommandDriveType { OnBuild, OnDepends, OnUtility };
CustomCommandDriveType CustomCommandDriver;

View File

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

View File

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