dev-cafe / autocmake

CMake plugin composer.
http://autocmake.org
BSD 3-Clause "New" or "Revised" License
41 stars 18 forks source link

Color module for CMake output #180

Closed robertodr closed 7 years ago

robertodr commented 7 years ago

This module adds definitions to be used to colorize CMake output. Usage:

message("${Red}This is Red${ColourReset}")

also documented in the module. Code was found on StackOverflow: http://stackoverflow.com/a/19578320 Thanks also to @loriab

bast commented 7 years ago

How will this behave on WIN32?

miroi commented 7 years ago

I don't know since I haven't tested autocmake on MS Windows... If we want to know, we should add appveyor.yml CI buildup file...

bast commented 7 years ago

The test breakage is actually from my code change. I will fix that, sorry for that. We can test the colors with undefined variables. I think they default to "" but we should double check.

bast commented 7 years ago

Merged. Thanks! I will set it explicitly to "" on WIN32.

bast commented 7 years ago

See https://github.com/coderefinery/autocmake/commit/893c9bd80cd9ed1780c8a67dae5cda00eb9f722f.