Rate This Document
Findability
Accuracy
Completeness
Readability

Installing CMake from Source Code

The CMake version must be 3.5.1 or later. CMake 3.10.0 is recommended.

  1. Go to the /home directory.
    cd /home
  2. Obtain the source package.
    wget https://github.com/Kitware/CMake/releases/download/v3.10.0/cmake-3.10.0.tar.gz
  3. Decompress the source package.
    tar -zxvf cmake-3.10.0.tar.gz
  4. Go to the source package directory.
    cd cmake-3.10.0
  5. Configure the compilation.
    ./bootstrap --prefix=/usr/local/cmake

  6. Compile CMake.
    make -j

  7. Install CMake.
    make install

  8. Set environment variables.
    export PATH=$PATH:/usr/local/cmake/bin/
  9. View the version information to check whether the installation is successful.
    cmake  --version

    If the version is not 3.10.0, see cmake.