Eskandar Ensafi wrote:
> When I use the Unix Makefile generator (or the NMake Makefile generator
> under Windows), running “cmake --build <bindir>”  does not produce color
> output, whereas “cd <bindir> && make” does.  Is there a reason for this,
> or have I stumbled upon a bug?

The color output auto-detects whether it is attached to an interactive
terminal (tty).  If not, it does not print the escapes.  When cmake
runs the "make" command through --build, it hands the process a new
pipe and not its own stdout (which might be a tty).

The --build option is meant for scripts to drive builds and log output
to a file, so no color is desired.  I would consider interactive use
of --build to be a feature request.  Its implementation re-uses some
of the automated build command invocation used by CTest's ctest_build
command.  Adding a pass-thru to the outer process's pipe is somewhat
tricky.

-Brad
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to