[CMake] Support for colored makefile output with tmux

Dan Liew dan at su-root.co.uk
Sat Mar 26 05:46:54 EDT 2016


On 26 March 2016 at 09:30, Dan Liew <dan at su-root.co.uk> wrote:
> On 26 March 2016 at 01:15, Mike Lui <mdl45 at drexel.edu> wrote:
>> When I use tmux and set my TERM to either 'tmux' or 'tmux-256color', I don't
>> get colorized output of from cmake generated Makefiles.
>
> My TERM is set to "xterm-256color" and with that coloured output when
> running ``make`` in Tmux works fine for me.
>
> I'm using tmux 2.1-2, in gnome-terminal 3.18.3 on Arch Linux with CMake 3.5.0

Just to note coloured output in makefiles seems to be implemented
using an undocumented cmake command

``cmake -E cmake_echo_color --cyan hello world``

If you look at [1] you can see the supported switches for different colours.

[1] https://github.com/Kitware/CMake/blob/bd15330da1edaf4a662335ff53648074fdc30e2b/Source/cmcmd.cxx#L1176


More information about the CMake mailing list