安装前提:
sudo apt-get install g++ git bazel
下载代码:
git clone https://github.com/protocolbuffers/protobuf.git
cd protobuf
git submodule update --init --recursive
设置CMake
cmake . -DCMAKE_CXX_STANDARD=14
cmake --build
cmake .
cmake --build . --parallel 10
ctest --verbose
sudo cmake --install .