jnunomcosta / cmake-proto-grpc-gen

CMake-based Protocol Buffers with gRPC Code Generation Example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Automatic protobuf and gRPC c++ code generation with CMake

Does what the title says, highly portable solution that in compile time generates the c++ code associated with a proto file and properly links with the project.

It's done by fetching the gRPC library via CMake FetchContent and creating a cmake custom command that uses the generated protoc and grpc_cpp_plugin executables.

You can run this example on your machine by:

mdkir build
cd build
cmake ..
make -j8
./proto_grpc

About

CMake-based Protocol Buffers with gRPC Code Generation Example


Languages

Language:CMake 71.4%Language:C++ 28.6%