本文共 1633 字,大约阅读时间需要 5 分钟。
1、查看系统信息:[root@CentOS6 tmp]# uname -aLinux 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/Linux2、下载合适的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]# lscmake-3.0.2.tar.gz[root@CentOS6 tmp]# tar -zxvf cmake-3.0.2.tar.gz 4、进入解压文件,执行./bootstrap:[root@CentOS6 tmp]# lscmake-3.0.2 cmake-3.0.2.tar.gz[root@CentOS6 tmp]# cd cmake-3.0.2[root@CentOS6 cmake-3.0.2]# lsAuxiliary configure Helpbootstrap CONTRIBUTING.rst LicensesCMakeCPack.cmake Copyright.txt ModulesCMakeCPackOptions.cmake.in CTestConfig.cmake README.rstCMakeGraphVizOptions.cmake CTestCustom.cmake.in SourceCMakeLists.txt CTestCustom.ctest.in TemplatesCMakeLogo.gif DartConfig.cmake Testscmake_uninstall.cmake.in DartLocal.conf.in UtilitiesCompileFlags.cmake doxygen.config[root@CentOS6 cmake-3.0.2]# ./bootstrap 5、执行make:[root@CentOS6 cmake-3.0.2]# make6、执行make install :[root@CentOS6 cmake-3.0.2]# make install7、查看cmake版本信息:[root@CentOS6 cmake-3.0.2]# cmake -versioncmake version 3.0.2CMake suite maintained and supported by Kitware (kitware.com/cmake).
转载于:https://blog.51cto.com/baoerxingkong/1568098