CMake

This article will show you how to install CMake to your slot for use when trying to build other software.

You'll need to execute some commands via SSH to use this software. There is a separate guide on how to connect to your slot via SSH. Commands are kept as simple as possible and in most cases will simply need to be copied and pasted into the terminal window (then executed by pressing the Enter key).

Install from binary

Install CMake by logging in via SSH, then copying and pasting the following:

mkdir -p ~/bin && bash
wget -qO ~/cmake.tar.gz https://cmake.org/files/v3.9/cmake-3.9.4-Linux-x86_64.tar.gz
tar xf ~/cmake.tar.gz --strip-components=1 -C ~/

Compile from source

If you prefer to compile from source you can copy and paste the following:

wget -qO ~/cmake.tar.gz https://cmake.org/files/v3.9/cmake-3.9.3.tar.gz
tar xf ~/cmake.tar.gz && cd ~/cmake-*
./configure --prefix=$HOME
make && make install
cd && rm -rf cmake*

Usage

You can test the version with cmake --version. This returns something like:

cmake version 3.9.4

CMake suite maintained and supported by Kitware (kitware.com/cmake).

If you need to install software using cmake, you can run the following in the software's directory:

cmake -DPREFIX=$HOME

Troubleshooting

When I run cmake --version I get an error bash: cmake: command not found or a different version than I installed

This means ~/bin is not part of your PATH. You can add it with the following:

echo "PATH=~/bin:$PATH" > ~/.bashrc
source ~/.bashrc

Then, try the command again.