下载源码
wget https://github.com/Kitware/CMake/releases/download/v3.18.2/cmake-3.18.2.tar.gz
解压
tar -zxvf cmake-3.18.2.tar.gz
进入cmark的源码目录
cd cmake-3.18.2
运行bootstrap
这一步运行时间较长。
./bootstrap
# 如果报错 Cannot find a C++ compiler that supports both C++11 and the specified C++ flags.
# 解决方法,安装c++编译器
yum install -y gcc gcc-c++
运行gmake
gmake && gmake install
安装完成
# 查看版本号
cmake --version
网友评论