Download CMake from: https://cmake.org/download/
wget https://cmake.org/files/v3.12/cmake-3.12.3.tar.gz
tar zxvf cmake-3.*
cd cmake-3.*
./bootstrap --prefix=/usr/local
make -j$(nproc)
make install
cmake --version
cmake version *.*.*
CMake suite maintained and supported by Kitware (kitware.com/cmake).
thanks for sharing @1duo. i did find two cmake paths and find CMAKE_BIN in R points to /usr/bin/cmake. but the include library shows /usr/local/bin. after changing the name in /usr/bin/cmake. it works. you are awesome!