【发布时间】:2021-10-31 18:52:24
【问题描述】:
我想知道如何将项目附加到 boost build/b2/bjam 中的列表。
我相信这一定很容易,但搜索引擎不提供结果。 the documentation 中的 Ctrl+F 也无济于事!
【问题讨论】:
标签: list append bjam boost-build b2
我想知道如何将项目附加到 boost build/b2/bjam 中的列表。
我相信这一定很容易,但搜索引擎不提供结果。 the documentation 中的 Ctrl+F 也无济于事!
【问题讨论】:
标签: list append bjam boost-build b2
要使用的运算符是+=as in GNU Make。
例子:
MYLIST = a b ;
MYLIST += c ;
echo $(MYLIST) ;
节目:a b c
并连接列表:
MYLIST = a b c ;
OTHERLIST = dd ee ;
MYLIST += $(OTHERLIST) ;
echo $(MYLIST) ;
import sequence ;
echo length: [ sequence.length $(MYLIST) ] ;
显示:
a b c dd ee length: 5
更多信息可以在Variables section of the documentation找到。
【讨论】: