CMAKECACHEMAJORVERSION
CMAKE_CACHE_MAJOR_VERSION, more commonly seen as CMAKE_CACHE_MAJOR_VERSION in CMakeCache.txt, is an internal cache metadata variable used by CMake to identify the major version of the cache format. It is generated automatically and stored in the build directory's CMakeCache.txt when a project is configured.
The major version works in concert with CMAKE_CACHE_MINOR_VERSION to indicate cache format compatibility. CMake compares the
The variable is not designed to be manually edited by users. It appears in the cache file
Handling cache incompatibility usually involves removing or regenerating the cache. If upgrading or downgrading CMake across
In summary, CMAKE_CACHE_MAJOR_VERSION is an internal mechanism that helps ensure cache compatibility across CMake major-version boundaries,