-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Update cmake_policy in vcpkg #41574
Update cmake_policy in vcpkg #41574
Conversation
Compatibility with versions of CMake older than 3.10 is deprecated.
/azp run |
Rerunning due to network mistake last night. |
Azure Pipelines successfully started running 1 pipeline(s). |
I think this should be set to 3.16.3 Tagging vcpkg-team-review to confirm with other maintainers. |
Do you want to raise the general minimum CMake version (as avaiable in Ubuntu 20.04)? |
That's what I'm arguing, yes. The reason we cared about old CMake versions is "work with the CMake the downstream customer is likely to be using on our supported Linuxes", so with Debian 10 "Buster" leaving support the new oldest distro we care about is Ubuntu 20.04. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is what I concluded from the discussion.
BTW it is not necessary to resync with master all the time.
@vicroms @ras0219-msft and I discussed this today and affirm that we want this to say 3.16. |
Can we merge this? The output is really flooded with these warnings, it's hard to develop with them. Ubuntu 20.04 LTS has this CMake version, there is no need to support versions before v3.16 as no other distro uses a lower version of CMake. |
There is a change requested but not applied yet. And there is a set of PRs which all trigger world rebuilds, so it might make sense to coordinate them to reduce impact on users.
|
Ok thats reasonable, but what about cherrypick this change only to main? It's not a big deal if not, we will have flooded output for a while. So I patched it manually/locally, to get rid of these warnings, I'm not arguing anymore, sry 😁 |
It is not causing errors, and there is a mitigation: CMake 3.30. Again, this PR causes a world rebuild for all users: It invalidates all binary artifacts. That's why it shouldn't occur too often. (And that's the reason why I don't simply open or change another PR. It takes two days to pass CI.) Ping @gwankyun |
Looking forward to getting this merged, I just ran a |
OK, I'm not familiar with the PR process. |
If I understand correctly, #41574 (comment) says that my suggestions in #41574 (review) should be applied. You can do this right here on this page. If you want somebody else to continue, it is also okay. Just leave a note. |
Co-authored-by: Kai Pastor <dg0yt@darc.de>
Co-authored-by: Kai Pastor <dg0yt@darc.de>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM if the only failing port is cmake-user.
cmake-user is a test port, located in scripts/test_ports
. It tests standard find_package
for the current vcpkg cmake (3.30) and for the minimum supported version. That's why it fails: It still tests with 3.7 binaries, but the toolchain wants 3.16 now.
So this port needs to be updated, too. Either you do it in this PR, or I do it separately. But I don't know if I will have the time to do so before sunday.
For a minimal fix, you only have to remove cmake 3.7 testing from cmake-user's default features, i.e. these lines: vcpkg/scripts/test_ports/cmake-user/vcpkg.json Lines 21 to 27 in 9b5cb8e
This keeps testing with cmake 3.30 while disabling the outdated part. |
@microsoft-github-policy-service agree |
There are a few other things (mostly comments) that can be removed after rasing minimum CMake version to 3.16. vcpkg/scripts/buildsystems/vcpkg.cmake Lines 4 to 5 in b2cb0da
Not sure it's worth restting CI over this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fixed the 3-7 test rather than deactivating it.
I'm reverting the cmake-user changes because we merged #42203 |
# Conflicts: # scripts/test_ports/cmake-user/portfile.cmake # scripts/test_ports/cmake-user/vcpkg.json
Fixes: CMake Deprecation Warning at vcpkg/scripts/buildsystems/vcpkg.cmake:40 (cmake_policy): Compatibility with CMake < 3.10 will be removed from a future version of CMake. Ref: microsoft/vcpkg#41574
Compatibility with versions of CMake older than 3.10 is deprecated.