Skip to content

Conversation

@NHOrus
Copy link
Contributor

@NHOrus NHOrus commented Mar 25, 2025

CMake 4 dropped compatibility with CMake < 3.5

See https://bugs.gentoo.org/951932

CMake 4 dropped compatibility with CMake < 3.5

See https://bugs.gentoo.org/951932
@Blzut3
Copy link
Member

Blzut3 commented Mar 25, 2025

While there's probably no reason not to bump the minimum to 3.5 anyway, this should really be switching to the version range syntax. Kitware isn't forcing the minimum to be raised, they're just requiring that the compatibility policies be accepted. So if the project doesn't require backwards compat then it should be:

cmake_minimum_required(VERSION 3.5...4.0)
if(CMAKE_VERSION VERSION_LESS 3.12)
	cmake_policy(VERSION ${CMAKE_VERSION})
endif()

@coelckers
Copy link
Member

How old is 3.5? What's this need to handle support for such ancient versions? Does it even still work? Are there relevant platforms that don't have anything more recent?

We should set a reasonable minimum that we know is supported everywhere, not something ancient that the current file still suports by happenstance!

@madame-rachelle
Copy link
Collaborator

If you really want to know, ACC for DOS is still compiled the old fashioned way. Using Makefile.

@coelckers
Copy link
Member

Yes, but that is needed for the few holdouts that still use Wadauthor, because it screwed up so badly that it doesn't work with a Windows version of it.

Although, thruth be told, that probably won't work on a 64 bit system anymore...

I'll never understand this compulsive need for ultimate backwards compatibility in open source development.

@NHOrus
Copy link
Contributor Author

NHOrus commented Mar 26, 2025

https://repology.org/project/cmake/versions
According to this, 3.11 in old Alpine. Let's not indulge poor unfortunate souls who use CentOS 7.
I'll say 3.20+ in something modern, 3.11+ in something less modern but still sane.

@madame-rachelle madame-rachelle merged commit a0e7d24 into ZDoom:master Mar 26, 2025
10 checks passed
@madame-rachelle
Copy link
Collaborator

Changed to the range syntax as suggested. To be honest if anyone is using CentOS they're getting what they asked for, I'm not going to lose sleep over that.

@Blzut3
Copy link
Member

Blzut3 commented Mar 26, 2025

The modern target based approach of writing CMake has been supported since 3.0 (really 2.8.11 give or take but not worth thinking about). There hasn't been a dramatic shift in how things are written since then. So for trivial CMake projects like this one I think setting the minimum to 3.5 sends a clear enough message that we don't care about legacy CMake patterns.

For non-trivial projects I would say the point where you hit by all practical measures 100% of users today is 3.18. RHEL actually isn't a problem anymore in that regard. They actually release updated toolchains throughout the support period these days. So I believe RHEL 8 has something like CMake 3.26 and GCC 14 available. (RHEL 7 did some something similar, but it wasn't as fully baked. That's end of life now anyway.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants