Replies: 7 comments
-
The right thing to do is use cmake_minimum_required in order to have the correct cmake policies in place. While this is not 100% foolproof as far as backwards compatibility goes if it doesn't work, it's likely a bug and should be reported upstream. Therefore it's not a problem if we use a newer version of cmake, it's a problem if a port/library doesn't declare a minimum version. |
Beta Was this translation helpful? Give feedback.
-
Please excuse my rushed comment, I didn't read the issue closely enough. I see that the PR you're referring to is concerned with the FindPackage.cmake files shipped with cmake. I'll have to think about that. |
Beta Was this translation helpful? Give feedback.
-
@JackBoosY Why is this "requires: discussion"? |
Beta Was this translation helpful? Give feedback.
-
@BillyONeal In the tool related code change history in vcpkg, we have never strictly dealt with the version of the tool. |
Beta Was this translation helpful? Give feedback.
-
@Neumann-A, I think we have improvements now, does it match your original request? https://github.com/microsoft/vcpkg/blob/master/docs/maintainers/cmake-guidelines.md#cmake-versions-to-require |
Beta Was this translation helpful? Give feedback.
-
@PhoebeHui : This is about the externally used cmake version not about the internally used one. |
Beta Was this translation helpful? Give feedback.
-
Can we use cmake policy to avoid this? |
Beta Was this translation helpful? Give feedback.
-
Why?
Find<Package>.cmake
modules are updated. Example: CURL [CURL] Remove unnecessary renaming. #6386. Supporting older CMake versions here would require conditional changes to the library name which on the other hand breaks newer CMake behavior by not finding debug libraries)So in the end VCPKG can only promise that everything works correctly with the CMake version itself uses to build packages. So vcpkg should at least issue a warning in the toolchain file if the version of CMake used within vcpkg and the version used externally disagree.
Beta Was this translation helpful? Give feedback.
All reactions