CMake config: version 8 is compatible with version 7#10819
CMake config: version 8 is compatible with version 7#10819dg0yt wants to merge 1 commit intocurl:masterfrom
Conversation
|
Someone needs to help me with this. I don't understand the description nor the patch. |
|
I understand the problematic but don't yet know, if this is how one should go about the fix. Basically CMake has a concept of "compatible version". By default it's "same major version". Since curls' major changed, when looking for version like "7.44", "8.x.x" is deemed incompatible when using standard version-file. |
|
Doc is there: https://cmake.org/cmake/help/latest/command/find_package.html#config-mode-version-selection For CMake config, it is up to the package to define what is a compatible version, through script code in the version cmake file. Based on the requested version from the CURL uses a CMake function to generate a version file with the "same major version" policy, i.e. any newer version is accepted if it is the same major version. e.g. 8.0.1 would satisfy the request for version 8.0.0 because 8.0.1 is newer and the major version is 8. But it wouldn't satisfy the request for 7.44 because it is a different major version. This PR adds code before the actual version check which turns a request for |
|
Alternatively one could generate the version checking code with the |
|
Yeah, |
|
Thanks, both! |
Reviewed-by: Jakub Zakrzewski Closes curl#10819
AFAIU curl version 8.0.0 does bring any breaking API changes. However, the change of the major version has the effect that the CMake config is not considered compatible for
find_package(CURL 7.123 CONFIG), breaking downstream usage, e.g.azure-core-cpp
kubernetes:
This PR changes the default version check to accept version 8 as a compatible major version if version 7 is requested.