Opened 13 years ago
Last modified 3 years ago
#3508 new Feature Requests
bjam output in colours
Reported by: | Owned by: | Vladimir Prus | |
---|---|---|---|
Milestone: | Boost 1.47.0 | Component: | build |
Version: | Boost Development Trunk | Severity: | Cosmetic |
Keywords: | coloring, output, colormake, colorgcc | Cc: | jan, boehme@…, flast@… |
Description
I think it would be very useful if bjam prints output to stdout in colours to help to distinguish at least information messages, warnings and errors.
CMake does provide coloured output out of the box. For GNU make and GCC there are http://bre.klaki.net/programs/colormake/ colormake] and colorgcc.
All these tools help programmers to avoid nystagmus issues while analysing compiler output :-)
As a proof of concept, I attached colorbb'' script a rough port of the colormake to work with bjam + GCC toolset.
Attachments (2)
Change History (11)
by , 13 years ago
comment:1 by , 13 years ago
This would be nifty. The only issue is detecting if the terminal handles those escape sequences. CMake has cmSystemTools.cxx:MakefileColorEcho, which in turn uses cmsysTerminal_Color_AssumeTTY and cmsysTerminal_cfprintf, but I could not find the definitions of those two.
comment:2 by , 13 years ago
Vladimir, I appreciate you like this idea.
The function is implemented in CMake low-level module cmsys/kwsys.
Next, during building CMake, ./bootstrap step, the kwsys module, so the files above, is used to generate cmsys module and the Termina.h generated from the '"Terminal.h.in renames kwsys prefix to cmksys prefix:
#if !defined(KWSYS_NAMESPACE) # define kwsys_ns(x) cmsys##x # define kwsysEXPORT cmsys_EXPORT #endif
It means, the function cmsysTerminal_cfprintf is in fact function implemented as kwsysTerminal_cfprintf in the Terminal.c file linked above.
Shortly, it is CMake/Source/kwsys what we are looking for.
comment:4 by , 13 years ago
Component: | bjam → build |
---|---|
Milestone: | Boost 1.42.0 → Boost 1.43.0 |
Owner: | changed from | to
comment:5 by , 12 years ago
Cc: | added |
---|---|
Keywords: | coloring output added |
Milestone: | Boost 1.43.0 → Boost 1.47.0 |
What about this very nice feature?
I'd like to see the target information colored too. Maybe a environment variable B(OOST)B(UILD)_COLORS to define the colors handy.
Let me know if I can be of any support here.
comment:6 by , 11 years ago
I posted some ideas about implementation of ECHO rule output in colours to Boost.Build ml
comment:7 by , 10 years ago
Cc: | added |
---|
comment:8 by , 9 years ago
FYI, I have replace the idea of output colouring with a more feature-rich integration of Boost.Build with an IDE, so I went for Boost.Build Plugin for Qt Creator. Testers and contributors welcome!
comment:9 by , 3 years ago
For records, I added an experimental support for colorful output to echo rule and actions in https://github.com/boostorg/build/pull/573
Wrapper for bjam to colourise it's output and pipe through less