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 atconfiguring Ubuntu Linux after installationto 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 sudoinstead if your system supports that).
Download:$ wget http://www.cmake.org/files/v2.8/cmake-2.8.3.tar.gzExtration of cmake source code from downloaded file:
$ tar xzf cmake-2.8.3.tar.gz$ cd cmake-2.8.3Configuration:
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:$ makeInstallation:
# make installVerification:
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.
相关文章:
1. Win11分辨率调到了推荐但还是有黑边的解决方法2. Win11预览版25295怎么开启Suggested Actions 等隐藏新功能?3. Win11预览版25295托盘无法继续显示秒数怎么办? Win11时间显示秒数的技巧4. win最稳定的版本推荐5. Win11手柄连接成功用不了的解决方法6. 怎么让Win11系统托盘显示秒数?7. 你没有权限在此位置中保存文件请与管理员联系以或得相应权限8. Win11摄像头禁用了怎么办?Win11系统禁用摄像头无法使用解决方法9. Win11如何关闭登录密码?Win11关闭登录密码的两种解决方法10. Win11充电有感叹号怎么办?Win11充电有感叹号的解决方法