

so files), run cmake with -DBUILD_SHARED_LIBS=ON.

Run from grpc directory after cloning the repo with -recursive or updating submodules. Building with CMake Linux/Unix, Using Make NOTE: If you are gRPC maintainer and you have access to our test cluster, you should use the our gRPC's Remote Execution environment to get significant improvement to the build and test speed (and a bunch of other very useful features). We support building with bazel on Linux, MacOS and Windows.įrom the grpc repository root # Build gRPC C++
#BAZEL VS CMAKE HOW TO#
See Installing Bazel for instructions how to install bazel on your system. You'll need bazel version 1.0.0 or higher to build gRPC. Using bazel will give you the best developer experience as well as faster and cleaner builds. Building with bazel (recommended)īazel is the primary build system for gRPC C++ and if you're comfortable with using bazel, we can certainly recommend it. Depending on your needs we recommend building using bazel or cmake. Therefore, gRPC supports several major build systems, which should satisfy most users. In the C++ world, there's no “standard” build system that would work for in all supported use cases and on all supported platforms. You only need to worry about downloading submodules if you're building with something else than bazel (e.g. NOTE: The bazel build tool uses a different model for dependencies. Use following commands to clone the gRPC repository at the latest stable release tag Unix $ git clone - b RELEASE_TAG_HERE https :// github.
#BAZEL VS CMAKE CODE#
(Optional) Install Ninja ( choco install ninja)Ĭlone the repository (including submodules)īefore building, you need to clone the gRPC github repository and download submodules containing source code for gRPC‘s dependencies (that’s done by the submodule command or -recursive flag).

Install nasm and add it to PATH ( choco install nasm) - required by boringssl.

