Use a range for CMake minimum versions, 3.2...3.12: support CMake 4.0
CMake 4.0 drops support for CMake <3.5, so minimum versions need to be adjusted for forward compatibility. ~~As long as we are touching the minimum version, let’s advance to 3.12, which can be considered the oldest “modern” CMake release, and which is available in all known supported Linux distributions today.~~
Thanks for the heads up. But since we don't need any newer features, I think we should only advance to 3.5 if that's what cmake still supports. Also the README.md would probably need a small update for the required cmake version.
Thanks for the heads up. But since we don't need any newer features, I think we should only advance to 3.5 if that's what cmake still supports. Also the README.md would probably need a small update for the required cmake version.
Ok, adjusted on both counts and force-pushed.
Looking back at CMakeLists.txt, there are a couple of workarounds that you could dispense with if you did choose to update the minimum version to 3.12:
https://github.com/mapbox/earcut.hpp/blob/7fa7aa30183849e988ae79ab2eef19f9ae97acf4/CMakeLists.txt#L27-L30
https://github.com/mapbox/earcut.hpp/blob/7fa7aa30183849e988ae79ab2eef19f9ae97acf4/CMakeLists.txt#L37-L40
I’m going to update this again to set a minimum version range, 3.2...3.12. That way, CMake 3.2 will still work (as before this PR), if anyone is still using it, but CMake releases that can’t support such old policy versions (e.g., CMake 4.0 can’t support CMake<3.5, and CMake<3.10 is already deprecated) can still work with a higher minimum version.
Sorry to bump, but it would be nice to get this merged so it can used with CMake 4.0.
Thanks for the PR! Superceded by https://github.com/mapbox/earcut.hpp/pull/128