All Downloads are FREE. Search and download functionalities are using the official Maven repository.

proto.cpp.cpp_grpc_library.bzl Maven / Gradle / Ivy

There is a newer version: 2.0.7.Final
Show newest version
load("//cpp:cpp_grpc_compile.bzl", "cpp_grpc_compile")

def cpp_grpc_library(**kwargs):
    name = kwargs.get("name")
    deps = kwargs.get("deps")
    visibility = kwargs.get("visibility")

    name_pb = name + "_pb"
    cpp_grpc_compile(
        name = name_pb,
        deps = deps,
        visibility = visibility,
        verbose = kwargs.pop("verbose", 0),
        transitivity = kwargs.pop("transitivity", {}),
        transitive = kwargs.pop("transitive", True),
    )

    native.cc_library(
        name = name,
        srcs = [name_pb],
        deps = [
            "//external:protobuf_clib",
            "@com_github_grpc_grpc//:grpc++",
            "@com_github_grpc_grpc//:grpc++_reflection",
        ],
        includes = [name_pb],
        visibility = visibility,
    )




© 2015 - 2024 Weber Informatics LLC | Privacy Policy