我要评分
获取效率
正确性
完整性
易理解

Installing CMake

Procedure

  1. Use PuTTY to log in to the server as the root user.
  2. Use an SFTP tool to upload the CMake installation package to the /path/to/CMAKE directory.
  3. Run the following command to decompress the installation package:
    cd /path/to/CMAKE && tar -zxf cmake-3.17.3.tar.gz
  4. Run the following command to go to the installation directory:
    cd cmake-3.17.3
  5. Run the following commands to perform the compilation and installation:
    CC=`which gcc` CXX=`which g++` ./bootstrap --prefix=/path/to/CMAKE
    gmake && gmake install
  6. Run the following command to set the environment variable:
    export PATH=/path/to/CMAKE/bin:$PATH