nlohmann / json

JSON for Modern C++
https://json.nlohmann.me
MIT License
41.46k stars 6.59k forks source link

Upgrade CMake minimum version #4076

Closed jmigual closed 9 months ago

jmigual commented 12 months ago

Description

Right now this project requires a minimum CMake version of 3.1. Since the new release of CMake (3.27), versions < 3.5 are considered deprecated and will be removed in the future.

This is why we should increase the CMake minimum version. I suggest 3.16 as the new minimum as this is the one that ships with Ubuntu 20.04.

Reproduction steps

Configure the project with CMake 3.27 and you'll get the following error:

CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.

Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.

Expected vs. actual results

No cmake warning shows up.

Minimal code example

No response

Error messages

No response

Compiler and operating system

MSVC on Windows

Library version

master

Validation

Nauroze commented 11 months ago

Would like to fix this.

nlohmann commented 9 months ago

Fixed with #4112.