From 6297bcbf1dd0543a27a2cea198e20f0652b98324 Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 5 Nov 2004 15:03:45 -0500 Subject: [PATCH] ENH: Moved code that checks output path variables to separate ConfigureOutputPaths method. Needed to provide access to the same code from a subclass. --- Source/cmLocalUnixMakefileGenerator.cxx | 32 +++++++++++++++---------- Source/cmLocalUnixMakefileGenerator.h | 3 ++- 2 files changed, 21 insertions(+), 14 deletions(-) diff --git a/Source/cmLocalUnixMakefileGenerator.cxx b/Source/cmLocalUnixMakefileGenerator.cxx index 0a8a6ac3f..72a35b7f7 100644 --- a/Source/cmLocalUnixMakefileGenerator.cxx +++ b/Source/cmLocalUnixMakefileGenerator.cxx @@ -41,6 +41,25 @@ cmLocalUnixMakefileGenerator::~cmLocalUnixMakefileGenerator() void cmLocalUnixMakefileGenerator::Generate(bool fromTheTop) +{ + this->ConfigureOutputPaths(); + if (!fromTheTop) + { + // Generate depends + cmMakeDepend md; + md.SetMakefile(m_Makefile); + md.GenerateMakefileDependencies(); + this->ProcessDepends(md); + } + // output the makefile fragment + std::string dest = m_Makefile->GetStartOutputDirectory(); + dest += "/Makefile"; + this->OutputMakefile(dest.c_str(), !fromTheTop); +} + +//---------------------------------------------------------------------------- +void +cmLocalUnixMakefileGenerator::ConfigureOutputPaths() { m_UseRelativePaths = m_Makefile->IsOn("CMAKE_USE_RELATIVE_PATHS"); // suppoirt override in output directories @@ -81,19 +100,6 @@ void cmLocalUnixMakefileGenerator::Generate(bool fromTheTop) m_Makefile->AddLinkDirectory(m_ExecutableOutputPath.c_str()); } } - - if (!fromTheTop) - { - // Generate depends - cmMakeDepend md; - md.SetMakefile(m_Makefile); - md.GenerateMakefileDependencies(); - this->ProcessDepends(md); - } - // output the makefile fragment - std::string dest = m_Makefile->GetStartOutputDirectory(); - dest += "/Makefile"; - this->OutputMakefile(dest.c_str(), !fromTheTop); } void diff --git a/Source/cmLocalUnixMakefileGenerator.h b/Source/cmLocalUnixMakefileGenerator.h index 020ea5719..4a854cad6 100644 --- a/Source/cmLocalUnixMakefileGenerator.h +++ b/Source/cmLocalUnixMakefileGenerator.h @@ -88,7 +88,8 @@ public: void SetPassMakeflags(bool s){m_PassMakeflags = s;} protected: - + + void ConfigureOutputPaths(); void AddDependenciesToSourceFile(cmDependInformation const*info, cmSourceFile *i, std::set *visited);