From 2e41d53e4d64985d58f06235604feafa7dad5059 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Thu, 11 Jul 2019 12:20:50 -0400 Subject: Add version check support to find_program() Closes: #1609 --- docs/markdown/snippets/find_program_version.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 docs/markdown/snippets/find_program_version.md (limited to 'docs/markdown/snippets') 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). -- cgit v1.1