MinGW Makefiles parallel builds cause the entire terminal to get colored
There seems to be some sort of race condition in the colored output in mingw32-make.
I am using CMake 3.9.1, and generating MinGW Makefiles
. I have a pretty large project that takes maybe 10-15 minutes to build on a fast machine. Whenever I run a parallel build (make -j2
), after a minute or two, color will seem to "leak out" of one line of the build output. All text that was supposed to be white will become green, and the terminal prompt will also change color. Here's a screenshot of the point where it happened:
The more processes I use in the parallel build, the lest time it takes for the glitch to happen, which is why I think it's a race condition. With cmd
, you could reset the color back to normal by running the command color
(with no arguments), but in Powershell there is no way except restarting the shell. Now that PowerShell has replaced CMD, this has become extremely annoying.
Here's what the prompt looks like after the glitch:
Can you please look into this? Thanks.