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">&lt;<a href="mailto:themiwi@gmail.com">themiwi@gmail.com</a>&gt;</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>
&gt; On 01/10/2012 07:17 PM, vivek goel wrote:<br>
&gt;&gt; Is there a way to color warning/error of gcc with cmake ?<br>
&gt;<br>
&gt; AFAIK, no, but you might remember the power of *nix, feed the output<br>
&gt; of &quot;make VERBOSE=1 2&gt;&amp;1&quot; into sed/awk/perl/&lt;your-favorite-here&gt; and<br>
&gt; use ANSI Control Sequence Initiators:<br>
&gt;<br>
&gt; CMAKE_MINIMUM_REQUIRED(VERSION 2.8 FATAL_ERROR)<br>
&gt; PROJECT(P C)<br>
&gt; FILE(WRITE ${CMAKE_BINARY_DIR}/main.c &quot;int main(void){Return 0;}\n&quot;)<br>
&gt; SET_SOURCE_FILES_PROPERTIES(main.c PROPERTIES COMPILE_FLAGS &quot;-Wall&quot;)<br>
&gt; ADD_EXECUTABLE(main main.c)<br>
&gt;<br>
&gt; % cmake &lt;srcdir&gt;<br>
&gt; ...<br>
&gt; % make VERBOSE=1 2&gt;&amp;1 | sed \<br>
&gt; -e &#39;s%^.*: error: .*$%\x1b[37;41m&amp;\x1b[m%&#39; \<br>
&gt; -e &#39;s%^.*: warning: .*$%\x1b[30;43m&amp;\x1b[m%&#39;<br>
&gt;<br>
&gt; Regards,<br>
&gt;<br>
&gt; 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>