From a set of CMakeLists.txt
files, how can I determine an appropriate version number for cmake_minimum_required()
? Is there a better way than being familiar with the history of CMake features and using trial and error?
Asked
Active
Viewed 1,674 times
8

Praxeolitic
- 22,455
- 16
- 75
- 126
1 Answers
1
CMake has per-version documentation on its website. Using it, you may check that all features you use in your project are supported by a specific CMake version.
Features include command names, command options and their possible values, names of modules shipped with CMake.
Usually project does not need precise minimum CMake version. You may take reasonable version, which is accessible for users, and check whether this version supports all features you use.

John Zwinck
- 239,568
- 38
- 324
- 436

Tsyvarev
- 60,011
- 17
- 110
- 153
-
`cmake` documentation doesn't go beyond v3.0 though. – Cyan May 06 '22 at 22:34
-
1@Cyan: References to documentation for pre-3.0 versions are at the bottom of this page: https://cmake.org/documentation/ – Tsyvarev May 06 '22 at 22:40