diff options
author | Xavier Claessens <xavier.claessens@collabora.com> | 2019-07-11 12:20:50 -0400 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2019-07-19 08:55:50 -0400 |
commit | 2e41d53e4d64985d58f06235604feafa7dad5059 (patch) | |
tree | 5d12bbe2bd56052842991e917d131e372ed1a140 /docs/markdown | |
parent | 43aae8243c35b63ed6764ed1ed2cf5ef0010c887 (diff) | |
download | meson-2e41d53e4d64985d58f06235604feafa7dad5059.zip meson-2e41d53e4d64985d58f06235604feafa7dad5059.tar.gz meson-2e41d53e4d64985d58f06235604feafa7dad5059.tar.bz2 |
Add version check support to find_program()
Closes: #1609
Diffstat (limited to 'docs/markdown')
-rw-r--r-- | docs/markdown/Reference-manual.md | 8 | ||||
-rw-r--r-- | docs/markdown/snippets/find_program_version.md | 9 |
2 files changed, 17 insertions, 0 deletions
diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md index 328cc09..3a21cef 100644 --- a/docs/markdown/Reference-manual.md +++ b/docs/markdown/Reference-manual.md @@ -671,6 +671,14 @@ Keyword arguments are the following: [disabler object](#disabler-object) instead of a not-found object. *Since 0.49.0* +- `version` *(since 0.52.0)* Specifies the required version, see + [`dependency()`](#dependency) for argument format. The version of the program + is determined by running `program_name --version` command. If stdout is empty + it fallbacks to stderr. If the output contains more text than simply a version + number, only the first occurence of numbers separated by dots is kept. + If the output is more complicated than that, the version checking will have to + be done manually using [`run_command()`](#run_command). + Meson will also autodetect scripts with a shebang line and run them with the executable/interpreter specified in it both on Windows (because the command invocator will reject the command otherwise) and diff --git a/docs/markdown/snippets/find_program_version.md b/docs/markdown/snippets/find_program_version.md new file mode 100644 index 0000000..04424d7 --- /dev/null +++ b/docs/markdown/snippets/find_program_version.md @@ -0,0 +1,9 @@ +## Version check in `find_program()` + +A new `version` keyword argument has been added to `find_program` to specify +the required version. See [`dependency()`](#dependency) for argument format. +The version of the program is determined by running `program_name --version` +command. If stdout is empty it fallbacks to stderr. If the output contains more +text than simply a version number, only the first occurence of numbers separated +by dots is kept. If the output is more complicated than that, the version +checking will have to be done manually using [`run_command()`](#run_command). |