BUILD 572 字节
Newer Older
1 2
licenses(["notice"])  # Apache 2.0

3
load("@protobuf//:protobuf.bzl", "cc_proto_library")
4

5
cc_proto_library(
6
    name = "example_proto",
7 8 9
    srcs = ["example.proto"],
    protoc = "@protobuf//:protoc",
    default_runtime = "@protobuf//:protobuf",
10 11 12 13 14 15 16 17
)

cc_library(
    name = "example_lib",
    srcs = ["example_lib.cc"],
    hdrs = ["example_lib.h"],
    deps = [":example_proto"],
)
Y
Yi Wang 已提交
18 19 20 21 22 23

cc_test(
    name = "example_lib_test",
    srcs = ["example_lib_test.cc"],
    copts = ["-Iexternal/gtest/include"],
    deps =[
24
        "@gtest//:gtest",
Y
Yi Wang 已提交
25 26 27
        ":example_lib",
    ],
)