CMAKE_MAJOR_VERSION

From Get docs
Cmake/docs/3.21/variable/cmake major version


CMAKE_MAJOR_VERSION

First version number component of the CMAKE_VERSION variable.

© 2000–2021 Kitware, Inc. and Contributors
Licensed under the BSD 3-clause License.
https://cmake.org/cmake/help/v3.21/variable/CMAKE_MAJOR_VERSION.html