Attention

The ShARC HPC cluster was decommissioned on the 30th of November 2023 at 17:00. It is no longer possible for users to access that cluster.

CMake

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

Usage

CMake can be loaded with:

module load dev/cmake/3.7.1/gcc-4.9.4
module load dev/cmake/3.17.1/gcc-8.2
module load dev/cmake/3.17.1/gcc-10.1

NB CMake has a run-time dependency on libstdc++ so the above also needs to (and does) load the GCC compiler version 4.9.4, 8.2 or 10.1. If you need to compile a CMake project with the Intel Compilers, you must module load the Intel compiler prior to loading cmake.

Usage often involves:

  1. Creating and cd-ing into a dedicated build directory within a source tree then

  2. Running something like cmake -DSOME_OPTION -DANOTHER_OPTION ..

Installation

Version 3.7.1

  1. Install using this script

  2. Install this modulefile as /usr/local/modulefiles/dev/cmake/3.7.1/gcc-4.9.4

Version 3.17.1 with gcc-8.2

  1. Install using this script

  2. Install this modulefile as /usr/local/modulefiles/dev/cmake/3.17.1/gcc-8.2

Version 3.17.1 with gcc-10.1

  1. Install using this script

  2. Install this modulefile as /usr/local/modulefiles/dev/cmake/3.17.1/gcc-10.1