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).
And ... when i did it with SUDO, i got the CMAKE_ROOT error as well.
And ... when i did a CMake --version it gave me the old version, two point something.
When completed as ROOT, the error went away, and the version showed as: cmake version 3.12.3
LOG IN AS ROOT!