【问题标题】:Append to list in boost build/b2/bjam追加到 boost build/b2/bjam 中的列表
【发布时间】:2021-10-31 18:52:24
【问题描述】:

我想知道如何将项目附加到 boost build/b2/bjam 中的列表。

我相信这一定很容易,但搜索引擎不提供结果。 the documentation 中的 Ctrl+F 也无济于事!

【问题讨论】:

    标签: list append bjam boost-build b2


    【解决方案1】:

    要使用的运算符是+=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找到。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2022-10-13
      • 1970-01-01
      • 2022-07-27
      • 2018-01-15
      • 1970-01-01
      • 1970-01-01
      • 2020-09-24
      相关资源
      最近更新 更多