如何确定bjam中cxxflags的值?还是追加? [英] how to determine value of cxxflags in bjam? Or append to it?

查看:643
本文介绍了如何确定bjam中cxxflags的值?还是追加?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用bjam添加到编译器标志。所以,我需要一个方法来附加到现有的标志 - 像CXXFLAGS + =无论使用gmake - 或者我需要知道cxxflags当前使用的值,所以我可以用我的添加替换它。

I need to add to compiler flags using bjam. So either I need a way to append to the existing flags -- like CXXFLAGS+=whatever using gmake -- or I need to know the currently-used value of cxxflags so I can replace it with my additions.

像往常一样,文档让我惊讶于bjam的复杂性,但是没有能够做任何有用的事情。

As usual, the documentation leaves me astonished at the complexity of bjam but no closer to being able to do anything useful with it.

推荐答案

如果你只是想在命令行上这样做,你可以通过指定feature = value参数添加标志。在make CXXFLAGS的情况下,相应的将是cxxflags = - some-option。请参阅构建的Boost构建文档部分 - 其他功能使用的功能。如果您使用Boost Build作为您的构建系统,因此需要在您的Jamfiles中指定它们,那么您需要向您的项目和/或目标添加需求(参见 BB项目 BBv2 target )。

If you are only looking to do this on the command line you can add flags by specifying "feature=value" arguments. In the case of the make CXXFLAGS the corresponding would be "cxxflags=--some-option". Refer to the Boost Build docs section on built-in features for other such possible features to use. If you are using Boost Build as your build system, and hence need to specify them in your Jamfiles, then you need to add requirements to you project and/or targets (see BB projects and BBv2 targets).

这篇关于如何确定bjam中cxxflags的值?还是追加?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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