[CMake] Post-process compiler output

Sebastian Schaetz seb.schaetz at gmail.com
Tue Jun 14 05:36:05 EDT 2011


Hi,

I'm using CMake to generate makefiles to build my C++ projects with g++. When
developing code I find it useful to "post-process" g++ output. In particular I
like to feed the output through gSTLFilt.pl [0] and a custom version of colorgcc
[1].

Currently I have a wrapper around make (I call xmake.sh) that pipes the entire
output of make through those two tools [2]. But this is not optimal since I lose
the colorful output CMake puts into the makefiles.

So my question is: is there a way to append stuff to the g++ command line such
as "2>&1 | perl colorize.pl 2>&1 | perl gSTLFilt.pl"?

Thanks in advance,
Sebastian

[0] http://www.bdsoft.com/tools/stlfilt.html
[1] http://schlueters.de/colorgcc.html
[2] https://github.com/sschaetz/colorgcc/tree/filter



More information about the CMake mailing list