diff --git a/Source/cmCommonTargetGenerator.cxx b/Source/cmCommonTargetGenerator.cxx index 9d10e39bd..3edeff347 100644 --- a/Source/cmCommonTargetGenerator.cxx +++ b/Source/cmCommonTargetGenerator.cxx @@ -23,9 +23,15 @@ cmCommonTargetGenerator::cmCommonTargetGenerator(cmGeneratorTarget* gt) , LocalGenerator(static_cast(gt->LocalGenerator)) , GlobalGenerator(static_cast( gt->LocalGenerator->GetGlobalGenerator())) + , ConfigName(LocalGenerator->GetConfigName()) { } cmCommonTargetGenerator::~cmCommonTargetGenerator() { } + +std::string const& cmCommonTargetGenerator::GetConfigName() const +{ + return this->ConfigName; +} diff --git a/Source/cmCommonTargetGenerator.h b/Source/cmCommonTargetGenerator.h index e39f2c83e..bf2add39a 100644 --- a/Source/cmCommonTargetGenerator.h +++ b/Source/cmCommonTargetGenerator.h @@ -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 diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 33713815e..5c9402edd 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -44,7 +44,6 @@ cmMakefileTargetGenerator::cmMakefileTargetGenerator(cmGeneratorTarget* target) this->FortranModuleDirectoryComputed = false; this->LocalGenerator = static_cast(target->GetLocalGenerator()); - this->ConfigName = this->LocalGenerator->GetConfigName().c_str(); this->GlobalGenerator = static_cast( this->LocalGenerator->GetGlobalGenerator()); diff --git a/Source/cmMakefileTargetGenerator.h b/Source/cmMakefileTargetGenerator.h index 787f2467a..2985f4e7c 100644 --- a/Source/cmMakefileTargetGenerator.h +++ b/Source/cmMakefileTargetGenerator.h @@ -177,7 +177,6 @@ protected: std::string& linkFlags); cmLocalUnixMakefileGenerator3 *LocalGenerator; cmGlobalUnixMakefileGenerator3 *GlobalGenerator; - std::string ConfigName; enum CustomCommandDriveType { OnBuild, OnDepends, OnUtility }; CustomCommandDriveType CustomCommandDriver; diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 5ede08af9..152bf7c26 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -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 { diff --git a/Source/cmNinjaTargetGenerator.h b/Source/cmNinjaTargetGenerator.h index 87ba17fb6..e4468765d 100644 --- a/Source/cmNinjaTargetGenerator.h +++ b/Source/cmNinjaTargetGenerator.h @@ -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);