-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bump CMake requirement to 3.10, don't enable C language #1624
Conversation
Can you provide more details about the warnings? |
For example when
|
I am concerned it would be hard to test new features that might be affected by policy. It would mean testing on the full range of policies instead of just 3.11 |
The current code is equivalent to |
Right, but now it would be worse. The range of possible policies would be 3.2...3.11 and 3.12..3.18 |
Sure, but I don't see why testing with CMake 3.18 wouldn't suffice? It'd cover all the policies. Alternatively, it would in my opinion be sensible to bump the minimum to something more recent. LLVM very recently bumped the minimum to 3.13 for the next release. |
|
Good point, it's not that guaranteed that'd be the case. But that's unlikely and even more unlikely to affect spdlog, since spdlog's use of CMake isn't very weird. Running CMake with |
If minimum version 3.13 is good enough for llvm it is certainly good enough for me. Lets just raise it to 3.13 |
* Reduces the range of possible version we'd need to test with. * Enables newer policies reducing possible deprecation warnings from new policies. * Allows removing some code for compatibility with older versions. * Coincides with LLVM's bump to requiring CMake 3.13.
I've changed the PR to instead bump the CMake requirement to 3.13. I also added another commit to not enable the C language in CMake. That doesn't seem to be necessary and not enabling C results in a significant initial configure time speedup. |
Actually it is necessary under some platforms. see #1442 |
I believe that has been fixed in CMake 3.4 by this commit, which changed |
oh. good to know |
on second thought. 3.13 seems bit too aggressive to me. especially since major distros still use older versions (http://lists.llvm.org/pipermail/llvm-dev/2020-April/140585.html) |
spdlog doesn't seem to actually require the C language. Not enabling it results in a significant initial configure time speedup.
How about CMake 3.10 then? That'd allow removing the policy setting and C language enablement workarounds. |
Sounds better. Thanks! |
Already updated the PR for CMake 3.10. 😉 |
* Fix gabime#1624 * Added changelog
Using a version range enables the policies up to the current version.
This fixes warnings due to deprecated policies in newer versions. Testing shows there to be no policy changes that are problematic.
A fallback is retained for versions <3.11 to emulate the version range behaviour.