如何在 Linux 上下载、编译和安装 CMake
2018-07-13 08:54:20来源:编程学习网 阅读 ()
CMake is a cross-platform, open-source build system. CMake is a family of tools designed to build, test and package software.
Here are the simple steps to download, configure, compile, and install CMake on a Linux machine. I have tested these instructions on Debian/Ubuntu Linux distributions but they should work on all Linux machines where compilers and make utilities are installed. Please take a look at?configuring Ubuntu Linux after installation?to configure your Debian/Ubuntu Linux box for the required tools.
Please make sure you check the downloaded file's integrity before unzipping it. '#' (w/o quotes) in front of commands below means you have to run the command as root user (or use sudo?
Download:
$ wget http://www.cmake.org/files/v2.8/cmake-2.8.3.tar.gz
Extration of cmake source code from downloaded file:
$ tar xzf cmake-2.8.3.tar.gz $ cd cmake-2.8.3
Configuration:
If you want to see the available conifuration options, run command below.
$ ./configure --help
In order to configure cmake before installation, run command below.
$ ./configure --prefix=/opt/cmake
We basically instructed the install script to install CMake in /opt/cmake.
Compilation:
$ make
Installation:
# make install
Verification:
After installation without any errors you can verify the installation by running the command below:
$ /opt/cmake/bin/cmake -version
The output should look something like below (depending upon cmake version you are installing).
cmake version 2.8.3
Please feel free to use the comments form below if you have any questions or need more explanation on anything. Use the icons below to share this tutorial with your friends.
标签:
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有
上一篇:使用wget下载https链接
下一篇:使用301重定向代码合集
- 5个相见恨晚的Linux命令,phper必备 2019-02-25
- Linux运用一些常用命令,优秀的PHPer都需掌握 2019-01-21
- 最全面Android 导航模式解析 2018-07-13
- 详解Git 操作 2018-07-13
- 为什么高手离不开Linux系统? 2018-07-13
IDC资讯: 主机资讯 注册资讯 托管资讯 vps资讯 网站建设
网站运营: 建站经验 策划盈利 搜索优化 网站推广 免费资源
网络编程: Asp.Net编程 Asp编程 Php编程 Xml编程 Access Mssql Mysql 其它
服务器技术: Web服务器 Ftp服务器 Mail服务器 Dns服务器 安全防护
软件技巧: 其它软件 Word Excel Powerpoint Ghost Vista QQ空间 QQ FlashGet 迅雷
网页制作: FrontPages Dreamweaver Javascript css photoshop fireworks Flash