meson.build 559 B

1234567891011121314151617181920
  1. project('link_depends_custom_target', 'c')
  2. if meson.backend().startswith('vs')
  3. # FIXME: Broken on the VS backends
  4. error('MESON_SKIP_TEST see https://github.com/mesonbuild/meson/issues/1799')
  5. endif
  6. cmd = find_program('make_file.py')
  7. dep_file = custom_target('gen_dep',
  8. command: [cmd, '@OUTPUT@'],
  9. output: 'dep_file')
  10. exe = executable('foo', 'foo.c',
  11. link_depends: dep_file,
  12. c_args: ['-DDEPFILE="' + dep_file.full_path()+ '"'])
  13. # check that dep_file exists, which means that link_depends target ran
  14. test('runtest', exe)