docopt / docopt.cpp

C++11 port of docopt
Boost Software License 1.0
1.04k stars 146 forks source link

Increase cmake_minimum_required to 3.5 #164

Open eaaltonen opened 10 months ago

eaaltonen commented 10 months ago

Increase cmake_minimum_required to address the below warning when building on CMake version 3.27 on Debian unstable:

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

Commit

CMake version 3.27 deprecates compatibility with versions older than 3.5. Increase the minimum required so that the project can be built without warnings.

jaredgrubb commented 10 months ago

I'm not a Cmake expert. Are you aware of any version issues in our usage of Make?

eaaltonen commented 10 months ago

https://gitlab.kitware.com/cmake/cmake/-/issues/25196 seems like a/the relevant CMake issue. As far as I can tell, at the moment this is "just" a warning.

So merge choice here would according to how much value one places to compatibility with the latest vs. compatibility with the very old.

Informally the versions were selected based on Ubuntu LTS versions. Ubuntu 14.04 packaged CMake 2.8.12.2, and Ubuntu 16.04 packaged CMake 3.5.

Based on the above I'm in favor of increasing the minimum.

mlund commented 1 month ago

I use docopt.cpp in a project and worry that the deprecation warning becomes a hard error in the future. For a similar discussion, see https://github.com/pybind/pybind11_json/issues/64. CMake 3.5 was released in 2016 so it's reasonably safe to assume that most users can meet that requirement.