[CMake] Coloured output for cmake on windows

O'Brien, Martin - IIW Martin.Obrien at itt.com
Mon Feb 1 08:22:33 EST 2010


'cmd.exe' does support color in a sense (see 'COLOR /?'), but not in a terribly useful way (in my opinion); more importantly, is doesn't support the escape sequences that are necessary for cmake color support.  One used to be able to do this on windows by loading ansi.sys, but that no longer works.  However, if you're interested, there's a program called 'ansicon' that provides enough of an emulation of ansi.sys to support basic color support (at least).

http://adoxa.110mb.com/ansicon/index.html

I've used it a few times, and it seems to work well, though I can't say that I've really tested it, and I should mention that I'm also fairly new to cmake, so it's quite possible that I'm missing something.

Installing ansicon should allow you to see color messages.

If you're interested in creating your own via something function-ish, you might also want to take a look at the 'colormsg' function in 'BoostUtils.cmake' which is part of the cmake enabled version of Boost.

http://gitorious.org/boost/cmake/blobs/1.41.0/tools/build/CMake/BoostUtils.cmake#line230



Good luck,

mm



From: cmake-bounces at cmake.org [mailto:cmake-bounces at cmake.org] On Behalf Of Dmytro Ovdiienko
Sent: Sunday, January 10, 2010 13:46
To: cmake at cmake.org
Subject: Re: [CMake] Coloured output for cmake on windows

Vikas,

Error and Warning messages are colored.
2010/1/9 Chauhan, Vikas <vikas.chauhan at anritsu.com<mailto:vikas.chauhan at anritsu.com>>

Hi,

I guess there is no end to wishes & this is another example of it.

Is it possible to get a coloured output on windows using a build command like: cmake --build . ?

Currently is it because dos cmd window doesn't support it or there is some other reason?

Thanks,

Vikas

_______________________________________________
Powered by www.kitware.com<http://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


________________________________
This e-mail and any files transmitted with it may be proprietary and are intended solely for the use of the individual or entity to whom they are addressed. If you have received this e-mail in error please notify the sender.
Please note that any views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of ITT Corporation. The recipient should check this e-mail and any attachments for the presence of viruses. ITT accepts no liability for any damage caused by any virus transmitted by this e-mail.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100201/fdaa98a3/attachment-0001.htm>


More information about the CMake mailing list