summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalUnixMakefileGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2004-11-05 20:03:45 (GMT)
committerBrad King <brad.king@kitware.com>2004-11-05 20:03:45 (GMT)
commit6297bcbf1dd0543a27a2cea198e20f0652b98324 (patch)
tree7f285d4b37b76f53550957c823b41de6c44a24ef /Source/cmLocalUnixMakefileGenerator.cxx
parentd41ed992972318802b70a0651633386bc16adda9 (diff)
downloadCMake-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.
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator.cxx')
-rw-r--r--Source/cmLocalUnixMakefileGenerator.cxx32
1 files changed, 19 insertions, 13 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