cmake_minimum_required: Add variable for ...<max> part of VERSION argument
In a call like cmake_minimum_required(VERSION <min>...<max>)
, the <min>
part is made available via the CMAKE_MINIMUM_REQUIRED_VERSION
variable, but currently there is no way to access the <max>
part. It may be useful for module code to be able to retrieve that value.
This issue was originally identified in #17842 (comment 392010) as being potentially useful for the write_compiler_detection_header()
module command, which has a VERSION
argument that relates to the version set by cmake_minimum_required()
.