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->FindMakeProgramFile = "CMakeUnixFindMake.cmake";
|
||||
this->ToolSupportsColor = false;
|
||||
}
|
||||
|
||||
///! Create a local generator appropriate to this Global Generator
|
||||
cmLocalGenerator *cmGlobalKdevelopGenerator::CreateLocalGenerator()
|
||||
{
|
||||
cmLocalUnixMakefileGenerator3 *lg = new cmLocalUnixMakefileGenerator3;
|
||||
lg->SetForceVerboseMakefiles(true);
|
||||
lg->SetGlobalGenerator(this);
|
||||
return lg;
|
||||
this->SetForceVerboseMakefiles(true);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
|
|
@ -45,9 +45,6 @@ public:
|
|||
/** Get the documentation entry for this generator. */
|
||||
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
|
||||
* basically creates a series of LocalGenerators for each directory and
|
||||
|
|
|
@ -29,6 +29,8 @@ cmGlobalUnixMakefileGenerator3::cmGlobalUnixMakefileGenerator3()
|
|||
this->ForceUnixPaths = true;
|
||||
this->FindMakeProgramFile = "CMakeUnixFindMake.cmake";
|
||||
this->ToolSupportsColor = true;
|
||||
this->ForceVerboseMakefiles = false;
|
||||
|
||||
#ifdef _WIN32
|
||||
this->UseLinkScript = false;
|
||||
#else
|
||||
|
|
|
@ -132,6 +132,17 @@ public:
|
|||
unsigned long GetNumberOfProgressActionsInAll
|
||||
(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:
|
||||
void WriteMainMakefile2();
|
||||
void WriteMainCMakefile();
|
||||
|
@ -185,6 +196,7 @@ protected:
|
|||
MultipleOutputPairsType MultipleOutputPairs;
|
||||
|
||||
std::map<cmStdString, int > TargetSourceFileCount;
|
||||
bool ForceVerboseMakefiles;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -47,7 +47,6 @@ cmLocalUnixMakefileGenerator3::cmLocalUnixMakefileGenerator3()
|
|||
this->PassMakeflags = false;
|
||||
this->DefineWindowsNULL = false;
|
||||
this->UnixCD = true;
|
||||
this->ForceVerboseMakefiles=false;
|
||||
this->ColorMakefile = false;
|
||||
this->SkipPreprocessedSourceRules = false;
|
||||
this->SkipAssemblySourceRules = false;
|
||||
|
@ -678,6 +677,8 @@ cmLocalUnixMakefileGenerator3
|
|||
this->WriteMakeRule(makefileStream, 0,
|
||||
".SUFFIXES", depends, no_commands, false);
|
||||
|
||||
cmGlobalUnixMakefileGenerator3* gg =
|
||||
static_cast<cmGlobalUnixMakefileGenerator3*>(this->GlobalGenerator);
|
||||
// Write special target to silence make output. This must be after
|
||||
// the default target in case VERBOSE is set (which changes the
|
||||
// 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
|
||||
// the user.
|
||||
if((this->Makefile->IsOn("CMAKE_VERBOSE_MAKEFILE"))
|
||||
|| (this->ForceVerboseMakefiles))
|
||||
|| (gg->GetForceVerboseMakefiles()))
|
||||
{
|
||||
makefileStream
|
||||
<< "# Produce verbose output by default.\n"
|
||||
|
@ -707,8 +708,6 @@ cmLocalUnixMakefileGenerator3
|
|||
|
||||
// Work-around for makes that drop rules that have no dependencies
|
||||
// or commands.
|
||||
cmGlobalUnixMakefileGenerator3* gg =
|
||||
static_cast<cmGlobalUnixMakefileGenerator3*>(this->GlobalGenerator);
|
||||
std::string hack = gg->GetEmptyRuleHackDepends();
|
||||
if(!hack.empty())
|
||||
{
|
||||
|
|
|
@ -128,15 +128,6 @@ public:
|
|||
*/
|
||||
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
|
||||
* should include all parts of the command up to the beginning of
|
||||
|
@ -325,7 +316,6 @@ protected:
|
|||
const std::vector<std::string>& files,
|
||||
cmTarget& target, const char* filename =0);
|
||||
|
||||
bool ForceVerboseMakefiles;
|
||||
std::map<cmStdString, std::vector<int> > ProgressFiles;
|
||||
|
||||
private:
|
||||
|
|
Loading…
Reference in New Issue