Laurent Le Brun
unread,Jun 23, 2017, 8:42:38 AM6/23/17Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Jon Brandvein, László Csomor, Austin Schuh, bazel-discuss, Marcel Hlopko, Francis Hitchens
For the example above, I really recommend inlining the definitions:
cc_library(
name = "mylib_one",
srcs = ["foo.cc"],
hdrs = ["foo.h"],
defines = ["MYDEFINE=1"],
deps = ["//base"],
)
cc_library(
name = "mylib_two",
srcs = ["foo.cc"],
hdrs = ["foo.h"],
defines = ["MYDEFINE=2"],
deps = ["//base"],
)
That's simple and declarative.
If you have a large number of targets, you may prefer alternatives.
But for small numbers, inlining typically works best.
On 22 June 2017 at 14:06, 'Jon Brandvein' via bazel-discuss
>>> email to
bazel-discus...@googlegroups.com.
> --
> 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/CAEoyresUz0gJpXY1COF07qwG5JzCwW10HasxqADi1mpBb4Lx3w%40mail.gmail.com.
--
Laurent