From 79d530e32509b8ccdc50a6769e8c786b3eccebd3 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Mon, 20 May 2019 00:59:20 +0300 Subject: Generators can have extra target dependencies. Closes #4131. --- docs/markdown/snippets/gendeps.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 docs/markdown/snippets/gendeps.md (limited to 'docs/markdown/snippets') diff --git a/docs/markdown/snippets/gendeps.md b/docs/markdown/snippets/gendeps.md new file mode 100644 index 0000000..e724994 --- /dev/null +++ b/docs/markdown/snippets/gendeps.md @@ -0,0 +1,16 @@ +## Generators have a new `depends` keyword argument + +Generators can now specify extra dependencies with the `depends` +keyword argument. It matches the behaviour of the same argument in +other functions and specifies that the given targets must be built +before the generator can be run. This is used in cases such as this +one where you need to tell a generator to indirectly invoke a +different program. + +```meson +exe = executable(...) +cg = generator(program_runner, + output: ['@BASENAME@.c'], + arguments: ['--use-tool=' + exe.full_path(), '@INPUT@', '@OUTPUT@'], + depends: exe) +``` -- cgit v1.1