STYLE: move ForceVerboseMakefiles to cmGlobalUnixMakefileGenerator3, so the
kdevelop generator doesn't need its own CreateLocalGenerator() anymore Alex
This commit is contained in:
parent
eab5a4350d
commit
179943bf14
|
@ -31,15 +31,7 @@ cmGlobalKdevelopGenerator::cmGlobalKdevelopGenerator()
|
||||||
this->ForceUnixPaths = true;
|
this->ForceUnixPaths = true;
|
||||||
this->FindMakeProgramFile = "CMakeUnixFindMake.cmake";
|
this->FindMakeProgramFile = "CMakeUnixFindMake.cmake";
|
||||||
this->ToolSupportsColor = false;
|
this->ToolSupportsColor = false;
|
||||||
}
|
this->SetForceVerboseMakefiles(true);
|
||||||
|
|
||||||
///! Create a local generator appropriate to this Global Generator
|
|
||||||
cmLocalGenerator *cmGlobalKdevelopGenerator::CreateLocalGenerator()
|
|
||||||
{
|
|
||||||
cmLocalUnixMakefileGenerator3 *lg = new cmLocalUnixMakefileGenerator3;
|
|
||||||
lg->SetForceVerboseMakefiles(true);
|
|
||||||
lg->SetGlobalGenerator(this);
|
|
||||||
return lg;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
|
|
@ -45,9 +45,6 @@ public:
|
||||||
/** Get the documentation entry for this generator. */
|
/** Get the documentation entry for this generator. */
|
||||||
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
|
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
|
||||||
|
|
||||||
///! Create a local generator appropriate to this Global Generator
|
|
||||||
virtual cmLocalGenerator *CreateLocalGenerator();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate the all required files for building this project/tree. This
|
* Generate the all required files for building this project/tree. This
|
||||||
* basically creates a series of LocalGenerators for each directory and
|
* basically creates a series of LocalGenerators for each directory and
|
||||||
|
|
|
@ -29,6 +29,8 @@ cmGlobalUnixMakefileGenerator3::cmGlobalUnixMakefileGenerator3()
|
||||||
this->ForceUnixPaths = true;
|
this->ForceUnixPaths = true;
|
||||||
this->FindMakeProgramFile = "CMakeUnixFindMake.cmake";
|
this->FindMakeProgramFile = "CMakeUnixFindMake.cmake";
|
||||||
this->ToolSupportsColor = true;
|
this->ToolSupportsColor = true;
|
||||||
|
this->ForceVerboseMakefiles = false;
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
this->UseLinkScript = false;
|
this->UseLinkScript = false;
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -132,6 +132,17 @@ public:
|
||||||
unsigned long GetNumberOfProgressActionsInAll
|
unsigned long GetNumberOfProgressActionsInAll
|
||||||
(cmLocalUnixMakefileGenerator3 *lg);
|
(cmLocalUnixMakefileGenerator3 *lg);
|
||||||
|
|
||||||
|
/** Get whether the generator should use a script for link commands. */
|
||||||
|
bool GetForceVerboseMakefiles() { return this->ForceVerboseMakefiles; }
|
||||||
|
/**
|
||||||
|
* If set to true, the CMake variable CMAKE_VERBOSE_MAKEFILES doesn't have
|
||||||
|
* anymore. Set it to true when writing a generator where short output
|
||||||
|
* doesn't make sense, e.g. because the full output is parsed by an
|
||||||
|
* IDE/editor.
|
||||||
|
*/
|
||||||
|
void SetForceVerboseMakefiles(bool enable)
|
||||||
|
{this->ForceVerboseMakefiles=enable;}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void WriteMainMakefile2();
|
void WriteMainMakefile2();
|
||||||
void WriteMainCMakefile();
|
void WriteMainCMakefile();
|
||||||
|
@ -185,6 +196,7 @@ protected:
|
||||||
MultipleOutputPairsType MultipleOutputPairs;
|
MultipleOutputPairsType MultipleOutputPairs;
|
||||||
|
|
||||||
std::map<cmStdString, int > TargetSourceFileCount;
|
std::map<cmStdString, int > TargetSourceFileCount;
|
||||||
|
bool ForceVerboseMakefiles;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -47,7 +47,6 @@ cmLocalUnixMakefileGenerator3::cmLocalUnixMakefileGenerator3()
|
||||||
this->PassMakeflags = false;
|
this->PassMakeflags = false;
|
||||||
this->DefineWindowsNULL = false;
|
this->DefineWindowsNULL = false;
|
||||||
this->UnixCD = true;
|
this->UnixCD = true;
|
||||||
this->ForceVerboseMakefiles=false;
|
|
||||||
this->ColorMakefile = false;
|
this->ColorMakefile = false;
|
||||||
this->SkipPreprocessedSourceRules = false;
|
this->SkipPreprocessedSourceRules = false;
|
||||||
this->SkipAssemblySourceRules = false;
|
this->SkipAssemblySourceRules = false;
|
||||||
|
@ -678,6 +677,8 @@ cmLocalUnixMakefileGenerator3
|
||||||
this->WriteMakeRule(makefileStream, 0,
|
this->WriteMakeRule(makefileStream, 0,
|
||||||
".SUFFIXES", depends, no_commands, false);
|
".SUFFIXES", depends, no_commands, false);
|
||||||
|
|
||||||
|
cmGlobalUnixMakefileGenerator3* gg =
|
||||||
|
static_cast<cmGlobalUnixMakefileGenerator3*>(this->GlobalGenerator);
|
||||||
// Write special target to silence make output. This must be after
|
// Write special target to silence make output. This must be after
|
||||||
// the default target in case VERBOSE is set (which changes the
|
// the default target in case VERBOSE is set (which changes the
|
||||||
// name). The setting of CMAKE_VERBOSE_MAKEFILE to ON will cause a
|
// name). The setting of CMAKE_VERBOSE_MAKEFILE to ON will cause a
|
||||||
|
@ -685,7 +686,7 @@ cmLocalUnixMakefileGenerator3
|
||||||
// name of this special target. This gives a make-time choice to
|
// name of this special target. This gives a make-time choice to
|
||||||
// the user.
|
// the user.
|
||||||
if((this->Makefile->IsOn("CMAKE_VERBOSE_MAKEFILE"))
|
if((this->Makefile->IsOn("CMAKE_VERBOSE_MAKEFILE"))
|
||||||
|| (this->ForceVerboseMakefiles))
|
|| (gg->GetForceVerboseMakefiles()))
|
||||||
{
|
{
|
||||||
makefileStream
|
makefileStream
|
||||||
<< "# Produce verbose output by default.\n"
|
<< "# Produce verbose output by default.\n"
|
||||||
|
@ -707,8 +708,6 @@ cmLocalUnixMakefileGenerator3
|
||||||
|
|
||||||
// Work-around for makes that drop rules that have no dependencies
|
// Work-around for makes that drop rules that have no dependencies
|
||||||
// or commands.
|
// or commands.
|
||||||
cmGlobalUnixMakefileGenerator3* gg =
|
|
||||||
static_cast<cmGlobalUnixMakefileGenerator3*>(this->GlobalGenerator);
|
|
||||||
std::string hack = gg->GetEmptyRuleHackDepends();
|
std::string hack = gg->GetEmptyRuleHackDepends();
|
||||||
if(!hack.empty())
|
if(!hack.empty())
|
||||||
{
|
{
|
||||||
|
|
|
@ -128,15 +128,6 @@ public:
|
||||||
*/
|
*/
|
||||||
void SetSilentNoColon(bool v) {this->SilentNoColon = v;}
|
void SetSilentNoColon(bool v) {this->SilentNoColon = v;}
|
||||||
|
|
||||||
/**
|
|
||||||
* If set to true, the CMake variable CMAKE_VERBOSE_MAKEFILES doesn't have
|
|
||||||
* anymore. Set it to true when writing a generator where short output
|
|
||||||
* doesn't make sense, e.g. because the full output is parsed by an
|
|
||||||
* IDE/editor.
|
|
||||||
*/
|
|
||||||
void SetForceVerboseMakefiles(bool enable)
|
|
||||||
{this->ForceVerboseMakefiles=enable;}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the command to use for native make shell echo. The value
|
* Set the command to use for native make shell echo. The value
|
||||||
* should include all parts of the command up to the beginning of
|
* should include all parts of the command up to the beginning of
|
||||||
|
@ -325,7 +316,6 @@ protected:
|
||||||
const std::vector<std::string>& files,
|
const std::vector<std::string>& files,
|
||||||
cmTarget& target, const char* filename =0);
|
cmTarget& target, const char* filename =0);
|
||||||
|
|
||||||
bool ForceVerboseMakefiles;
|
|
||||||
std::map<cmStdString, std::vector<int> > ProgressFiles;
|
std::map<cmStdString, std::vector<int> > ProgressFiles;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Reference in New Issue