diff options
author | Brad King <brad.king@kitware.com> | 2015-07-08 19:02:11 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-07-09 13:50:06 (GMT) |
commit | abfa5f2d1fac0a55b430e078884ad1ae252d20cd (patch) | |
tree | e05d7c801401e2a38847e269c02d1a710f9ef9e0 /Source | |
parent | 9d41f6d87b28c46d8a6d52f2de91976819e6b4d0 (diff) | |
download | CMake-abfa5f2d1fac0a55b430e078884ad1ae252d20cd.zip CMake-abfa5f2d1fac0a55b430e078884ad1ae252d20cd.tar.gz CMake-abfa5f2d1fac0a55b430e078884ad1ae252d20cd.tar.bz2 |
cmCommonTargetGenerator: Adopt ConfigName member
De-duplicate the member from the Makefile and Ninja target generators.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmCommonTargetGenerator.cxx | 6 | ||||
-rw-r--r-- | Source/cmCommonTargetGenerator.h | 3 | ||||
-rw-r--r-- | Source/cmMakefileTargetGenerator.cxx | 1 | ||||
-rw-r--r-- | Source/cmMakefileTargetGenerator.h | 1 | ||||
-rw-r--r-- | Source/cmNinjaTargetGenerator.cxx | 5 | ||||
-rw-r--r-- | Source/cmNinjaTargetGenerator.h | 2 |
6 files changed, 9 insertions, 9 deletions
diff --git a/Source/cmCommonTargetGenerator.cxx b/Source/cmCommonTargetGenerator.cxx index 9d10e39..3edeff3 100644 --- a/Source/cmCommonTargetGenerator.cxx +++ b/Source/cmCommonTargetGenerator.cxx @@ -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; +} diff --git a/Source/cmCommonTargetGenerator.h b/Source/cmCommonTargetGenerator.h index e39f2c8..bf2add3 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 3371381..5c9402e 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -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()); diff --git a/Source/cmMakefileTargetGenerator.h b/Source/cmMakefileTargetGenerator.h index 787f246..2985f4e 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 5ede08a..152bf7c 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 87ba17f..e446876 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); |