Skip to content

meson: simplify version lookup and avoid deprecation warnings#1049

Merged
Cyan4973 merged 1 commit intolz4:devfrom
eli-schwartz:meson-warning-run_command
Jan 29, 2022
Merged

meson: simplify version lookup and avoid deprecation warnings#1049
Cyan4973 merged 1 commit intolz4:devfrom
eli-schwartz:meson-warning-run_command

Conversation

@eli-schwartz
Copy link
Copy Markdown
Contributor

run_command() in development versions of meson will warn when the check: kwarg is not specified. At the same time, lz4 has some gnarly code to manually check the return code and raise an error if it failed.

Kill two birds with one stone, by making run_command inherently raise a fatal error when erroring out, then proceeding in the knowledge that it must have succeeded.

run_command() in development versions of meson will warn when the
`check: ` kwarg is not specified. At the same time, lz4 has some gnarly
code to manually check the return code and raise an error if it failed.

Kill two birds with one stone, by making run_command inherently raise a
fatal error when erroring out, then proceeding in the knowledge that it
must have succeeded.
@eli-schwartz
Copy link
Copy Markdown
Contributor Author

Personally, I would recommend storing the version number in a buildsystem agnostic text file, e.g. VERSION. meson directly supports this (since 0.57) via

project('lz4', 'c', version: files('VERSION'))

@Cyan4973 Cyan4973 merged commit b2256c0 into lz4:dev Jan 29, 2022
@eli-schwartz eli-schwartz deleted the meson-warning-run_command branch January 30, 2022 05:01
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.

2 participants