mirror of
https://github.com/reactos/CMake.git
synced 2025-02-07 20:38:49 +00:00
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))
|
, LocalGenerator(static_cast<cmLocalCommonGenerator*>(gt->LocalGenerator))
|
||||||
, GlobalGenerator(static_cast<cmGlobalCommonGenerator*>(
|
, GlobalGenerator(static_cast<cmGlobalCommonGenerator*>(
|
||||||
gt->LocalGenerator->GetGlobalGenerator()))
|
gt->LocalGenerator->GetGlobalGenerator()))
|
||||||
|
, ConfigName(LocalGenerator->GetConfigName())
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
cmCommonTargetGenerator::~cmCommonTargetGenerator()
|
cmCommonTargetGenerator::~cmCommonTargetGenerator()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string const& cmCommonTargetGenerator::GetConfigName() const
|
||||||
|
{
|
||||||
|
return this->ConfigName;
|
||||||
|
}
|
||||||
|
@ -29,12 +29,15 @@ public:
|
|||||||
cmCommonTargetGenerator(cmGeneratorTarget* gt);
|
cmCommonTargetGenerator(cmGeneratorTarget* gt);
|
||||||
virtual ~cmCommonTargetGenerator();
|
virtual ~cmCommonTargetGenerator();
|
||||||
|
|
||||||
|
std::string const& GetConfigName() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
cmGeneratorTarget* GeneratorTarget;
|
cmGeneratorTarget* GeneratorTarget;
|
||||||
cmTarget* Target;
|
cmTarget* Target;
|
||||||
cmMakefile* Makefile;
|
cmMakefile* Makefile;
|
||||||
cmLocalCommonGenerator* LocalGenerator;
|
cmLocalCommonGenerator* LocalGenerator;
|
||||||
cmGlobalCommonGenerator* GlobalGenerator;
|
cmGlobalCommonGenerator* GlobalGenerator;
|
||||||
|
std::string ConfigName;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -44,7 +44,6 @@ cmMakefileTargetGenerator::cmMakefileTargetGenerator(cmGeneratorTarget* target)
|
|||||||
this->FortranModuleDirectoryComputed = false;
|
this->FortranModuleDirectoryComputed = false;
|
||||||
this->LocalGenerator =
|
this->LocalGenerator =
|
||||||
static_cast<cmLocalUnixMakefileGenerator3*>(target->GetLocalGenerator());
|
static_cast<cmLocalUnixMakefileGenerator3*>(target->GetLocalGenerator());
|
||||||
this->ConfigName = this->LocalGenerator->GetConfigName().c_str();
|
|
||||||
this->GlobalGenerator =
|
this->GlobalGenerator =
|
||||||
static_cast<cmGlobalUnixMakefileGenerator3*>(
|
static_cast<cmGlobalUnixMakefileGenerator3*>(
|
||||||
this->LocalGenerator->GetGlobalGenerator());
|
this->LocalGenerator->GetGlobalGenerator());
|
||||||
|
@ -177,7 +177,6 @@ protected:
|
|||||||
std::string& linkFlags);
|
std::string& linkFlags);
|
||||||
cmLocalUnixMakefileGenerator3 *LocalGenerator;
|
cmLocalUnixMakefileGenerator3 *LocalGenerator;
|
||||||
cmGlobalUnixMakefileGenerator3 *GlobalGenerator;
|
cmGlobalUnixMakefileGenerator3 *GlobalGenerator;
|
||||||
std::string ConfigName;
|
|
||||||
|
|
||||||
enum CustomCommandDriveType { OnBuild, OnDepends, OnUtility };
|
enum CustomCommandDriveType { OnBuild, OnDepends, OnUtility };
|
||||||
CustomCommandDriveType CustomCommandDriver;
|
CustomCommandDriveType CustomCommandDriver;
|
||||||
|
@ -89,11 +89,6 @@ cmGlobalNinjaGenerator* cmNinjaTargetGenerator::GetGlobalGenerator() const
|
|||||||
return this->LocalGenerator->GetGlobalNinjaGenerator();
|
return this->LocalGenerator->GetGlobalNinjaGenerator();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string const& cmNinjaTargetGenerator::GetConfigName() const
|
|
||||||
{
|
|
||||||
return this->LocalGenerator->GetConfigName();
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string cmNinjaTargetGenerator::LanguageCompilerRule(
|
std::string cmNinjaTargetGenerator::LanguageCompilerRule(
|
||||||
const std::string& lang) const
|
const std::string& lang) const
|
||||||
{
|
{
|
||||||
|
@ -67,8 +67,6 @@ protected:
|
|||||||
cmMakefile* GetMakefile() const
|
cmMakefile* GetMakefile() const
|
||||||
{ return this->Makefile; }
|
{ return this->Makefile; }
|
||||||
|
|
||||||
std::string const& GetConfigName() const;
|
|
||||||
|
|
||||||
std::string LanguageCompilerRule(const std::string& lang) const;
|
std::string LanguageCompilerRule(const std::string& lang) const;
|
||||||
|
|
||||||
const char* GetFeature(const std::string& feature);
|
const char* GetFeature(const std::string& feature);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user