aboutsummaryrefslogtreecommitdiffhomepage
path: root/BUILD
diff options
context:
space:
mode:
authorGravatar Adam Cozzette <acozzette@gmail.com>2018-07-02 15:08:12 -0700
committerGravatar GitHub <noreply@github.com>2018-07-02 15:08:12 -0700
commit2c30fa71e7af67ef42a3c71651ee5baedfb2fbfe (patch)
tree65a6d02ffda0b50f8f9536c82647a227a3f10eb1 /BUILD
parent59e04d80cca9b86a97190df0cbab2d93125537fb (diff)
parent55962db9b78d0751e861e43660bde1f82eb911e7 (diff)
Merge pull request #3981 from fahhem/patch-3
Handle srcs in generated files by cd'ing in and out
Diffstat (limited to 'BUILD')
-rw-r--r--BUILD29
1 files changed, 29 insertions, 0 deletions
diff --git a/BUILD b/BUILD
index ce3bd034..7f7ec759 100644
--- a/BUILD
+++ b/BUILD
@@ -940,3 +940,32 @@ objc_library(
non_arc_srcs = OBJC_SRCS,
visibility = ["//visibility:public"],
)
+
+################################################################################
+# Test generated proto support
+################################################################################
+
+genrule(
+ name = "generated_protos",
+ srcs = ["src/google/protobuf/unittest_import.proto"],
+ outs = ["unittest_gen.proto"],
+ cmd = "cat $(SRCS) | sed 's|google/|src/google/|' > $(OUTS)"
+)
+
+proto_library(
+ name = "generated_protos_proto",
+ srcs = [
+ "unittest_gen.proto",
+ "src/google/protobuf/unittest_import_public.proto",
+ ],
+)
+
+py_proto_library(
+ name = "generated_protos_py",
+ srcs = [
+ "unittest_gen.proto",
+ "src/google/protobuf/unittest_import_public.proto",
+ ],
+ default_runtime = "",
+ protoc = ":protoc",
+)