Open PJK opened 3 years ago
The code listed for libcbor.BUILD is the entire file, that's all you need.
For native Bazel, is it possible to drop historical baggage, and only support simple/easy build cases?
I could create an entire Bazel example project, in a new directory. If you like that idea, what directory?
Andy
On Sun, Jul 18, 2021 at 3:19 PM Pavel Kalvoda @.***> wrote:
In increasing order of usefulness:
- Add a full example (+ test)
- Provide a ready to use "libcbor.BUILD"
- Use Bazel natively (alongside cmake)
- We would have to replicate all the defines and preprocessing, which might be painful to keep in sync, but doable
CC @andyjgf https://github.com/andyjgf
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/PJK/libcbor/issues/190, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK5GJQTHINNR3I2TNMY25FTTYNHPPANCNFSM5ASRY2VA .
-- Andrew John, Google Fonts
Yeah that would be great, I think e.g. examples/bazel would make sense.
It is reasonable to start with the default value of the preprocessor defines (https://github.com/PJK/libcbor/blob/master/CMakeLists.txt#L20, except maybe CBOR_CUSTOM_ALLOC = true
). There are some Windows hacks (https://github.com/PJK/libcbor/blob/master/CMakeLists.txt#L66) and environment checks, but those we can probably ignore for now.
The only 3p dependency is Cmocka for tests. It would be good if tests were also runnable from the blaze project. Is that easily doable?
In increasing order of usefulness:
CC @andyjgf