CMake is an open-source, extensible and software to build automation, testing, and packaging using a compiler-independent method. It manages the build process in an Operating system. CMake is not very similar to other cross-platform systems since it could be used in conjunction with the native build environment. It is also designed to support complex directory hierarchies and applications dependent on several libraries. In the following CMake tutorials, in this article, you will learn How To Install CMake On Fedora 33 Linux. Choose your preferred package on Eldernode to purchase a Linux VPS with the best price and support.
Table of Contents
Tutorial Install CMake On Fedora 33 step by step
CMake is under the BSD-3-Clause license. To build a project, CMake uses a C or C++ compiler and make. You can find the sample configuration files in each source directory that is calling CMakeLists.txt files and are using to generate standard build files.
Point: You can create a simple CMakeLists.txt file by running:
cmake /path/to/CMakeLists.txt
CMake supports multiple builds from a single source tree because it can support in-place and out-of-place builds. CMake can easily install on Windows and Linux operating systems. Join us with this guide to learn CMake installation on Fedora 33. To prepare the latest version of CMake, go to the Cmake download page. Pre-compiled binaries are available for some UNIX platforms and you can alternatively download and build CMake from the source.
CMake Features:
Here is a brief explanation of CMake’s benefits.
1- It compiles code regardless of the location of the code
2- Ability to managing the dependencies
3- It compiles code on different operating systems
4- Ability to generate make files for different systems and generate projects for different IDEs
5- It identifies the location of files and libraries
CMake installation on Fedora Linux
cmake-fedora consists of a set of scripts and cmake modules that simply release software packages to RHEL and Fedora.
To install CMake all you need to do is to run:
sudo dnf install cmake
You can use the following command to install cmake-fedora Git
git clone https://pagure.io/cmake-fedora.git
Also, you can install cmake-fedora as a fedora/EPEL package. So, type:
yum -y install cmake-fedora
Install and Configure CMake On Fedora Using Snap
As you have learned in previous articles, snaps are applications packaged with all their dependencies to run on all popular Linux distributions from a single build. To use snap for installing CMake on Fedora, first, you need to enable snaps on it.
To install snap on Fedora, run the following command:
sudo dnf install snapd
Then, make sure if the paths of the snap update correctly or not. So, log out and back in again.
Now, enter the following to create a symbolic link between /var/lib/snapd/snap and /snap to enable classic snap support.
sudo ln -s /var/lib/snapd/snap /snap
And finally, run the command below to install CMake.
sudo snap install cmake --classic
Conclusion
In this article, you learned How To Install CMake On Fedora 33. In case you are interested in learning more, find our related article on How To Install CMake On Ubuntu And Debian.