You can find resources about CMake in CMake-Tutorial.md
.
Following are instructions about how to set up project environment from the last semester.
(This setup guide is for building gRPC from source. If you are installing gRPC with apt
, the installation and the compilation parts will be different.)
Using Vagrant box: ubuntu/bionic64 (virtualbox, 20190109.0.0) Vagrant file is attached.
- gRPC
- Protobuf
- CMake - as build tool
(For people who are not familiar with submodule: https://www.atlassian.com/git/tutorials/git-submodule)
- googletest
- gflags
- benchmark
- glog
# gRPC
# Pre-requisites
[sudo] apt-get install build-essential autoconf libtool pkg-config
# Install from source
git clone -b $(curl -L https://grpc.io/release) https://github.com/grpc/grpc
cd grpc
git submodule update --init
# From the grpc repository root
make
make install
# Protobuf
cd grpc/third_party/protobuf
sudo make install # 'make' should have been run by core grpc
#cmake
# install PPA
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:george-edison55/cmake-3.x
sudo apt-get update
# if cmake is not installed
sudo apt-get install cmake
# else
sudo apt-get upgrade
# install submodule dependency
git submodule init
git submodule update
# Install packages
# google test
cd third_party/googletest
cmake .
make
sudo make install
# gflags
cd third_party/gflags
cmake .
make
sudo make install
# in root folder
sudo cmake .
make
Unittesting have been registered with ctest
, and you can run all of them via:
#s After make
make test