CMake is an open-source, cross-platform family of tools designed to build, test and package software.
CMake is used to control the software compilation process using simple platform and compiler independent configuration files, and generate native makefiles and workspaces that can be used in the compiler environment of your choice..
CMake is used to control the installation process through the generation of
- Source URL
- Installed Production version
- 3.5.2 (16 April 2016)
- Source code
- Installed Development version
- 3.9.4 (20 October 2017)
- Central Repository
CMake 3.3 or higher.
Installation from Central Repository
The latest version of
CMake can be downloaded from its central repository, https://gitlab.kitware.com/cmake/cmake. Once downloaded, a simple bootstrap installation can be used to install the software as outlined below.
Installation using precompiled binaries
Unlike most of the other
CMake comes as precompiled binaries downloaded directly from https://cmake.org/download/ .
There are versions available for myriad operating systems, including 32-bit and 64-bit Linux.
These instructions show the latter since the UCL HEP Cluster runs 64-bit Scientific Linux.
There are a number of different
Zip archive formats available: any of these can be downloaded and extracted into the appropriate location in
/unix/pbt/software/src (see instructions below).
Once unpacked, the files need only be moved into the correct target directory.
Although files can be moved by hand for the Production environment, it is recommended to use the
dev2prod.sh script as part of the automated copying process.
Instructions for the former, however, are given below.
When downloading software, the downloaded tarball (or other
Zip archive) should be placed in an appropriately named directory in
/unix/pbt/software/src: the instructions below assume that the directory is
Installation from central repository
After the latest version (here v3.9.4) has been pulled from the central repository, create a directory within the build section of the PBT Software directory from which you can compile
cd /unix/pbt/software/build/ mkdir cmake-3.9.4 cd cmake-3.9.4
A simple bootstrap installation is then used to install
CMake within the development section of the PBT Software cluster. Note: The
--prefix option defines the installation prefix, i.e. where the software will be installed. In this case, the software is installed to
../../../src/cmake/bootstrap --prefix=/unix/pbt/software/dev/cmake-3.9.4/ make make install
Installation from precompiled binaries
Source Code Extraction
cd /unix/pbt/software/src/geant4-prerequisites/cmake tar -xvz -f cmake-3.5.2-Linux-x86_64.tar.gz
Build And Install
Although it is discouraged to copy the
CMake binaries from the Development to the Production directory — this should be handled by the
dev2prod.sh script — instructions for doing so are given below.
cd /unix/pbt/software/src/geant4-prerequisites/cmake mv -v cmake-3.5.2-Linux-x86_64 /unix/pbt/software/dev/cmake-3.5.2
cd /unix/pbt/software/dev/ cp -av cmake-3.5.2/* /unix/pbt/software/prod/