View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0015502 | CMake | CMake | public | 2015-04-08 06:17 | 2016-06-10 14:31 | ||||
Reporter | trsystran | ||||||||
Assigned To | Kitware Robot | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | moved | ||||||
Platform | Intel | OS | Ubuntu | OS Version | 12.04 | ||||
Product Version | CMake 3.2.1 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0015502: Add color to Ninja output like with CMAKE_COLOR_MAKEFILE | ||||||||
Description | With CMAKE_COLOR_MAKEFILE (default to ON) CMake creates target descriptions with colors. This is great for human readability. However, with the Ninja generator there is no such option, and CMake doesn't emit any color: the output is much harder to read by a human. Would it be possible to add a CMAKE_COLOR_NINJA equivalent to CMAKE_COLOR_MAKEFILE, but for the Ninja generator? | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0038476) Brad King (manager) 2015-04-08 08:16 |
IIRC ninja captures the output of all tools in its own streams so they don't have access to the terminal. Therefore if someone works on this the feature would have to be enabled by some explicit option or environment variable. |
(0038477) trsystran (reporter) 2015-04-08 08:38 |
According to this https://groups.google.com/forum/#!topic/ninja-build/YaoHVrHh5zk [^] CMake can use the "description" rule variable with ANSI escape codes. |
(0038478) Brad King (manager) 2015-04-08 08:45 |
Re 0015502:0038477: Neat. However this will still require an option to explicitly enable because CMake has no way to know at generation time what kind of terminal will be used to run ninja. |
(0038950) Kyle J Strand (reporter) 2015-06-18 15:25 |
This should actually be achievable by adding the compile flag `-fdiagnostics-color=always`, according to the Ninja developers: https://github.com/martine/ninja/issues/814 [^] I've tested this on Debian 7.8 using GCC 5.1.0, CMake 3.2.2, and Ninja 1.5.3. It should work for Clang as well, but I have not yet been able to verify this. |
(0038951) Kyle J Strand (reporter) 2015-06-18 15:52 |
I've now tested it with a recent Clang++3.7 build from the LLVM trunk, as well, and it seems to work. |
(0042755) Kitware Robot (administrator) 2016-06-10 14:29 |
Resolving issue as `moved`. This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2015-04-08 06:17 | trsystran | New Issue | |
2015-04-08 08:16 | Brad King | Note Added: 0038476 | |
2015-04-08 08:38 | trsystran | Note Added: 0038477 | |
2015-04-08 08:45 | Brad King | Note Added: 0038478 | |
2015-06-18 15:25 | Kyle J Strand | Note Added: 0038950 | |
2015-06-18 15:52 | Kyle J Strand | Note Added: 0038951 | |
2016-06-10 14:29 | Kitware Robot | Note Added: 0042755 | |
2016-06-10 14:29 | Kitware Robot | Status | new => resolved |
2016-06-10 14:29 | Kitware Robot | Resolution | open => moved |
2016-06-10 14:29 | Kitware Robot | Assigned To | => Kitware Robot |
2016-06-10 14:31 | Kitware Robot | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |