[CMake] changing the cmake color scheme

Eric Noulard eric.noulard at gmail.com
Sat Sep 4 05:23:46 EDT 2010


2010/9/4 Abe Bachrach <abachrach at gmail.com>:
> 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.
> thanks,

Currently I don't think changing color is possible, because
they are chosen in source code

(see:cmLocalUnixMakefileGenerator3::AppendEcho
 in cmLocalUnixMakefileGenerator3.cxx)

The color is set depending on category:
      case EchoNormal:
        break;
      case EchoDepend:
        color_name = "--magenta --bold ";
        break;
      case EchoBuild:
        color_name = "--green ";
        break;
      case EchoLink:
        color_name = "--red --bold ";
        break;
      case EchoGenerate:
        color_name = "--blue --bold ";
        break;
      case EchoGlobal:
        color_name = "--cyan ";
        break;

customized colorset should be failry easy to implement but you would
need to patch.


-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org


More information about the CMake mailing list