MinGW: Remove old workaround and use native echo (#12283)
The workaround added by commit7e92f0b4
(Hack to make echo command work properly in mingw32-make, 2006-10-05) and updated by commit69356d8a
(Juse use cmake -E echo instead of the native echo, 2006-10-13) no longer seems necessary with modern mingw32-make. Furthermore it slows performance due to the time spent loading a cmake process instead of plain echo.
This commit is contained in:
parent
0751106f2f
commit
6b4d3ad32a
|
@ -66,18 +66,6 @@ cmLocalGenerator *cmGlobalMinGWMakefileGenerator::CreateLocalGenerator()
|
||||||
lg->SetPassMakeflags(false);
|
lg->SetPassMakeflags(false);
|
||||||
lg->SetUnixCD(true);
|
lg->SetUnixCD(true);
|
||||||
lg->SetMinGWMake(true);
|
lg->SetMinGWMake(true);
|
||||||
|
|
||||||
// mingw32-make has trouble running code like
|
|
||||||
//
|
|
||||||
// @echo message with spaces
|
|
||||||
//
|
|
||||||
// If quotes are added
|
|
||||||
//
|
|
||||||
// @echo "message with spaces"
|
|
||||||
//
|
|
||||||
// it runs but the quotes are displayed. Instead just use cmake to
|
|
||||||
// echo.
|
|
||||||
lg->SetNativeEchoCommand("@$(CMAKE_COMMAND) -E echo ", false);
|
|
||||||
return lg;
|
return lg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -68,8 +68,6 @@ cmLocalUnixMakefileGenerator3::cmLocalUnixMakefileGenerator3()
|
||||||
this->ColorMakefile = false;
|
this->ColorMakefile = false;
|
||||||
this->SkipPreprocessedSourceRules = false;
|
this->SkipPreprocessedSourceRules = false;
|
||||||
this->SkipAssemblySourceRules = false;
|
this->SkipAssemblySourceRules = false;
|
||||||
this->NativeEchoCommand = "@echo ";
|
|
||||||
this->NativeEchoWindows = true;
|
|
||||||
this->MakeCommandEscapeTargetTwice = false;
|
this->MakeCommandEscapeTargetTwice = false;
|
||||||
this->IsMakefileGenerator = true;
|
this->IsMakefileGenerator = true;
|
||||||
this->BorlandMakeCurlyHack = false;
|
this->BorlandMakeCurlyHack = false;
|
||||||
|
@ -1235,9 +1233,8 @@ cmLocalUnixMakefileGenerator3::AppendEcho(std::vector<std::string>& commands,
|
||||||
if(color_name.empty())
|
if(color_name.empty())
|
||||||
{
|
{
|
||||||
// Use the native echo command.
|
// Use the native echo command.
|
||||||
cmd = this->NativeEchoCommand;
|
cmd = "@echo ";
|
||||||
cmd += this->EscapeForShell(line.c_str(), false,
|
cmd += this->EscapeForShell(line.c_str(), false, true);
|
||||||
this->NativeEchoWindows);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -126,14 +126,6 @@ public:
|
||||||
*/
|
*/
|
||||||
void SetSilentNoColon(bool v) {this->SilentNoColon = v;}
|
void SetSilentNoColon(bool v) {this->SilentNoColon = v;}
|
||||||
|
|
||||||
/**
|
|
||||||
* Set the command to use for native make shell echo. The value
|
|
||||||
* should include all parts of the command up to the beginning of
|
|
||||||
* the message (including a whitespace separator).
|
|
||||||
*/
|
|
||||||
void SetNativeEchoCommand(const char* cmd, bool isWindows)
|
|
||||||
{ this->NativeEchoCommand = cmd; this->NativeEchoWindows = isWindows; }
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the string used to include one makefile into another default
|
* Set the string used to include one makefile into another default
|
||||||
* is include.
|
* is include.
|
||||||
|
@ -365,8 +357,6 @@ private:
|
||||||
std::string IncludeDirective;
|
std::string IncludeDirective;
|
||||||
std::string MakeSilentFlag;
|
std::string MakeSilentFlag;
|
||||||
std::string ConfigurationName;
|
std::string ConfigurationName;
|
||||||
std::string NativeEchoCommand;
|
|
||||||
bool NativeEchoWindows;
|
|
||||||
bool DefineWindowsNULL;
|
bool DefineWindowsNULL;
|
||||||
bool UnixCD;
|
bool UnixCD;
|
||||||
bool PassMakeflags;
|
bool PassMakeflags;
|
||||||
|
|
Loading…
Reference in New Issue