Once you have both the cmake and the cmake3 package installed on your machine, you can use update-alternatives to switch between both packages.

Use the alternatives command to register both installations:

$ sudo alternatives --install /usr/local/bin/cmake cmake /usr/bin/cmake 10 \
--slave /usr/local/bin/ctest ctest /usr/bin/ctest \
--slave /usr/local/bin/cpack cpack /usr/bin/cpack \
--slave /usr/local/bin/ccmake ccmake /usr/bin/ccmake \
--family cmake

$ sudo alternatives --install /usr/local/bin/cmake cmake /usr/bin/cmake3 20 \
--slave /usr/local/bin/ctest ctest /usr/bin/ctest3 \
--slave /usr/local/bin/cpack cpack /usr/bin/cpack3 \
--slave /usr/local/bin/ccmake ccmake /usr/bin/ccmake3 \
--family cmake

After these two commands, cmake3 will be invoked by default, when you enter cmake from a bash prompt or start a bash script. The commands also take care of registering a few secondary commands like ctest which need to be switched along with cmake.

If you need to switch back to cmake 2.8 as the default, run the following command:

$ sudo alternatives --config cmake

There are 2 programs which provide 'cmake'.

  Selection    Command
-----------------------------------------------
   1           cmake (/usr/bin/cmake)
*+ 2           cmake (/usr/bin/cmake3)

Enter to keep the current selection[+], or type selection number: 1
Answer from sakra on Stack Overflow
๐ŸŒ
GitHub
gist.github.com โ€บ 1duo โ€บ 38af1abd68a2c7fe5087532ab968574e
Install CMake on CentOS 7. - Gist - GitHub
Worked as expected in RHEL 7. Although I didn't install the default version (with yum install cmake etc.) at all. ... I needed to run: source ~/.bashrc before it would work correctly. I was getting "CMake Error: Could not find CMAKE_ROOT !!!" errors.
๐ŸŒ
OrcaCore
orcacore.com โ€บ home โ€บ basic linux โ€บ install and use cmake on centos 7
Install and Use CMake on Centos 7 | Full Guide - OrcaCore
June 3, 2023 - To install the latest CMake version, you need to visit the CMake downloads page. Then, use the wget command to download the latest stable version of CMake: wget https://github.com/Kitware/CMake/releases/download/v3.22.3/cmake-3.22.3.tar.gz ...
Discussions

python 2.7 - CMake on Linux CentOS 7, how to force the system to use cmake3? - Stack Overflow
I tried to install PyTorch on my Linux CentOS 7.3. I downloaded its package, ran this command and got this error: sudo python setup.py install running install running build_deps CMake Error at More on stackoverflow.com
๐ŸŒ stackoverflow.com
How to install ccmake or cmake-gui on CentOS7?
Specifically for cmake 3, not 2.8 More on reddit.com
๐ŸŒ r/CentOS
3
8
August 26, 2018
Does anyone know how to install CMAKE 3.5 or higher in an old Cent OS 8?
That's odd. The earliest version of cmake I can find in CentOS 8.0.1905 is 3.11.4. Not sure how you got 3.3.2 in your system. Could you check rpm -qa | egrep ^cmake just to see what package(s) you have installed? As for getting a more recent version installed, if you enable the CentOS 8.5.2111 repositories, you should find cmake-3.20.2-4 in there. Just do an update from there using dnf. Edit: You should really get off CentOS Linux 8.5 as soon as possible. Migrate to AlmaLinux, CentOS Stream, or Rocky Linux. More on reddit.com
๐ŸŒ r/CentOS
6
3
March 18, 2022
Projects depending on too new versions of CMake
> is it just lazy developers setting their current version as minimum version The flip side of the coin of course is that maybe it is "lazy developers" not updating their development VMs or desktops who complain that their old version of cmake is too out-of-date. More on reddit.com
๐ŸŒ r/cpp
61
0
August 11, 2021
๐ŸŒ
Installati.one
installati.one โ€บ home โ€บ how to install cmake on centos 7
How To Install cmake on CentOS 7 | Installati.one
May 1, 2023 - In this tutorial we learn how to install cmake on CentOS 7 using yum and dnf.
๐ŸŒ
Xinyustudio
xinyustudio.wordpress.com โ€บ 2014 โ€บ 06 โ€บ 18 โ€บ how-to-install-cmake-3-0-on-centos-6-centos-7
How to Install CMake 3.0 on CentOS 6 / CentOS 7 โ€“ Xinyustudio
June 18, 2014 - Follow the step below to install CMake 3.0 on CentOS 7: Download cmake-3.0.0.tar.gz to a folder, e.g. /home/user/Downloads Open a terminal and run below commands: tar -zxvf cmake-3.0.0.tar.gz This will unpack the gz file to a folder cmake-3.0.0 ...
๐ŸŒ
Frontistr
manual.frontistr.com โ€บ en โ€บ install โ€บ install_07.html
Installation procedure to CentOS7.6(cmake) - FrontISTR ver. 5.6
cd $HOME/work tar xvf metis-5.1.0.tar.gz cd metis-5.1.0 make config prefix=~/local cc=gcc openmp=1 make make install ยท $ cd $HOME/work $ tar xvf scalapack-2.0.2.tgz $ cd scalapack-2.0.2 $ mkdir build $ cmake -DCMAKE_INSTALL_PREFIX=$HOME/local \ -DCMAKE_EXE_LINKER_FLAGS="-fopenmp" \ ...
๐ŸŒ
Bluhm-de
bluhm-de.com โ€บ home โ€บ linux โ€บ compile cmake on centos 7
Compile CMAKE on CentOS 7
There are cases, where you need a newer CMAKE version on your CentOS 7 system. This guide will tell you, how to quickly install it.
Find elsewhere
๐ŸŒ
Steemit
steemit.com โ€บ undefined โ€บ @dothebest0927 โ€บ centos7-how-to-cmake-3-8-2-build-required-minimum-version-1
[CentOS7] How to cmake 3.8.2 build (Required minimum version) - 1 โ€” Steemit
May 27, 2019 - $ wget http://www.cmake.org/files/v3.8/cmake-3.8.2.tar.gz $ tar -zxvf cmake-3.6.1.tar.gz $ cd cmake-3.6.1 $ ./bootstrap (Required gcc Compiler) $ make $ make install $ \cp -f ./bin/cmake ./bin/cpack ./bin/ctest /bin $ cmake -version ... How to larger space(https://sjnov11.github.io/blog/cent_os/2018/11/02/extend_disk_size_on_centos7.html) ** Virutal marchine : ** Guest OS : ** Host OS : Windows 10 ... *How To Install GCC on CentOS 7 : (https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/)
๐ŸŒ
Blogger
jotmynotes.blogspot.com โ€บ 2016 โ€บ 10 โ€บ updating-cmake-from-2811-to-362-or.html
JotMyNotes: Updating CMake from 2.8.11 to 3.6.2 or Newer Version on CentOS Linux
October 4, 2016 - Download, extrace, compile and install the code cmake-3.6.2.tar.gz from https://cmake.org/download/ [root@thrift1 testdelete]# wget https://cmake.org/files/v3.6/cmake-3.6.2.tar.gz ยท [root@thrift1 testdelete]# tar -zxvf cmake-3.6.2.tar.gz
๐ŸŒ
Linuxfere
linuxfere.com โ€บ how-to-install-latest-cmake-on-centos
How to Install Latest CMake on CentOS โ€“ LinuxFere
February 27, 2022 - Please note that on CenOS 8, CentOS Stream 8 and later versions of CentOS, yum command is a symbolic link to dnf binary and was replaced by dnf command. We have three ways to install latest version of CMake: use a package manager (like YUM/DNF) to download and install automatically from custom repositories, or install manually from generic binary distribution, or install manually from source compilation.
๐ŸŒ
CMake
cmake.org โ€บ install
Resources
February 22, 2023 - All the resources you need to begin your CMake journey, from learning materials to accessing the CMake community.
๐ŸŒ
SourceExample
sourceexample.com โ€บ article โ€บ en โ€บ 68a27e3315ce3e52c7074e044b7969ff
Centos install the latest version of cmake
July 27, 2020 - wget -c https://github.com/Kitware/CMake/releases/download/v3.17.0-rc3/cmake-3.17.0-rc3.tar.gz tar zxvf cmake-3.17.0-rc3.tar.gz cd cmake-3.17.0-rc3./bootstrap gmake gmake install
๐ŸŒ
LinuxForDevices
linuxfordevices.com โ€บ home โ€บ a step-by-step guide to install cmake on linux
A Step-By-Step Guide to Install CMake on Linux - LinuxForDevices
November 21, 2023 - In this article, we'll learn to install cmake on Linux. CMake is a cross-platform open-source meta-build system that can build, test, and package software. It