8

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?

Praxeolitic
  • 22,455
  • 16
  • 75
  • 126

1 Answers1

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