[CMake] ansi color

2012-02-10 Thread Matt Fair
I'd like to be able to pipe cmake output and still have the ansi color
codes when the output is not TTY, is there a way to do this?
Thanks,
Matt
--

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


Re: [CMake] ansi color

2012-02-10 Thread Brad King

On 2/10/2012 3:15 AM, Matt Fair wrote:

I'd like to be able to pipe cmake output and still have the ansi color
codes when the output is not TTY, is there a way to do this?


Not currently.  The isatty test is hard-coded here:

  
http://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/kwsys/Terminal.c;hb=v2.8.7#l181

-Brad
--

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


Re: [CMake] ansi color

2012-02-10 Thread Michael Hertling
On 02/10/2012 09:15 AM, Matt Fair wrote:
 I'd like to be able to pipe cmake output and still have the ansi color
 codes when the output is not TTY, is there a way to do this?
 Thanks,
 Matt

You might do this by yourself using sed/awk/perl/... and the ANSI CSIs;
refer to [1] for a similar example. Instead of multiple -e command
line sed expressions, it is probably more convenient to use a sed
script with one line per color as last part of your pipe.

Regards,

Michael

[1] http://www.mail-archive.com/cmake@cmake.org/msg40328.html
--

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