test cases/common/144 link depends custom target/meson.build
raw| 1 | project('link_depends_custom_target', 'c') |
| 2 | |
| 3 | cmd = find_program('make_file.py') |
| 4 | |
| 5 | dep_file = custom_target('gen_dep', |
| 6 | command: [cmd, '@OUTPUT@'], |
| 7 | output: 'dep_file') |
| 8 | |
| 9 | exe = executable('foo', 'foo.c', |
| 10 | link_depends: dep_file, |
| 11 | c_args: ['-DDEPFILE="' + dep_file.full_path()+ '"']) |
| 12 | |
| 13 | # check that dep_file exists, which means that link_depends target ran |
| 14 | test('runtest', exe) |