On 06/14/2011 11:36 AM, Sebastian Schaetz wrote: > 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
I don't think that this is possible directly. But you can write a wrapper shell script which does the above and then pass that script as the compiler to cmake. Something like this: #!/bin/sh /usr/bin/g++ $@ 2>&1 | perl colorize.pl 2>&1 | perl gSTLFilt.pl HTH Michael _______________________________________________ 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