cmGlobalGenerator: Host the MakeSilentFlag.

This commit is contained in:
Stephen Kelly 2015-05-16 05:23:06 +02:00
parent 2047144f49
commit 684e5cefb2
6 changed files with 8 additions and 14 deletions

View File

@ -353,6 +353,7 @@ public:
cmFileLockPool& GetFileLockPool() { return FileLockPool; } cmFileLockPool& GetFileLockPool() { return FileLockPool; }
#endif #endif
std::string MakeSilentFlag;
bool WindowsShell; bool WindowsShell;
bool WindowsVSIDE; bool WindowsVSIDE;
bool WatcomWMake; bool WatcomWMake;

View File

@ -24,6 +24,7 @@ cmGlobalJOMMakefileGenerator::cmGlobalJOMMakefileGenerator()
this->DefineWindowsNULL = true; this->DefineWindowsNULL = true;
this->PassMakeflags = true; this->PassMakeflags = true;
this->UnixCD = false; this->UnixCD = false;
this->MakeSilentFlag = "/nologo";
} }
void cmGlobalJOMMakefileGenerator void cmGlobalJOMMakefileGenerator
@ -55,7 +56,6 @@ cmGlobalJOMMakefileGenerator::CreateLocalGenerator(cmLocalGenerator* parent)
{ {
cmLocalUnixMakefileGenerator3* lg cmLocalUnixMakefileGenerator3* lg
= new cmLocalUnixMakefileGenerator3(this, parent); = new cmLocalUnixMakefileGenerator3(this, parent);
lg->SetMakeSilentFlag("/nologo");
return lg; return lg;
} }

View File

@ -24,6 +24,7 @@ cmGlobalNMakeMakefileGenerator::cmGlobalNMakeMakefileGenerator()
this->DefineWindowsNULL = true; this->DefineWindowsNULL = true;
this->PassMakeflags = true; this->PassMakeflags = true;
this->UnixCD = false; this->UnixCD = false;
this->MakeSilentFlag = "/nologo";
} }
void cmGlobalNMakeMakefileGenerator void cmGlobalNMakeMakefileGenerator
@ -55,7 +56,6 @@ cmGlobalNMakeMakefileGenerator::CreateLocalGenerator(cmLocalGenerator* parent)
{ {
cmLocalUnixMakefileGenerator3* lg = cmLocalUnixMakefileGenerator3* lg =
new cmLocalUnixMakefileGenerator3(this, parent); new cmLocalUnixMakefileGenerator3(this, parent);
lg->SetMakeSilentFlag("/nologo");
return lg; return lg;
} }

View File

@ -29,6 +29,7 @@ cmGlobalWatcomWMakeGenerator::cmGlobalWatcomWMakeGenerator()
this->IncludeDirective = "!include"; this->IncludeDirective = "!include";
this->DefineWindowsNULL = true; this->DefineWindowsNULL = true;
this->UnixCD = false; this->UnixCD = false;
this->MakeSilentFlag = "-h";
} }
void cmGlobalWatcomWMakeGenerator void cmGlobalWatcomWMakeGenerator
@ -53,7 +54,6 @@ cmGlobalWatcomWMakeGenerator::CreateLocalGenerator(cmLocalGenerator* parent)
{ {
cmLocalUnixMakefileGenerator3* lg cmLocalUnixMakefileGenerator3* lg
= new cmLocalUnixMakefileGenerator3(this, parent); = new cmLocalUnixMakefileGenerator3(this, parent);
lg->SetMakeSilentFlag("-h");
return lg; return lg;
} }

View File

@ -2140,10 +2140,12 @@ cmLocalUnixMakefileGenerator3
cmd += this->Convert(makefile,NONE,SHELL); cmd += this->Convert(makefile,NONE,SHELL);
cmd += " "; cmd += " ";
cmGlobalUnixMakefileGenerator3* gg =
static_cast<cmGlobalUnixMakefileGenerator3*>(this->GlobalGenerator);
// Pass down verbosity level. // Pass down verbosity level.
if(!this->GetMakeSilentFlag().empty()) if(!gg->MakeSilentFlag.empty())
{ {
cmd += this->GetMakeSilentFlag(); cmd += gg->MakeSilentFlag;
cmd += " "; cmd += " ";
} }
@ -2151,8 +2153,6 @@ cmLocalUnixMakefileGenerator3
// sub-invoked makes via an environment variable. However, some // sub-invoked makes via an environment variable. However, some
// makes do not support that, so you have to pass the flags // makes do not support that, so you have to pass the flags
// explicitly. // explicitly.
cmGlobalUnixMakefileGenerator3* gg =
static_cast<cmGlobalUnixMakefileGenerator3*>(this->GlobalGenerator);
if(gg->PassMakeflags) if(gg->PassMakeflags)
{ {
cmd += "-$(MAKEFLAGS) "; cmd += "-$(MAKEFLAGS) ";

View File

@ -66,12 +66,6 @@ public:
// write the main variables used by the makefiles // write the main variables used by the makefiles
void WriteMakeVariables(std::ostream& makefileStream); void WriteMakeVariables(std::ostream& makefileStream);
/**
* Set the flag used to keep the make program silent.
*/
void SetMakeSilentFlag(const std::string& s) { this->MakeSilentFlag = s; }
std::string &GetMakeSilentFlag() { return this->MakeSilentFlag; }
/** /**
* Set max makefile variable size, default is 0 which means unlimited. * Set max makefile variable size, default is 0 which means unlimited.
*/ */
@ -268,7 +262,6 @@ private:
//========================================================================== //==========================================================================
// Configuration settings. // Configuration settings.
int MakefileVariableSize; int MakefileVariableSize;
std::string MakeSilentFlag;
std::string ConfigurationName; std::string ConfigurationName;
bool MakeCommandEscapeTargetTwice; bool MakeCommandEscapeTargetTwice;
bool BorlandMakeCurlyHack; bool BorlandMakeCurlyHack;