| 1 |
project('link_depends_indexed_custom_target', 'c') |
| 2 |
|
| 3 |
cmd = find_program('make_file.py') |
| 4 |
|
| 5 |
dep_files = custom_target('gen_dep', |
| 6 |
command: [cmd, '@OUTPUT@'], |
| 7 |
output: ['dep_file1', 'dep_file2']) |
| 8 |
|
| 9 |
exe = executable('foo', 'foo.c', |
| 10 |
link_depends: dep_files[1], |
| 11 |
c_args: ['-DDEPFILE="' + dep_files[0].full_path()+ '"']) |
| 12 |
|
| 13 |
check_arch = find_program('check_arch.py') |
| 14 |
custom_target('check-arch', |
| 15 |
command: [check_arch, exe, host_machine.cpu_family(), '@OUTPUT@'], |
| 16 |
build_by_default: true, |
| 17 |
output: 'dummy.txt') |
| 18 |
|
| 19 |
# check that dep_file1 exists, which means that link_depends target ran |
| 20 |
test('runtest', exe) |