ENH: Moved code that checks output path variables to separate ConfigureOutputPaths method. Needed to provide access to the same code from a subclass.

This commit is contained in:
Brad King 2004-11-05 15:03:45 -05:00
parent d41ed99297
commit 6297bcbf1d
2 changed files with 21 additions and 14 deletions

View File

@ -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

View File

@ -89,6 +89,7 @@ public:
protected:
void ConfigureOutputPaths();
void AddDependenciesToSourceFile(cmDependInformation const*info,
cmSourceFile *i,
std::set<cmDependInformation const*> *visited);