nlohmann / json

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

Accept NEW CMake policies up to CMake 3.14 #4112

Closed craigscott-crascit closed 9 months ago

craigscott-crascit commented 11 months ago

Starting with CMake 3.27, deprecation warnings are issued when asking for policy settings for CMake 3.4 or earlier. The cmake_minimum_required() command accepts a version range, which allows NEW policy settings up to the upper end of that range to be used, but without raising the minimum CMake version above the bottom of that range. This means NEW policy settings will be used where available, without requiring them. This change updates the project's cmake_minimum_required() calls to use a version range to extend the upper policy version to 3.14 where it wasn't already at that version or higher. This prevents the deprecation warning from CMake 3.27, and gives breathing space before a future CMake release will start issuing similar deprecation warnings again.


Pull request checklist

Read the Contribution Guidelines for detailed information.

Please don't

pboettch commented 10 months ago

Related: https://github.com/nlohmann/json/issues/4076

craigscott-crascit commented 9 months ago

Rebased as requested.

coveralls commented 9 months ago

Coverage Status

coverage: 100.0%. remained the same when pulling 4b462d0b12d7eed062760aff01911648e9482331 on craigscott-crascit:cmake-policies-update into 6d4b72d3c3bdc533ee706d3fa74b35199c6a186e on nlohmann:develop.

nlohmann commented 9 months ago

Thanks for the patience!