首页 > 代码库 > CentOS 6.5编译安装最新cmake-3.0.2

CentOS 6.5编译安装最新cmake-3.0.2

1、查看系统信息:
[root@CentOS6 tmp]# uname -a
Linux CentOS6.5 2.6.32-431.29.2.el6.x86_64 #1 SMP Tue Sep 9 21:36:05 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
2、下载合适的cmake版本;
[root@CentOS6 tmp]# wget http://www.cmake.org/files/v3.0/cmake-3.0.2.tar.gz
--2014-10-26 10:57:32--  http://www.cmake.org/files/v3.0/cmake-3.0.2.tar.gz
正在解析主机 www.cmake.org... 66.194.253.19
正在连接 www.cmake.org|66.194.253.19|:80... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:5490501 (5.2M) [application/x-gzip]
正在保存至: “cmake-3.0.2.tar.gz”

 0% [                                            ] 45,398      77.7K/s  
3、下载完毕,解压cmake文件:
[root@CentOS6 tmp]# ls
cmake-3.0.2.tar.gz
[root@CentOS6 tmp]# tar -zxvf cmake-3.0.2.tar.gz 
4、进入解压文件,执行./bootstrap:
[root@CentOS6 tmp]# ls
cmake-3.0.2  cmake-3.0.2.tar.gz
[root@CentOS6 tmp]# cd cmake-3.0.2
[root@CentOS6 cmake-3.0.2]# ls
Auxiliary                   configure             Help
bootstrap                   CONTRIBUTING.rst      Licenses
CMakeCPack.cmake            Copyright.txt         Modules
CMakeCPackOptions.cmake.in  CTestConfig.cmake     README.rst
CMakeGraphVizOptions.cmake  CTestCustom.cmake.in  Source
CMakeLists.txt              CTestCustom.ctest.in  Templates
CMakeLogo.gif               DartConfig.cmake      Tests
cmake_uninstall.cmake.in    DartLocal.conf.in     Utilities
CompileFlags.cmake          doxygen.config
[root@CentOS6 cmake-3.0.2]# ./bootstrap 
5、执行make:
[root@CentOS6 cmake-3.0.2]# make
6、执行make install :
[root@CentOS6 cmake-3.0.2]# make install
7、查看cmake版本信息:
[root@CentOS6 cmake-3.0.2]# cmake -version
cmake version 3.0.2
CMake suite maintained and supported by Kitware (kitware.com/cmake).


本文出自 “鲍尔星空” 博客,请务必保留此出处http://baoerxingkong.blog.51cto.com/9462213/1568098

CentOS 6.5编译安装最新cmake-3.0.2