Skip to content
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

cmake: parse project version #12616

Merged
merged 1 commit into from
Dec 13, 2023

Conversation

deepbluev7
Copy link
Contributor

This properly sets the project version in projects meson generates from cmake projects. This allows dependency fallbacks to properly check the version constraints in dependency calls when falling back to a cmake subproject. Before this would fail, because the project version was undefined.

I modified an existing test for this, but feel free to suggest a different approach to testing this. I also am not experienced with any of this, so feedback is welcome!

Motivation was mostly that I had a lot of configure steps fail with the following error message (when trying out cmake fallbacks) and I'd rather not remove the version constraint:

Dependency Olm from subproject subprojects/Olm found: NO found undefined but need: '>=3.2.6'

This properly sets the project version in projects meson generates from
cmake projects. This allows dependency fallbacks to properly check the
version constraints in dependency calls when falling back to a cmake
subproject. Before this would fail, because the project version was
undefined.
@eli-schwartz
Copy link
Member

The lint error is a false positive: pylint-dev/pylint#9222

@tristan957
Copy link
Contributor

@kiwixz wanna give this a review as a resident CMake expert?

Copy link
Contributor

@kiwixz kiwixz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Also tested and it does exactly what it says.

@eli-schwartz
Copy link
Member

It looks correct to me, but thanks for confirmation from people who know a lot more about the cmake internals we are using here.

@eli-schwartz eli-schwartz merged commit ebf5757 into mesonbuild:master Dec 13, 2023
36 of 37 checks passed
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