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:
parent
d41ed99297
commit
6297bcbf1d
|
@ -41,6 +41,25 @@ cmLocalUnixMakefileGenerator::~cmLocalUnixMakefileGenerator()
|
||||||
|
|
||||||
|
|
||||||
void cmLocalUnixMakefileGenerator::Generate(bool fromTheTop)
|
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");
|
m_UseRelativePaths = m_Makefile->IsOn("CMAKE_USE_RELATIVE_PATHS");
|
||||||
// suppoirt override in output directories
|
// suppoirt override in output directories
|
||||||
|
@ -81,19 +100,6 @@ void cmLocalUnixMakefileGenerator::Generate(bool fromTheTop)
|
||||||
m_Makefile->AddLinkDirectory(m_ExecutableOutputPath.c_str());
|
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
|
void
|
||||||
|
|
|
@ -88,7 +88,8 @@ public:
|
||||||
void SetPassMakeflags(bool s){m_PassMakeflags = s;}
|
void SetPassMakeflags(bool s){m_PassMakeflags = s;}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
void ConfigureOutputPaths();
|
||||||
void AddDependenciesToSourceFile(cmDependInformation const*info,
|
void AddDependenciesToSourceFile(cmDependInformation const*info,
|
||||||
cmSourceFile *i,
|
cmSourceFile *i,
|
||||||
std::set<cmDependInformation const*> *visited);
|
std::set<cmDependInformation const*> *visited);
|
||||||
|
|
Loading…
Reference in New Issue