Installing CMake from Source Code
The CMake version must be 3.5.1 or later. CMake 3.10.0 is recommended.
- Go to the /home directory.
1cd /home
- Obtain the source package.
1wget https://github.com/Kitware/CMake/releases/download/v3.10.0/cmake-3.10.0.tar.gz - Decompress the source package.
1tar -zxvf cmake-3.10.0.tar.gz
- Go to the source package directory.
1cd cmake-3.10.0
- Configure the compilation.
1./bootstrap --prefix=/usr/local/cmake

- Compile CMake.
1make -j
- Install CMake.
1make install
- Set environment variables.
export PATH=$PATH:/usr/local/cmake/bin/
- View the version information to check whether the installation is successful.
1cmake --version
If the version is not 3.10.0, see cmake.
Parent topic: Configuring the Installation Environment