gui_starter_template icon indicating copy to clipboard operation
gui_starter_template copied to clipboard

Demonstrate how to use [max] in cmake_minimum_required(VERSION <min>[...<max>]

Open vbaderks opened this issue 5 years ago • 0 comments

Currently a specific version of CMake is specified in the CMakeLists.txt:

https://github.com/lefticus/cpp_starter_project/blob/d7a2b6b891d75edc68c9d88dca7e24cd73e378b8/CMakeLists.txt#L1

CMake makes it however also possible (3.12 feature, but backwards compatible) to indicate a version range by using the format:

cmake_minimum_required(VERSION <min>[...<max>])

for example:

cmake_minimum_required(VERSION 3.13...3.17)

This makes it easier to use a wider range of CMake versions. Updating CMake on CI systems is sometimes difficult and proving a range could help to see that the current CMake version is already compatible.

vbaderks avatar Feb 29 '20 17:02 vbaderks