读好书,交益友
分类: LINUX
2016-11-09 14:58:05
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:george-edison55/cmake-3.x
sudo apt-get update sudo apt-get install cmake
但是发现**导致速度太慢,只好源码安装.
安装gtest
sudo apt-get install libgtest-dev
cd /usr/src/gtest
sudo cmake .
sudo make
sudo cp libg* /usr/lib/
安装snappy
git clone git://github.com/trondn/snappy
cd snappy
cmake .
sudo make install
wget
tar -xvzf cmake-3.4.1.tar.gz
cd cmake-3.4.1/
./configure
make
然后
sudo make install
sudo update-alternatives --install /usr/bin/cmake cmake /usr/local/bin/cmake 1 --force
运行
cmake --version
cmake version 3.4.1
CMake suite maintained and supported by Kitware (kitware.com/cmake).