[cmake-developers] [CMake 0015789]: Enable ANSI colors when CLICOLOR_FORCE is set to 1

Mantis Bug Tracker mantis at public.kitware.com
Wed Oct 14 11:07:24 EDT 2015


The following issue has been SUBMITTED. 
====================================================================== 
https://public.kitware.com/Bug/view.php?id=15789 
====================================================================== 
Reported By:                Jan Niklas Hasse
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   15789
Category:                   (No Category)
Reproducibility:            always
Severity:                   feature
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2015-10-14 11:07 EDT
Last Modified:              2015-10-14 11:07 EDT
====================================================================== 
Summary:                    Enable ANSI colors when CLICOLOR_FORCE is set to 1
Description: 
Hi!

I have set up a build server which uses CMake and Makefiles on Windows using
nmake. The build server pipes the output of both, so there's no colored output.
But when I set the environment variable TERM to "xterm" nmake prints the
messages like "Building xy" colored.

On my Linux build server this doesn't work however. I guess because the CMake
generated Makefile checks if isatty returns true (which would mean the output
isn't piped).

As there are situation where one wants to have colored output even if piped, it
would be great, if CMake supported some kind of environment variable to force it
on all platforms. As I was tired of all the different names, I've set up a page,
which summarizes a possible standard name: http://bixense.com/clicolors/

What do you think about CMake to outputting ANSI colored text when
CLICOLOR_FORCE is set to 1? Thanks :)
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2015-10-14 11:07 Jan Niklas HasseNew Issue                                    
======================================================================



More information about the cmake-developers mailing list