Googletest源码编译安装
下载源码
git clone --branch release-1.11.0 --recursive https://github.com/google/googletest
编译安装
mkdir build;cd build
cmake -DCMAKE_INSTALL_PREFIX=<your googletest install dir> ..
系统链接
sudo ln -s <your googletest install dir>/lib/libgtest.a /usr/lib/libgtest.a
sudo ln -s <your googletest install dir>/lib/libgtest_main.a /usr/lib/libgtest_main.a
sudo ln -s <your googletest install dir>/include/gtest /usr/include/gtest