I came up with a relatively messy fix:
if native.repository_name() != "@":
gendir = "$(GENDIR)/external/" + native.repository_name().lstrip("@")
else:
gendir = "$(GENDIR)"
copts = ["-I" + gendir + "/gflags_internal"]
I tried to clean it up with "-I$$(dirname $(location gflags_internal/config.h))" but it seems that shell expansion is not supported in copts.
Can anyone think of a better way of doing this?
Link to the issue: https://github.com/gflags/gflags/issues/233
--
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/02c3e97e-1c0e-4af4-8dbc-cf7c70e14a5d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.