官网:https://grpc.io/ 国内需VPN访问
pushd命令用于更改新目录并(或)压栈,或者把栈里的某个目录推到栈顶。
echo %my_install_dir%
gRPC_ABSL_PROVIDER is "module" but ABSL_ROOT_DIR is wrong
第三方库没有准备好
linux如何安装这些?
$ sudo apt install -y build-essential autoconf libtool pkg-config
全下载再试,成功了。
cmake -DgRPC_INSTALL=ON -DgRPC_BUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX=$MY_INSTALL_DIR ../..
生成了vs工程。
下载git子模块最快:
git clone --recurse-submodules -b v1.41.0 https://github.com/grpc/grpc
最终:新建一个git项目,一个一个的加子模块,先下载再复制到项目下,OK,终于全部下载下来了。
过程,别试:
主库用gitee同步,可以快速下载。.gitsubmodule中子库(第三方库)怎么一下全部下载呢?
怎么命令不顶用?
git submodule update --recursive
可能是因为我是zip下载的,git clone 下载后是可以用的。
但是子模块下载特别慢。我把所有子模块全同步到gitee
再改.submodules里所有链接到gitee (大家如果用,最好先进我的gitee,每个都点下同步到最新)
[submodule "third_party/zlib"] path = third_party/zlib url = https://gitee.com/chenhao0568/zlib # When using CMake to build, the zlib submodule ends up with a # generated file that makes Git consider the submodule dirty. This # state can be ignored for day-to-day development on gRPC. ignore = dirty [submodule "third_party/protobuf"] path = third_party/protobuf url = https://gitee.com/chenhao0568/protobuf.git [submodule "third_party/googletest"] path = third_party/googletest url = https://gitee.com/chenhao0568/googletest.git [submodule "third_party/benchmark"] path = third_party/benchmark url = https://github.com/google/benchmark [submodule "third_party/boringssl-with-bazel"] path = third_party/boringssl-with-bazel url = https://gitee.com/chenhao0568/boringssl.git [submodule "third_party/re2"] path = third_party/re2 url = https://gitee.com/chenhao0568/re2.git [submodule "third_party/cares/cares"] path = third_party/cares/cares url = https://gitee.com/chenhao0568/c-ares.git branch = cares-1_12_0 [submodule "third_party/bloaty"] path = third_party/bloaty url = https://gitee.com/chenhao0568/bloaty.git [submodule "third_party/abseil-cpp"] path = third_party/abseil-cpp url = https://gitee.com/chenhao0568/abseil-cpp.git branch = lts_2020_02_25 [submodule "third_party/envoy-api"] path = third_party/envoy-api url = https://gitee.com/chenhao0568/data-plane-api.git [submodule "third_party/googleapis"] path = third_party/googleapis url = https://gitee.com/chenhao0568/googleapis.git [submodule "third_party/protoc-gen-validate"] path = third_party/protoc-gen-validate url = https://gitee.com/chenhao0568/protoc-gen-validate.git [submodule "third_party/libuv"] path = third_party/libuv url = https://gitee.com/chenhao0568/libuv.git [submodule "third_party/opencensus-proto"] path = third_party/opencensus-proto url = https://gitee.com/chenhao0568/opencensus-proto.git [submodule "third_party/opentelemetry"] path = third_party/opentelemetry url = https://gitee.com/chenhao0568/opentelemetry-proto.git [submodule "third_party/xds"] path = third_party/xds url = https://gitee.com/chenhao0568/cncf/xds.git
//新建一个分支 git branch gitee //本地修改.gitmodules 地址全改为gitee //提交 git commit 'from gitee OK' //下载子模块 git submodule update --init --recursive
不行。git中submodule修改子模块的git地址不起作用,还是原来的地址。
新建一个git项目,一个一个的加,OK,终于全部下载下来了。



