CMake

Guidance last updated: 12 October 2026

CMake is a build tool commonly used when compiling other libraries.

Usage

After connecting to Stanage (see Establishing a SSH connection), start an interactive session:

salloc

CMake can be loaded with one of:

module load CMake/4.2.1-GCCcore-15.2.0
module load CMake/4.0.3-GCCcore-14.3.0
module load CMake/3.31.8-GCCcore-14.3.0
module load CMake/3.31.3-GCCcore-14.2.0
module load CMake/3.29.3-GCCcore-13.3.0
module load CMake/3.27.6-GCCcore-13.2.0
module load CMake/3.26.3-GCCcore-12.3.0
module load CMake/3.24.3-GCCcore-12.2.0

For example, load CMake/4.2.1-GCCcore-15.2.0, which also loads GCCcore/15.2.0. From a project’s source directory containing CMakeLists.txt, configure a separate build directory and build the project:

cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build

The -D option sets a project configuration variable using -DNAME=value. The available variables and any additional dependencies depend on the project.

Installation notes

CMake was installed using Easybuild, build details can be found in $EBROOTCMAKE/easybuild with a given module loaded.

Direct dependencies for latest version of CMake