Thanks.<div><br clear="all">regards<div>Vivek Goel</div><br>
<br><br><div class="gmail_quote">On Wed, Jan 11, 2012 at 6:26 PM, Michael Wild <span dir="ltr"><<a href="mailto:themiwi@gmail.com">themiwi@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 01/11/2012 01:44 PM, Michael Hertling wrote:<br>
> On 01/10/2012 07:17 PM, vivek goel wrote:<br>
>> Is there a way to color warning/error of gcc with cmake ?<br>
><br>
> AFAIK, no, but you might remember the power of *nix, feed the output<br>
> of "make VERBOSE=1 2>&1" into sed/awk/perl/<your-favorite-here> and<br>
> use ANSI Control Sequence Initiators:<br>
><br>
> CMAKE_MINIMUM_REQUIRED(VERSION 2.8 FATAL_ERROR)<br>
> PROJECT(P C)<br>
> FILE(WRITE ${CMAKE_BINARY_DIR}/main.c "int main(void){Return 0;}\n")<br>
> SET_SOURCE_FILES_PROPERTIES(main.c PROPERTIES COMPILE_FLAGS "-Wall")<br>
> ADD_EXECUTABLE(main main.c)<br>
><br>
> % cmake <srcdir><br>
> ...<br>
> % make VERBOSE=1 2>&1 | sed \<br>
> -e 's%^.*: error: .*$%\x1b[37;41m&\x1b[m%' \<br>
> -e 's%^.*: warning: .*$%\x1b[30;43m&\x1b[m%'<br>
><br>
> Regards,<br>
><br>
> Michael<br>
<br>
</div>Does colorgcc work with CMake? That would be a *lot* easier...<br>
<div class="HOEnZb"><div class="h5"><br>
--<br>
<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</div></div></blockquote></div><br></div>