CMAKE_CACHE_MAJOR_VERSION

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


CMAKE_CACHE_MAJOR_VERSION

Major version of CMake used to create the CMakeCache.txt file

This stores the major version of CMake used to write a CMake cache file. It is only different when a different version of CMake is run on a previously created cache file.

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