git_repository(
name = "grpc_git",
remote = "https://github.com/grpc/grpc.git",
commit = "c6a4539f80a6f3b97b29628c413c7f7eb62d9420",
init_submodules = 1,
)
bind(
name = "grpc++_reflection",
actual = "@grpc_git//:grpc++_reflection",
)bazel build //external:grpc++_reflection, it complains:
bazel-out/local-fastbuild/genfiles/external/grpc_git/src/proto/grpc/reflection/v1alpha/reflection.pb.cc:5:79: fatal error: external/grpc_git/src/proto/grpc/reflection/v1alpha/reflection.pb.h: No such file or directory--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/e7763f8a-8e84-4edd-b58e-9568843b2afc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/CAGQ4vn2gMA4ne59Cj2aX%2BO0%3DEkN3qOLXfu6QGeNDqBgTdk%2BwdA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
+Carmi Grushko Carmi, anything relevant from the top of your head?
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/e7763f8a-8e84-4edd-b58e-9568843b2afc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/CAGQ4vn2gMA4ne59Cj2aX%2BO0%3DEkN3qOLXfu6QGeNDqBgTdk%2BwdA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
diff --git a/bazel/cc_grpc_library.bzl b/bazel/cc_grpc_library.bzl
index ab1add476..dd637b52e 100644
--- a/bazel/cc_grpc_library.bzl
+++ b/bazel/cc_grpc_library.bzl
@@ -42,6 +42,10 @@ def cc_grpc_library(name, srcs, deps, proto_only, well_known_protos, use_externa
**kwargs
)
+ # When another project depends on the grpc project as an external project,
+ # the $(GENFILES) path must be added.
+ copts = ["-I$(GENDIR)"]
+
if not proto_only:
if use_external:
# when this file is used by non-grpc projects
@@ -69,6 +73,7 @@ def cc_grpc_library(name, srcs, deps, proto_only, well_known_protos, use_externa
srcs = [":" + codegen_grpc_target, ":" + codegen_target],
hdrs = [":" + codegen_grpc_target, ":" + codegen_target],
deps = deps + grpc_deps,
+ copts = copts,
**kwargs
)
else:
@@ -77,5 +82,6 @@ def cc_grpc_library(name, srcs, deps, proto_only, well_known_protos, use_externa
srcs = [":" + codegen_target],
hdrs = [":" + codegen_target],
deps = deps + ["//external:protobuf"],
+ copts = copts,
**kwargs
)
diff --git a/bazel/grpc_build_system.bzl b/bazel/grpc_build_system.bzl
index 8b524bd0e..9836130a0 100644
--- a/bazel/grpc_build_system.bzl
+++ b/bazel/grpc_build_system.bzl
@@ -34,9 +34,9 @@
#
def grpc_cc_library(name, srcs = [], public_hdrs = [], hdrs = [], external_deps = [], deps = [], standalone = False, language = "C++"):
- copts = []
+ copts = ["-I$(GENDIR)"]
if language.upper() == "C":
- copts = ["-std=c99"]
+ copts += ["-std=c99"]
native.cc_library(
name = name,
srcs = srcs,
@@ -68,4 +68,3 @@ def grpc_proto_library(name, srcs = [], deps = [], well_known_protos = None,
proto_only = not has_services,
use_external = use_external,
)
-+nnoble, grpc-c-team
On Mar 20, 2017 6:49 AM, "Marcel Hlopko" <hlo...@google.com> wrote:
+Carmi Grushko Carmi, anything relevant from the top of your head?
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/e7763f8a-8e84-4edd-b58e-9568843b2afc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/CAGQ4vn2gMA4ne59Cj2aX%2BO0%3DEkN3qOLXfu6QGeNDqBgTdk%2BwdA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.