一 下载软件包

# wget https://github.com/Kitware/CMake/releases/download/v3.22.5/cmake-3.22.5.tar.gz

二 解压并安装

# tar xf cmake-3.22.5.tar.gz
# cd cmake-3.22.5
# ./bootstrap --prefix=/usr/local/cmake-3.22.5
# make -j 8
# make install

三  验证版本

# /usr/local/cmake-3.22.5/bin/cmake --version
cmake version 3.22.5

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