diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index f02b5db4f..b63518044 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -50,7 +50,7 @@ public: * Process the CMakeLists files for this directory to fill in the * Makefile ivar */ - virtual void Configure(); + void Configure(); /** * Calls TraceVSDependencies() on all targets of this generator. diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index c08c91f12..427ae106c 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -41,6 +41,15 @@ cmLocalNinjaGenerator::~cmLocalNinjaGenerator() void cmLocalNinjaGenerator::Generate() { + // 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->SetConfigName(); this->WriteProcessedMakefile(this->GetBuildFileStream()); @@ -91,25 +100,6 @@ void cmLocalNinjaGenerator::Generate() this->WriteCustomCommandBuildStatements(); } -// Implemented in: -// cmLocalUnixMakefileGenerator3. -// Used in: -// Source/cmMakefile.cxx -// Source/cmGlobalGenerator.cxx -void cmLocalNinjaGenerator::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(); - -} - // TODO: Picked up from cmLocalUnixMakefileGenerator3. Refactor it. std::string cmLocalNinjaGenerator ::GetTargetDirectory(cmTarget const& target) const diff --git a/Source/cmLocalNinjaGenerator.h b/Source/cmLocalNinjaGenerator.h index 7ae97de35..ce966fff3 100644 --- a/Source/cmLocalNinjaGenerator.h +++ b/Source/cmLocalNinjaGenerator.h @@ -38,8 +38,6 @@ public: virtual void Generate(); - virtual void Configure(); - virtual std::string GetTargetDirectory(cmTarget const& target) const; const cmGlobalNinjaGenerator* GetGlobalNinjaGenerator() const; diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 3eea59b29..c9eea5665 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -98,7 +98,7 @@ cmLocalUnixMakefileGenerator3::~cmLocalUnixMakefileGenerator3() } //---------------------------------------------------------------------------- -void cmLocalUnixMakefileGenerator3::Configure() +void cmLocalUnixMakefileGenerator3::Generate() { // Compute the path to use when referencing the current output // directory from the top output directory. @@ -112,12 +112,7 @@ void cmLocalUnixMakefileGenerator3::Configure() { this->HomeRelativeOutputPath += "/"; } - this->cmLocalGenerator::Configure(); -} -//---------------------------------------------------------------------------- -void cmLocalUnixMakefileGenerator3::Generate() -{ // Store the configuration name that will be generated. if(const char* config = this->Makefile->GetDefinition("CMAKE_BUILD_TYPE")) { diff --git a/Source/cmLocalUnixMakefileGenerator3.h b/Source/cmLocalUnixMakefileGenerator3.h index 988d66046..f2a138993 100644 --- a/Source/cmLocalUnixMakefileGenerator3.h +++ b/Source/cmLocalUnixMakefileGenerator3.h @@ -39,12 +39,6 @@ public: cmState::Snapshot snapshot); virtual ~cmLocalUnixMakefileGenerator3(); - /** - * Process the CMakeLists files for this directory to fill in the - * Makefile ivar - */ - virtual void Configure(); - /** * Generate the makefile for this directory. */