|Reading time:||10 min|
|Last updated:||6 Jun 2023|
|6 Jun 2023|
This guide is intended to get you up and running with this tool quickly with the most common settings. For a thorough review of all options, refer to the official documentation.
CMake is an open-source, cross-platform build tool for software development projects, especially C and C++.
It is available for a variety of operating systems and there are multiple ways to install it.
This article provides quick instructions to install CMake for Arm Linux distributions and for Windows on Arm.
Confirm you are using a Windows on Arm device such as Windows Dev Kit 2023 or a laptop such as Lenovo ThinkPad X13s or Surface Pro 9 with 5G.
Confirm you are using an Arm computer with 64-bit Linux by running:
The output should be:
If you see a different result, you are not using an Arm computer running 64-bit Linux.
Native CMake support for Windows on Arm is available starting with version 3.24. Installers are available now from the CMake download page. Emulated CMake can be used but is no longer needed unless an older version of CMake must be used.
Download the Windows ARM64 Installer and run it.
The welcome screen will appear:
Accept the End-User License Agreement.
Add CMake to the system PATH for the current user if you want to easily invoke cmake from any directory.
Follow the prompts to complete the installation.
Wait for the installer to complete and click
There are multiple ways to install CMake on Linux.
apt on Ubuntu and Debian to install:
sudo apt update sudo apt install cmake -y
dnf to install on Fedora and Amazon Linux 2023:
sudo dnf install cmake -y
Depending on your Linux distribution you may have a version of
cmake which is too old or too new for your project.
snap provides the latest version of
sudo snap install cmake --classic
cmake executable is installed in
/snap/bin which should already be in your search path.
If you need a specific version look for it in the GitHub releases area
Substitute the release number you want to install in the commands below..
cd $HOME wget -N https://github.com/Kitware/CMake/releases/download/v3.23.5/cmake-3.23.5-Linux-aarch64.sh
mkdir cmake bash /home/$USER/cmake-3.23.5-Linux-aarch64.sh --skip-license --exclude-subdir --prefix=$HOME/cmake export PATH=$PATH:$HOME/cmake/bin
After installing CMake, run it to confirm it is installed and can be found:
The output is similar to:
Usage cmake [options] <path-to-source> cmake [options] <path-to-existing-build> cmake [options] -S <path-to-source> -B <path-to-build> Specify a source directory to (re-)generate a build system for it in the current working directory. Specify an existing build directory to re-generate its build system. Run 'cmake --help' for more information.
To print the version run:
The output is similar to:
cmake version 3.22.1 CMake suite maintained and supported by Kitware (kitware.com/cmake).
You are ready to use CMake.
How would you rate the overall quality of this tool quick-install guide?