Rate This Document
Findability
Accuracy
Completeness
Readability

Installing CMake

  1. Download the CMake (3.0 or later) installation package.
    1
    2
    cd /home
    wget https://cmake.org/files/v3.5/cmake-3.5.2.tar.gz  --no-check-certificate
    
  2. Decompress the CMake installation package.
    1
    tar -zxvf cmake-3.5.2.tar.gz
    
  3. Perform the compilation and installation.
    1
    2
    cd cmake-3.5.2
    ./bootstrap --prefix=/usr/local/cmake && make -j60 && make install
    
  4. Set the environment variables.
    1. Open the /etc/profile file.
      1
      vim /etc/profile
      
    2. Press i to enter the insert mode and add the following content to the file:
      export PATH=/usr/local/cmake/bin:$PATH
    3. Press Esc, type :wq!, and press Enter to save the file and exit.
    4. Make the new environment variables take effect.
      1
      source /etc/profile
      
  5. View the version.
    cmake --version