← All tasks
cppSFML/SFML #2511Not a task: not reproduced

Raise minimum CMake version to 3.22

envgap__SFML__SFML-2511

01 / FAILURE SIGNATURE

As reported upstream

No identifying execution failure has been captured.
Not a benchmark task.
  • In a clean container the reported failure did not reproduce, or the known fix did not make the project run.

02 / ENVIRONMENT RECIPE

Base commit
c45f6378d6cd54f5d51367d6a216f6addc8f1ed4
Manifest
CMakeLists.txt
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

SFML/SFML #2511 · read the original issue
## Subject of the issue



The oldest OS that someone may reasonably use with SFML 3 is Ubuntu 20 LTS which ships with CMake 3.16, hence the fact that SFML 3 currently requires CMake 3.16. However if you ignore Ubuntu 20 LTS, the next oldest CMake version we expect to find in the wild is CMake 3.22 which ships with Ubuntu 22 LTS. Anyone on Windows or macOS is likely to be using something even newer than 3.22.



**I propose we raise the minimum CMake require to 3.22.** In this issue I want to keep tabs on all the features I'd like to use but can't until we raise this requirement. I plan on growing this list over time to help reinforce my argument. Bear in mind that users on Ubuntu 20 can still use SFML 3, they simply need to install a newer version of CMake which is [quite easy](https://alexreinking.com/blog/how-to-use-cmake-without-the-agonizing-pain-part-1.html).



 * [Numerous improved defaults](https://cmake.org/cmake/help/latest/manual/cmake-policies.7.html) - See all the new policies that have been introduced between 3.16 and 3.22. Each new policy represents an improved default value which we opt into by increasing the minimum required vision.

 * [Presets](https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html) - Arguably we could start using this today since it doesn't necessarily impact the minimum CMake version to build SFML but nonetheless it's a CMake 3.19 features that has had significant updates in every minor release since then. Presets as of CMake 3.22 are fleshed out and very useful.

 * [`PROJECT_IS_TOP_LEVEL`](https://cmake.org/cmake/help/latest/variable/PROJECT_IS_TOP_LEVEL.html) - There are two places where we are using a less expressive alternative to approximate what this built-in variable does.

 * [`TARGET_RUNTIME_DLLS`](https://cmake.org/cmake/help/latest/manual/cmake-generator-expressions.7.html#genex:TARGET_RUNTIME_DLLS) - This generator expression provides a more convenient option for automatically copying all upstream DLLs to wherever they are needed. The CMake project template already takes advantage of this.

 * [Policy 0110](https://cmake.org/cmake/help/latest/policy/CMP0110.html) - Allows for spaces and special characters in test names. This lets us add new tests that match Catch2's test name style that uses brackets and spaces.
Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]