提交 f722ee21 编写于 作者: Y Yi Wang

Do not use https://github.com/pubref/rules_protobuf, but use...

Do not use https://github.com/pubref/rules_protobuf, but use https://github.com/google/protobuf/ as external dependency for protobuf
上级 9b94773a
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
sha: v0.13.2 sha: v0.13.2
hooks: hooks:
- id: yapf - id: yapf
files: (.*\.(py|bzl)|BUILD|.*\.BUILD)$ # Bazel BUILD files follow Python syntax.
- repo: https://github.com/pre-commit/pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks
sha: 7539d8bd1a00a3c1bfd34cdb606d3a6372e83469 sha: 7539d8bd1a00a3c1bfd34cdb606d3a6372e83469
hooks: hooks:
......
# External dependency to grpc-enabled Google-styleprotobuf bulding # External dependency to Google protobuf.
# rules. This method comes from http_archive(
# https://github.com/pubref/rules_protobuf#usage. name = "protobuf",
git_repository( url = "http://github.com/google/protobuf/archive/v3.1.0.tar.gz",
name = "org_pubref_rules_protobuf", sha256 = "0a0ae63cbffc274efb573bdde9a253e3f32e458c41261df51c5dbc5ad541e8f7",
remote = "https://github.com/pubref/rules_protobuf", strip_prefix = "protobuf-3.1.0",
tag = "v0.7.1",
) )
# External dependency to gtest 1.7.0. This method comes from # External dependency to gtest 1.7.0. This method comes from
...@@ -16,7 +15,3 @@ new_http_archive( ...@@ -16,7 +15,3 @@ new_http_archive(
build_file = "third_party/gtest.BUILD", build_file = "third_party/gtest.BUILD",
strip_prefix = "googletest-release-1.7.0", strip_prefix = "googletest-release-1.7.0",
) )
load("@org_pubref_rules_protobuf//cpp:rules.bzl", "cpp_proto_repositories")
cpp_proto_repositories()
licenses(["notice"]) # Apache 2.0 licenses(["notice"]) # Apache 2.0
load("@org_pubref_rules_protobuf//cpp:rules.bzl", "cpp_proto_library") load("@protobuf//:protobuf.bzl", "cc_proto_library")
cpp_proto_library( cc_proto_library(
name = "example_proto", name = "example_proto",
protos = [ srcs = ["example.proto"],
"example.proto" protoc = "@protobuf//:protoc",
], default_runtime = "@protobuf//:protobuf",
with_grpc = True,
) )
cc_library( cc_library(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册