conan graph build-order-merge

$ conan graph build-order-merge -h
usage: conan graph build-order-merge [-h] [-f FORMAT] [-v [V]] [-cc CORE_CONF]
                                     [--file [FILE]] [--reduce]

Merge more than 1 build-order file.

options:
  -h, --help            show this help message and exit
  -f FORMAT, --format FORMAT
                        Select the output format: json, html
  -v [V]                Level of detail of the output. Valid options from less
                        verbose to more verbose: -vquiet, -verror, -vwarning,
                        -vnotice, -vstatus, -v or -vverbose, -vv or -vdebug,
                        -vvv or -vtrace
  -cc CORE_CONF, --core-conf CORE_CONF
                        Define core configuration, overwriting global.conf
                        values. E.g.: -cc core:non_interactive=True
  --file [FILE]         Files to be merged
  --reduce              Reduce the build order, output only those to build.
                        Use this only if the result will not be merged later
                        with other build-order

conan graph build-order 命令中所述,有两种类型的顺序:recipeconfiguration。 只有相同类型的构建顺序才能合并在一起,否则该命令将返回错误。

请注意,只能合并尚未通过 --reduce 减少的构建顺序。

合并不同输入文件的结果也可以使用 conan graph build-order-merge --reduce 参数进行减少,其行为将相同,仅保留需要从源代码构建的元素。

当合并 2 个或多个“build-order”文件时,合并后的结果包含一个 profiles 部分,如下所示:

"profiles": {
    "build_order_win": {
        "args": "-pr:h=\"profile1\" -s:h=\"os=Windows\" ..."
    },
    "build_order_nix": {
        "args": "-pr:h=\"profile2\" -s:h=\"os=Linux\" ..."
    }
}

其中 build_order_winbuild_order_nix 是用作合并输入的“build-order”文件名,这些文件名将在构建顺序中每个 packagefilenames 字段中引用。这样,在构建多个配置时,更容易获得在构建顺序中构建特定软件包二进制文件所需的命令行参数。