cmake升级到3.10以上


使用yun install cmake3 安装 ,不会覆盖centos7 cmake

1 添加cmake3 源

echo '[group_kdesig-cmake3_EPEL]
name=Copr repo for cmake3_EPEL owned by @kdesig
baseurl=https://copr-be.cloud.fedoraproject.org/results/@kdesig/cmake3_EPEL/epel-7-$basearch/
type=rpm-md
skip_if_unavailable=True
gpgcheck=1
gpgkey=https://copr-be.cloud.fedoraproject.org/results/@kdesig/cmake3_EPEL/pubkey.gpg
repo_gpgcheck=0
enabled=1
enabled_metadata=1' >> /etc/yum.repos.d/cmake3.repo

2执行命令安装 yum install -y cmake3

可能需要安装 yum install jsoncpp


cd /usr/bin
ll |grep cmake
mv cmake cmake.old
ln -s cmake3 cmake

[root@emr-header-1 bin]# cmake --version
cmake3 version 3.14.6
CMake suite maintained and supported by Kitware (kitware.com/cmake).

posted on 2019-12-07 18:03  锋锋2019  阅读(2368)  评论(0编辑  收藏  举报

导航