diff --git a/test/distrib/cpp/run_distrib_test_cmake.bat b/test/distrib/cpp/run_distrib_test_cmake.bat index 041803663ea..48d510100e2 100644 --- a/test/distrib/cpp/run_distrib_test_cmake.bat +++ b/test/distrib/cpp/run_distrib_test_cmake.bat @@ -50,6 +50,10 @@ cmake -DCMAKE_INSTALL_PREFIX=%INSTALL_DIR% ..\.. cmake --build . --config Release --target install || goto :error popd +@rem Just before installing gRPC, wipe out contents of all the submodules to simulate +@rem a standalone build from an archive +git submodule deinit --all --force + @rem Install gRPC mkdir cmake\build pushd cmake\build diff --git a/test/distrib/cpp/run_distrib_test_cmake.sh b/test/distrib/cpp/run_distrib_test_cmake.sh index c1bd4c4c227..457b65ffcb3 100755 --- a/test/distrib/cpp/run_distrib_test_cmake.sh +++ b/test/distrib/cpp/run_distrib_test_cmake.sh @@ -24,19 +24,22 @@ apt-get update apt-get install -t jessie-backports -y libssl-dev # Install c-ares -mkdir -p "third_party/cares/cares/cmake/build" && pushd "$_" +mkdir -p "third_party/cares/cares/cmake/build" +pushd "third_party/cares/cares/cmake/build" cmake -DCMAKE_BUILD_TYPE=Release ../.. make -j4 install popd # Install protobuf -mkdir -p "third_party/protobuf/cmake/build" && pushd "$_" +mkdir -p "third_party/protobuf/cmake/build" +pushd "third_party/protobuf/cmake/build" cmake -Dprotobuf_BUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=Release .. make -j4 install popd # Install zlib -mkdir -p "third_party/zlib/cmake/build" && pushd "$_" +mkdir -p "third_party/zlib/cmake/build" +pushd "third_party/zlib/cmake/build" cmake -DCMAKE_BUILD_TYPE=Release ../.. make -j4 install popd @@ -47,7 +50,8 @@ popd git submodule foreach 'cd $toplevel; rm -rf $name' # Install gRPC -mkdir -p "cmake/build" && pushd "$_" +mkdir -p "cmake/build" +pushd "cmake/build" cmake \ -DCMAKE_BUILD_TYPE=Release \ -DgRPC_INSTALL=ON \ @@ -56,12 +60,13 @@ cmake \ -DgRPC_PROTOBUF_PROVIDER=package \ -DgRPC_SSL_PROVIDER=package \ -DgRPC_ZLIB_PROVIDER=package \ -../.. + ../.. make -j4 install popd # Build helloworld example using cmake -mkdir -p "examples/cpp/helloworld/cmake/build" && pushd "$_" +mkdir -p "examples/cpp/helloworld/cmake/build" +pushd "examples/cpp/helloworld/cmake/build" cmake ../.. make popd