diff options
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 5 | ||||
-rw-r--r-- | Source/cmLocalGenerator.h | 2 | ||||
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator3.cxx | 29 | ||||
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator3.h | 2 |
4 files changed, 25 insertions, 13 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 9b02cbb..a462113 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1273,6 +1273,11 @@ void cmGlobalGenerator::Generate() // it builds by default. this->FillLocalGeneratorToTargetMap(); + for (i = 0; i < this->LocalGenerators.size(); ++i) + { + this->LocalGenerators[i]->ComputeHomeRelativeOutputPath(); + } + // Generate project files for (i = 0; i < this->LocalGenerators.size(); ++i) { diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index 42df2b8..6a8c5aa 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -47,6 +47,8 @@ public: */ virtual void Generate() {} + virtual void ComputeHomeRelativeOutputPath() {} + /** * Calls TraceVSDependencies() on all targets of this generator. */ diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 5c9768a..e292ba7 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -100,19 +100,6 @@ cmLocalUnixMakefileGenerator3::~cmLocalUnixMakefileGenerator3() //---------------------------------------------------------------------------- void cmLocalUnixMakefileGenerator3::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 = ""; - } - if(!this->HomeRelativeOutputPath.empty()) - { - this->HomeRelativeOutputPath += "/"; - } - // Store the configuration name that will be generated. if(const char* config = this->Makefile->GetDefinition("CMAKE_BUILD_TYPE")) { @@ -164,6 +151,22 @@ void cmLocalUnixMakefileGenerator3::Generate() this->WriteDirectoryInformationFile(); } +void cmLocalUnixMakefileGenerator3::ComputeHomeRelativeOutputPath() +{ + // 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 = ""; + } + if(!this->HomeRelativeOutputPath.empty()) + { + this->HomeRelativeOutputPath += "/"; + } +} + //---------------------------------------------------------------------------- void cmLocalUnixMakefileGenerator3::ComputeObjectFilenames( std::map<cmSourceFile const*, std::string>& mapping, diff --git a/Source/cmLocalUnixMakefileGenerator3.h b/Source/cmLocalUnixMakefileGenerator3.h index dcb3016..4e4d146 100644 --- a/Source/cmLocalUnixMakefileGenerator3.h +++ b/Source/cmLocalUnixMakefileGenerator3.h @@ -39,6 +39,8 @@ public: cmState::Snapshot snapshot); virtual ~cmLocalUnixMakefileGenerator3(); + virtual void ComputeHomeRelativeOutputPath(); + /** * Generate the makefile for this directory. */ |