mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
Makefile: Fix output during parallel builds (#12991)
Replace use of separate "cmake -E cmake_progress_report" and "cmake -E cmake_echo_color" commands to report the progress and message portions of build output lines with --progress-* options to the latter to print everything with a single command. The line buffering of the stdout FILE stream should cause the whole line to be printed with one atomic write. This will avoid inter-mixing of line-wise messages from different processes during a parallel build.
This commit is contained in:
@@ -184,8 +184,9 @@ public:
|
||||
// append an echo command
|
||||
enum EchoColor { EchoNormal, EchoDepend, EchoBuild, EchoLink,
|
||||
EchoGenerate, EchoGlobal };
|
||||
void AppendEcho(std::vector<std::string>& commands, const char* text,
|
||||
EchoColor color = EchoNormal);
|
||||
struct EchoProgress { std::string Dir; std::string Arg; };
|
||||
void AppendEcho(std::vector<std::string>& commands, std::string const& text,
|
||||
EchoColor color = EchoNormal, EchoProgress const* = 0);
|
||||
|
||||
/** Get whether the makefile is to have color. */
|
||||
bool GetColorMakefile() const { return this->ColorMakefile; }
|
||||
|
||||
Reference in New Issue
Block a user