编译着色与诊断SCons的 [英] Coloring compiler diagnostics with SCons

查看:180
本文介绍了编译着色与诊断SCons的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前使用的是 COLORAMA 包颜色由我的构建脚本生成的消息。我也用 scolorizer ,它取代定制的构建命令,使用彩色的消息 strfunction()在SCons的。这肯定使建少输出和更容易的警告被发现。

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.

不过,我常常preFER看到构建时,全命令行。是否有 SCons的的机制来捕获编译器的输出,从而有机会在打印之前注入一些终端的颜色?

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?

推荐答案

您可以通过在环境中设置CC和CXX围绕你的编译器合适的包装,例如 colorgcc

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

这篇关于编译着色与诊断SCons的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆