Lines Matching +full:cmake +full:- +full:windows
1 gRPC C++ - Building from source
5 …/cpp#to-start-using-grpc-c) instructions for guidance on how to add gRPC as a dependency to a C++ …
7 # Pre-requisites
12 $ [sudo] apt-get install build-essential autoconf libtool pkg-config
15 If you plan to build using CMake
17 $ [sudo] apt-get install cmake
23 $ [sudo] apt-get install clang libc++-dev
34 $ [sudo] xcode-select --install
44 If you plan to build using CMake, follow the instructions from https://cmake.org/download/
55 ## Windows section in Pre-requisites
57 To prepare for cmake + Microsoft Visual C++ compiler build
58 - Install Visual Studio 2019 or later (Visual C++ compiler will be used).
59 - Install [Git](https://git-scm.com/).
60 - Install [CMake](https://cmake.org/download/).
61 - Install [nasm](https://www.nasm.us/) and add it to `PATH` (`choco install nasm`) - *required by b…
62 - (Optional) Install [Ninja](https://ninja-build.org/) (`choco install ninja`)
67 for gRPC's dependencies (that's done by the `submodule` command or `--recursive` flag). Use followi…
73 $ git clone -b RELEASE_TAG_HERE https://github.com/grpc/grpc
75 $ git submodule update --init
78 ## Windows section in Clone the repository (including submodules)
81 > git clone -b RELEASE_TAG_HERE https://github.com/grpc/grpc
83 > git submodule update --init
87 with something else than `bazel` (e.g. `cmake`).
93 we recommend building using `bazel` or `cmake`.
102 We support building with `bazel` on Linux, MacOS and Windows.
112 $ bazel test --config=dbg //test/...
118 ## Building with CMake
122 Run from the grpc directory after cloning the repo with --recursive or updating submodules.
124 $ mkdir -p cmake/build
125 $ cd cmake/build
126 $ cmake ../..
130 If you want to build shared libraries (`.so` files), run `cmake` with `-DBUILD_SHARED_LIBS=ON`.
132 ### Windows, Using Visual Studio 2019 or later
135 cmake will generate a solution (`grpc.sln`) that contains a VS project for
137 added automatically by cmake). After opening the solution with Visual Studio
140 > @rem Run from grpc directory after cloning the repo with --recursive or updating submodules.
143 > cmake .. -G "Visual Studio 16 2019"
144 > cmake --build . --config Release
147 Using gRPC C++ as a DLL is not recommended, but you can still enable it by running `cmake` with `-D…
149 ### Windows, Using Ninja (faster build).
154 > @rem Run from grpc directory after cloning the repo with --recursive or updating submodules.
155 > cd cmake
159 > cmake ..\.. -GNinja -DCMAKE_BUILD_TYPE=Release
160 > cmake --build .
163 Using gRPC C++ as a DLL is not recommended, but you can still enable it by running `cmake` with `-D…
165 ### Windows: A note on building shared libs (DLLs)
167 Windows DLL build is supported at a "best effort" basis and we don't recommend using gRPC C++ as a …
169 That said, we don't actively prohibit building DLLs on windows (it can be enabled in cmake with `-D…
171 - you've been warned that there are some important drawbacks and some things might not work at all …
172 - we don't have extensive testing for DLL builds in place (to avoid maintenance costs, increased te…
176 gRPC's CMake build system has two options for handling dependencies.
177 CMake can build the dependencies for you, or it can search for libraries
180 This behavior is controlled by the `gRPC_<depname>_PROVIDER` CMake variables,
183 * module - build dependencies alongside gRPC. The source code is obtained from
185 * package - use external copies of dependencies that are already available
187 you pre-installed them using CMake with the `CMAKE_INSTALL_PREFIX` option.
189 For example, if you set `gRPC_CARES_PROVIDER=module`, then CMake will build
190 c-ares before building gRPC. On the other hand, if you set
191 `gRPC_CARES_PROVIDER=package`, then CMake will search for a copy of c-ares
196 Perform the following steps to install gRPC using CMake.
197 * Set `-DgRPC_INSTALL=ON`
201 [`CMAKE_INSTALL_PREFIX`](https://cmake.org/cmake/help/latest/variable/CMAKE_INSTALL_PREFIX.html) va…
203 If you are running CMake v3.13 or newer you can build gRPC's dependencies
207 If you are building gRPC < 1.27 or if you are using CMake < 3.13 you will need
211 how to install dependencies with cmake before proceeding to installing gRPC itself.
215 $ cmake ../.. -DgRPC_INSTALL=ON \
216 -DCMAKE_BUILD_TYPE=Release \
217 -DgRPC_ABSL_PROVIDER=package \
218 -DgRPC_CARES_PROVIDER=package \
219 -DgRPC_PROTOBUF_PROVIDER=package \
220 -DgRPC_RE2_PROVIDER=package \
221 -DgRPC_SSL_PROVIDER=package \
222 -DgRPC_ZLIB_PROVIDER=package
227 ### Cross-compiling
229 You can use CMake to cross-compile gRPC for another architecture. In order to
235 targeting for your cross-compile. Once you have done so, you can write a
236 toolchain file to tell CMake where to find the compilers and system tools
239 This toolchain file is specified to CMake by setting the `CMAKE_TOOLCHAIN_FILE`
242 $ cmake ../.. -DCMAKE_TOOLCHAIN_FILE=path/to/file
246 [Cross-compile example](test/distrib/cpp/run_distrib_test_cmake_aarch64_cross.sh)
248 ### A note on SONAME and its ABI compatibility implications in the cmake build
256 …d system, but we're no longer recommending it. You should use `bazel` or `cmake` instead. The `Mak…
263 … error on linux such as 'aclocal-1.15: command not found', which can happen if you ran 'make' befo…
265 $ git clean -f -d -x && git submodule foreach --recursive git clean -f -d -x
266 $ [sudo] apt-get install build-essential autoconf libtool pkg-config