Coloring compiler diagnostics with SCons

依然范特西╮ 提交于 2019-12-22 18:27:26

问题


I am currently using the colorama package to color messages generated by my build scripts. I have also used scolorizer, which replaces the build commands with custom, colored messages using strfunction() in SCons. This sure makes build output less verbose and warnings easier to spot.

However, I often prefer to see the full command lines when building. Is there a mechanism in SCons to capture compiler output, giving the opportunity to inject some terminal colors before printing it out?


回答1:


You can do this by setting CC and CXX in the environment to a suitable wrapper around your compiler, for example colorgcc.



来源:https://stackoverflow.com/questions/7628881/coloring-compiler-diagnostics-with-scons

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!