diff options
author | rsgowman <rgowman@google.com> | 2018-02-13 17:46:09 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-13 17:46:09 -0500 |
commit | fe19fca0e521e3765e4ecf6a87b0a3d622a52b92 (patch) | |
tree | 24a4485215689063c94d40c764e08f9dee4758ca /cmake | |
parent | 95d0411e207e3eea64c035258745021ae20b676a (diff) |
Serialize and deserialize null (#783)
* Build (grpc's) nanopb with -DPB_FIELD_16BIT
We require (at least) 16 bit fields. (By default, nanopb uses 8 bit
fields, ie allowing up to 256 field tags.)
Also note that this patch adds this to grpc's nanopb, rather than to our
nanopb. We'll need to eventually either:
a) we instruct grpc to use our nanopb
b) we rely on grpc's nanopb instead of using our own.
(^ marked as a TODO for now.)
* Add some dependant protos
Imported from protobuf. Nanopb requires these to be present (though
anything using libprotobuf does not, as these are already built into
that.)
* Add generated nanopb protos based off of newly added proto definitions
* Build the nanopb protos
* Serialize and deserialize null
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/external/grpc.cmake | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/cmake/external/grpc.cmake b/cmake/external/grpc.cmake index 0af6b31..d545087 100644 --- a/cmake/external/grpc.cmake +++ b/cmake/external/grpc.cmake @@ -68,7 +68,15 @@ else() PREFIX ${PROJECT_BINARY_DIR}/external/grpc - CMAKE_ARGS ${CMAKE_ARGS} + # TODO(rsgowman): We're currently building nanopb twice; once via grpc, and + # once via nanopb. The version from grpc is the one that actually ends up + # being used. We need to fix this such that either: + # a) we instruct grpc to use our nanopb + # b) we rely on grpc's nanopb instead of using our own. + # For now, we'll pass in the necessary nanopb cflags into grpc. (We require + # 16 bit fields. Without explicitly requesting this, nanopb uses 8 bit + # fields.) + CMAKE_ARGS ${CMAKE_ARGS};-DCMAKE_C_FLAGS=-DPB_FIELD_16BIT;DCMAKE_CXX_FLAGS=-DPB_FIELD_16BIT BUILD_COMMAND ${CMAKE_COMMAND} --build . --target grpc |