diff options
author | Brad King <brad.king@kitware.com> | 2004-11-05 20:03:45 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2004-11-05 20:03:45 (GMT) |
commit | 6297bcbf1dd0543a27a2cea198e20f0652b98324 (patch) | |
tree | 7f285d4b37b76f53550957c823b41de6c44a24ef | |
parent | d41ed992972318802b70a0651633386bc16adda9 (diff) | |
download | CMake-6297bcbf1dd0543a27a2cea198e20f0652b98324.zip CMake-6297bcbf1dd0543a27a2cea198e20f0652b98324.tar.gz CMake-6297bcbf1dd0543a27a2cea198e20f0652b98324.tar.bz2 |
ENH: Moved code that checks output path variables to separate ConfigureOutputPaths method. Needed to provide access to the same code from a subclass.
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator.cxx | 32 | ||||
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator.h | 3 |
2 files changed, 21 insertions, 14 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator.cxx b/Source/cmLocalUnixMakefileGenerator.cxx index 0a8a6ac..72a35b7 100644 --- a/Source/cmLocalUnixMakefileGenerator.cxx +++ b/Source/cmLocalUnixMakefileGenerator.cxx @@ -42,6 +42,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 if (m_Makefile->GetDefinition("LIBRARY_OUTPUT_PATH")) @@ -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 020ea57..4a854ca 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<cmDependInformation const*> *visited); |