This is a perl wrapper script for ninja that will colorize its output without turning off ninja's "smart terminal" features. Currently it assumes that CMake is the generator.
I'm an inexperienced perl user so this is probably crappy code but it seems to work and I think the approach is promising. Patches are welcome.
- Make sure
ninja
is in your path. - Optionally, copy the
example_cninjarc.txt
to~/.cninjarc
and edit. - Call
cninja
just like you would callninja
. - If you are using clang, call with the
--nogcc
option.
cninja
runs ninja
in a pseudo terminal, parses the output with
copious regular expressions, and injects ansi color codes.
This version is a fork of https://github.com/frankmiller/cninja Some minor changes was added for my common use.