MantisBT - CMake |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0015789 | CMake | (No Category) | public | 2015-10-14 11:07 | 2016-03-07 09:12 |
|
Reporter | Jan Niklas Hasse | |
Assigned To | Brad King | |
Priority | normal | Severity | feature | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | | OS Version | |
Product Version | | |
Target Version | CMake 3.5 | Fixed in Version | CMake 3.5 | |
|
Summary | 0015789: 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 :) |
Steps To Reproduce | |
Additional Information | |
Tags | No tags attached. |
Relationships | |
Attached Files | 0001-KWSys-Force-colored-output-when-CLICOLOR_FORCE-is-se.patch (990) 2015-10-15 10:06 https://public.kitware.com/Bug/file/5543/0001-KWSys-Force-colored-output-when-CLICOLOR_FORCE-is-se.patch |
|
Issue History |
Date Modified | Username | Field | Change |
2015-10-14 11:07 | Jan Niklas Hasse | New Issue | |
2015-10-14 11:23 | Brad King | Note Added: 0039600 | |
2015-10-14 11:29 | Jan Niklas Hasse | Note Added: 0039601 | |
2015-10-15 10:06 | Jan Niklas Hasse | File Added: 0001-KWSys-Force-colored-output-when-CLICOLOR_FORCE-is-se.patch | |
2015-10-15 10:09 | Jan Niklas Hasse | Note Added: 0039616 | |
2015-10-15 10:35 | Brad King | Note Added: 0039617 | |
2015-10-15 10:35 | Brad King | Note Edited: 0039617 | bug_revision_view_page.php?bugnote_id=39617#r1932 |
2015-10-19 09:18 | Brad King | Note Added: 0039628 | |
2015-10-19 09:18 | Brad King | Assigned To | => Brad King |
2015-10-19 09:18 | Brad King | Status | new => resolved |
2015-10-19 09:18 | Brad King | Resolution | open => fixed |
2015-10-19 09:18 | Brad King | Fixed in Version | => CMake 3.5 |
2015-10-19 09:18 | Brad King | Target Version | => CMake 3.5 |
2015-10-19 10:28 | Jan Niklas Hasse | Note Added: 0039630 | |
2016-03-07 09:12 | Robert Maynard | Note Added: 0040622 | |
2016-03-07 09:12 | Robert Maynard | Status | resolved => closed |
Notes |
|
(0039600)
|
Brad King
|
2015-10-14 11:23
|
|
Yes, I think that makes sense. See the cmSystemTools::MakefileColorEcho method for an entry point into the code. Please read CONTRIBUTING.rst if you're interested in working on a patch. |
|
|
(0039601)
|
Jan Niklas Hasse
|
2015-10-14 11:29
|
|
Great! Thanks for the pointer, I will work on a patch in the next days :) |
|
|
(0039616)
|
Jan Niklas Hasse
|
2015-10-15 10:09
|
|
Patch is done, this was easier than I expected. Building and using a custom CMake worked like a charm! Kudos to you, contributing to CMake is fun :) |
|
|
(0039617)
|
Brad King
|
2015-10-15 10:35
|
|
|
|
(0039628)
|
Brad King
|
2015-10-19 09:18
|
|
|
|
(0039630)
|
Jan Niklas Hasse
|
2015-10-19 10:28
|
|
|
|
(0040622)
|
Robert Maynard
|
2016-03-07 09:12
|
|
Closing resolved issues that have not been updated in more than 4 months. |
|