[CMake] changing the cmake color scheme

David Cole david.cole at kitware.com
Sat Sep 4 09:17:59 EDT 2010


On Sat, Sep 4, 2010 at 8:51 AM, Michael Hertling <mhertling at online.de>wrote:

> On 09/04/2010 02:32 AM, Abe Bachrach wrote:
> > Hi there,
> > is there a way to change the color scheme that cmake uses while
> building??
> >
> > I would rather not have the message for linking be red, since this
> > immediately makes me think there was an error.
>
> As Eric has pointed out in the meantime, those colors are hardcoded
> in the CMake code base, but - if on *nix - look at the following:
>
> ADD_CUSTOM_TARGET(red2yellow ALL
>    COMMAND find ${CMAKE_BINARY_DIR} -name build.make
>            -exec perl -pi -e "s/--red/--yellow/" "{}" "\;")
>
> Placed in the top-level CMakeLists.txt, this custom target tweakes the
> concerned Makefiles to present the linking message in a beautiful but
> unreadable yellow. ;) If it doesn't luckily execute as the very first
> target, you could resort to CMake's ordinary dependency mechanism.
>
> Yours colorfully,
>
> 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
>


But watch out if any of your file names have "--red" in them......

:-)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100904/8c898fe8/attachment.htm>


More information about the CMake mailing list