|
|
|
@ -15,6 +15,11 @@ |
|
|
|
|
setlocal |
|
|
|
|
|
|
|
|
|
cd /d %~dp0\..\..\.. |
|
|
|
|
mkdir cmake |
|
|
|
|
cd cmake |
|
|
|
|
mkdir install |
|
|
|
|
cd .. |
|
|
|
|
set "INSTALL_PATH=%~dp0\cmake\install" |
|
|
|
|
|
|
|
|
|
If "%GRPC_BUILD_ACTIVATE_VS_TOOLS%" == "2019" ( |
|
|
|
|
@rem set cl.exe build environment to build with VS2019 tooling |
|
|
|
@ -51,7 +56,7 @@ If "%GRPC_CMAKE_GENERATOR%" == "Ninja" ( |
|
|
|
|
cd third_party/abseil-cpp |
|
|
|
|
mkdir build |
|
|
|
|
cd build |
|
|
|
|
cmake -G "%GRPC_CMAKE_GENERATOR%" -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_CXX_COMPILER="cl.exe" -DABSL_BUILD_TESTING=OFF -DCMAKE_BUILD_TYPE="%MSBUILD_CONFIG%" %* .. || goto :error |
|
|
|
|
cmake -G "%GRPC_CMAKE_GENERATOR%" -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_CXX_COMPILER="cl.exe" -DABSL_BUILD_TESTING=OFF -DCMAKE_BUILD_TYPE="%MSBUILD_CONFIG%" -DCMAKE_INSTALL_PREFIX="%INSTALL_PATH%" %* .. || goto :error |
|
|
|
|
ninja -j%GRPC_RUN_TESTS_JOBS% install || goto :error |
|
|
|
|
|
|
|
|
|
@rem Install opentelemetry-cpp since we only support "package" mode for opentelemetry at present. |
|
|
|
@ -59,7 +64,7 @@ If "%GRPC_CMAKE_GENERATOR%" == "Ninja" ( |
|
|
|
|
cd third_party/opentelemetry-cpp |
|
|
|
|
mkdir build |
|
|
|
|
cd build |
|
|
|
|
cmake -G "%GRPC_CMAKE_GENERATOR%" -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_CXX_COMPILER="cl.exe" -DWITH_ABSEIL=ON -DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE="%MSBUILD_CONFIG%" %* .. || goto :error |
|
|
|
|
cmake -G "%GRPC_CMAKE_GENERATOR%" -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_CXX_COMPILER="cl.exe" -DWITH_ABSEIL=ON -DBUILD_TESTING=OFF -DWITH_BENCHMARK=OFF -DWITH_ETW=OFF -DCMAKE_BUILD_TYPE="%MSBUILD_CONFIG%" -DCMAKE_INSTALL_PREFIX="%INSTALL_PATH%" %* .. || goto :error |
|
|
|
|
ninja -j%GRPC_RUN_TESTS_JOBS% install || goto :error |
|
|
|
|
|
|
|
|
|
cd ../../.. |
|
|
|
@ -69,7 +74,7 @@ If "%GRPC_CMAKE_GENERATOR%" == "Ninja" ( |
|
|
|
|
mkdir build |
|
|
|
|
cd build |
|
|
|
|
|
|
|
|
|
cmake -G "%GRPC_CMAKE_GENERATOR%" -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_CXX_COMPILER="cl.exe" -DgRPC_BUILD_GRPCPP_OTEL_PLUGIN=ON -DgRPC_ABSL_PROVIDER=package -DgRPC_BUILD_TESTS=ON -DCMAKE_BUILD_TYPE="%MSBUILD_CONFIG%" %* ../.. || goto :error |
|
|
|
|
cmake -G "%GRPC_CMAKE_GENERATOR%" -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_CXX_COMPILER="cl.exe" -DgRPC_BUILD_GRPCPP_OTEL_PLUGIN=ON -DgRPC_ABSL_PROVIDER=package -DgRPC_BUILD_TESTS=ON -DCMAKE_BUILD_TYPE="%MSBUILD_CONFIG%" -DCMAKE_INSTALL_PREFIX="%INSTALL_PATH%" %* ../.. || goto :error |
|
|
|
|
|
|
|
|
|
ninja -j%GRPC_RUN_TESTS_JOBS% buildtests_%GRPC_RUN_TESTS_CXX_LANGUAGE_SUFFIX% || goto :error |
|
|
|
|
|
|
|
|
@ -80,7 +85,7 @@ If "%GRPC_CMAKE_GENERATOR%" == "Ninja" ( |
|
|
|
|
cd third_party/abseil-cpp |
|
|
|
|
mkdir build |
|
|
|
|
cd build |
|
|
|
|
cmake -G "%GRPC_CMAKE_GENERATOR%" -A "%GRPC_CMAKE_ARCHITECTURE%" %CMAKE_SYSTEM_VERSION_ARG% -DCMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE=x64 -DABSL_BUILD_TESTING=OFF .. || goto :error |
|
|
|
|
cmake -G "%GRPC_CMAKE_GENERATOR%" -A "%GRPC_CMAKE_ARCHITECTURE%" %CMAKE_SYSTEM_VERSION_ARG% -DCMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE=x64 -DABSL_BUILD_TESTING=OFF -DCMAKE_INSTALL_PREFIX="%INSTALL_PATH%" %* .. || goto :error |
|
|
|
|
cmake --build . --target install || goto :error |
|
|
|
|
|
|
|
|
|
@rem Install opentelemetry-cpp since we only support "package" mode for opentelemetry at present. |
|
|
|
@ -88,7 +93,7 @@ If "%GRPC_CMAKE_GENERATOR%" == "Ninja" ( |
|
|
|
|
cd third_party/opentelemetry-cpp |
|
|
|
|
mkdir build |
|
|
|
|
cd build |
|
|
|
|
cmake -G "%GRPC_CMAKE_GENERATOR%" -A "%GRPC_CMAKE_ARCHITECTURE%" %CMAKE_SYSTEM_VERSION_ARG% -DCMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE=x64 -DWITH_ABSEIL=ON -DBUILD_TESTING=OFF .. || goto :error |
|
|
|
|
cmake -G "%GRPC_CMAKE_GENERATOR%" -A "%GRPC_CMAKE_ARCHITECTURE%" %CMAKE_SYSTEM_VERSION_ARG% -DCMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE=x64 -DWITH_ABSEIL=ON -DBUILD_TESTING=OFF -DWITH_BENCHMARK=OFF -DWITH_ETW=OFF -DCMAKE_INSTALL_PREFIX="%INSTALL_PATH%" %* .. || goto :error |
|
|
|
|
cmake --build . --target install -j%GRPC_RUN_TESTS_JOBS% || goto :error |
|
|
|
|
|
|
|
|
|
cd ../../.. |
|
|
|
@ -97,7 +102,7 @@ If "%GRPC_CMAKE_GENERATOR%" == "Ninja" ( |
|
|
|
|
mkdir build |
|
|
|
|
cd build |
|
|
|
|
|
|
|
|
|
cmake -G "%GRPC_CMAKE_GENERATOR%" -A "%GRPC_CMAKE_ARCHITECTURE%" %CMAKE_SYSTEM_VERSION_ARG% -DCMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE=x64 -DgRPC_BUILD_GRPCPP_OTEL_PLUGIN=ON -DgRPC_ABSL_PROVIDER=package -DgRPC_BUILD_TESTS=ON -DgRPC_BUILD_MSVC_MP_COUNT=%GRPC_RUN_TESTS_JOBS% %* ../.. || goto :error |
|
|
|
|
cmake -G "%GRPC_CMAKE_GENERATOR%" -A "%GRPC_CMAKE_ARCHITECTURE%" %CMAKE_SYSTEM_VERSION_ARG% -DCMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE=x64 -DgRPC_BUILD_GRPCPP_OTEL_PLUGIN=ON -DgRPC_ABSL_PROVIDER=package -DgRPC_BUILD_TESTS=ON -DgRPC_BUILD_MSVC_MP_COUNT=%GRPC_RUN_TESTS_JOBS% -DCMAKE_INSTALL_PREFIX="%INSTALL_PATH%" %* ../.. || goto :error |
|
|
|
|
|
|
|
|
|
@rem GRPC_RUN_TESTS_CXX_LANGUAGE_SUFFIX will be set to either "c" or "cxx" |
|
|
|
|
cmake --build . --target buildtests_%GRPC_RUN_TESTS_CXX_LANGUAGE_SUFFIX% --config %MSBUILD_CONFIG% -j%GRPC_RUN_TESTS_JOBS% || goto :error |
|
|
|
|