升级Cmake

来源:互联网 发布:西安软件行业成都 编辑:程序博客网 时间:2024/05/28 04:54

使用源码安装cmake,当然,如果你需要更高版本,需要修改命令。

cmake source install as follows:

0 cd ~

1 wget https://cmake.org/files/v3.5/cmake-3.5.2.tar.gz

2 tar xvf cmake-3.5.2.tar.gz

This worked for me  then:

3 cd cmake-3.5.2

4 ./bootstrap --prefix=/usr

这一步很关键,如果没有指定prefix,后面使用时会报错Could not find CMAKE_ROOT

5 make

6 sudo make install

check:

cmake --version

[root@localhost cmake-3.5.2]# cmake --version
cmake version 3.5.2

CMake suite maintained and supported by Kitware (kitware.com/cmake).

转载自:http://www.cnblogs.com/mignet/p/5404357.html

原创粉丝点击