构建cc_library

时间:2019-07-12 23:23:53

标签: bazel

我认为我滥用glob([]) + [],并且+之后的标头无法提取。还是我的参考无效?

这是我的库,我遵循hdrs中该块的bazel文档,下面的glob是标题的绝对路径:

cc_library(
    name = "my_library",
    srcs = glob([
        ...,
    ]),
    hdrs = glob([
        ".../*.h",
        ".../*.h",
        ".../*.h",
    ]) + ["//3rdparty/sample:third_party_headers"],
)

这是third_party_headers内部//3rdparty/sample/BUILD的样子:

filegroup(
    name = "third_party_headers",
    srcs = glob([
        "inc/*.h",
        "inc/*.hpp"
    ])
    ,
    visibility = ["//visibility:public"],
)

我做错了什么很明显吗?

0 个答案:

没有答案