From 73245e591109c38712d5aa91bee655de70e8456a Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sat, 23 May 2015 14:35:22 +0200 Subject: GHS: Remove unnecessary Configure override. This only sets a member variable which is never read. Presumably this was copied from the makefile generator. --- Source/cmLocalGhsMultiGenerator.cxx | 18 ------------------ Source/cmLocalGhsMultiGenerator.h | 10 ---------- 2 files changed, 28 deletions(-) diff --git a/Source/cmLocalGhsMultiGenerator.cxx b/Source/cmLocalGhsMultiGenerator.cxx index ddef3f5..a537265 100644 --- a/Source/cmLocalGhsMultiGenerator.cxx +++ b/Source/cmLocalGhsMultiGenerator.cxx @@ -37,21 +37,3 @@ void cmLocalGhsMultiGenerator::Generate() } } } - -// Implemented in: -// cmLocalGenerator. -// Used in: -// Source/cmMakefile.cxx -// Source/cmGlobalGenerator.cxx -void cmLocalGhsMultiGenerator::Configure() -{ - // Compute the path to use when referencing the current output - // directory from the top output directory. - this->HomeRelativeOutputPath = - this->Convert(this->Makefile->GetCurrentBinaryDirectory(), HOME_OUTPUT); - if (this->HomeRelativeOutputPath == ".") - { - this->HomeRelativeOutputPath = ""; - } - this->cmLocalGenerator::Configure(); -} diff --git a/Source/cmLocalGhsMultiGenerator.h b/Source/cmLocalGhsMultiGenerator.h index ec25cba..0d11315 100644 --- a/Source/cmLocalGhsMultiGenerator.h +++ b/Source/cmLocalGhsMultiGenerator.h @@ -29,20 +29,11 @@ public: virtual ~cmLocalGhsMultiGenerator(); - /// @returns the relative path between the HomeOutputDirectory and this - /// local generators StartOutputDirectory. - std::string GetHomeRelativeOutputPath() const - { - return this->HomeRelativeOutputPath; - } - /** * Generate the makefile for this directory. */ virtual void Generate(); - /// Overloaded methods. @see cmLocalGenerator::Configure() - virtual void Configure(); const char *GetBuildFileName() { return this->BuildFileName.c_str(); } protected: @@ -50,7 +41,6 @@ protected: private: std::string BuildFileName; - std::string HomeRelativeOutputPath; }; #endif -- cgit v0.12 From 9afc9e847893ff49e4085ef55f59d62119b58026 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sat, 23 May 2015 14:39:44 +0200 Subject: GHS: Remove BuildFileName. It is never read or written. --- Source/cmLocalGhsMultiGenerator.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Source/cmLocalGhsMultiGenerator.h b/Source/cmLocalGhsMultiGenerator.h index 0d11315..16b26fd 100644 --- a/Source/cmLocalGhsMultiGenerator.h +++ b/Source/cmLocalGhsMultiGenerator.h @@ -34,13 +34,8 @@ public: */ virtual void Generate(); - const char *GetBuildFileName() { return this->BuildFileName.c_str(); } - protected: virtual bool CustomCommandUseLocal() const { return true; } - -private: - std::string BuildFileName; }; #endif -- cgit v0.12 From d34467cd5843bc2ceb7cbde288c6cb0d8e2188ca Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sat, 23 May 2015 14:40:54 +0200 Subject: GHS: Remove unused CustomCommandUseLocal. This was copied from the VS generator. It is not an override of a base class method. --- Source/cmLocalGhsMultiGenerator.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/Source/cmLocalGhsMultiGenerator.h b/Source/cmLocalGhsMultiGenerator.h index 16b26fd..3157f11 100644 --- a/Source/cmLocalGhsMultiGenerator.h +++ b/Source/cmLocalGhsMultiGenerator.h @@ -33,9 +33,6 @@ public: * Generate the makefile for this directory. */ virtual void Generate(); - -protected: - virtual bool CustomCommandUseLocal() const { return true; } }; #endif -- cgit v0.12 From 550e08b012a67a20d4c71cb9e0b3aafadd265012 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sat, 23 May 2015 14:44:14 +0200 Subject: GHS: Remove unnecessary condition. --- Source/cmLocalGhsMultiGenerator.cxx | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/Source/cmLocalGhsMultiGenerator.cxx b/Source/cmLocalGhsMultiGenerator.cxx index a537265..9705803 100644 --- a/Source/cmLocalGhsMultiGenerator.cxx +++ b/Source/cmLocalGhsMultiGenerator.cxx @@ -27,13 +27,11 @@ cmLocalGhsMultiGenerator::~cmLocalGhsMultiGenerator() {} void cmLocalGhsMultiGenerator::Generate() { cmGeneratorTargetsType tgts = this->GetMakefile()->GetGeneratorTargets(); - if (!tgts.empty()) + + for (cmGeneratorTargetsType::iterator l = tgts.begin(); l != tgts.end(); + ++l) { - for (cmGeneratorTargetsType::iterator l = tgts.begin(); l != tgts.end(); - ++l) - { - cmGhsMultiTargetGenerator tg(l->second->Target); - tg.Generate(); - } + cmGhsMultiTargetGenerator tg(l->second->Target); + tg.Generate(); } } -- cgit v0.12 From a4d230af7d594b7bc2a047468da7849c27438237 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sat, 23 May 2015 14:45:14 +0200 Subject: GHS: Don't attempt to generate for IMPORTED or INTERFACE targets. --- Source/cmLocalGhsMultiGenerator.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Source/cmLocalGhsMultiGenerator.cxx b/Source/cmLocalGhsMultiGenerator.cxx index 9705803..025b464 100644 --- a/Source/cmLocalGhsMultiGenerator.cxx +++ b/Source/cmLocalGhsMultiGenerator.cxx @@ -31,6 +31,11 @@ void cmLocalGhsMultiGenerator::Generate() for (cmGeneratorTargetsType::iterator l = tgts.begin(); l != tgts.end(); ++l) { + if (l->second->Target->GetType() == cmTarget::INTERFACE_LIBRARY + || l->second->Target->IsImported()) + { + continue; + } cmGhsMultiTargetGenerator tg(l->second->Target); tg.Generate(); } -- cgit v0.12 From f69dcdfc380176a2c4365357c1ca85c0444087b0 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sun, 24 May 2015 11:10:58 +0200 Subject: GHS: Remove call to SetCurrentLocalGenerator. It is not needed as cmLocalGenerator::Configure does this. --- Source/cmGlobalGhsMultiGenerator.cxx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Source/cmGlobalGhsMultiGenerator.cxx b/Source/cmGlobalGhsMultiGenerator.cxx index d6bf75c..12e64d5 100644 --- a/Source/cmGlobalGhsMultiGenerator.cxx +++ b/Source/cmGlobalGhsMultiGenerator.cxx @@ -35,9 +35,7 @@ cmGlobalGhsMultiGenerator::~cmGlobalGhsMultiGenerator() cmLocalGenerator * cmGlobalGhsMultiGenerator::CreateLocalGenerator(cmLocalGenerator* parent) { - cmLocalGenerator *lg = new cmLocalGhsMultiGenerator(this, parent); - this->SetCurrentLocalGenerator(lg); - return lg; + return new cmLocalGhsMultiGenerator(this, parent); } void cmGlobalGhsMultiGenerator::GetDocumentation(cmDocumentationEntry &entry) -- cgit v0.12