Debian Codegraph @

test cases/common/181 same target name flat layout/meson.build

raw
1 project('subdir targets', 'c')
2
3 if meson.backend() == 'xcode'
4 error('MESON_SKIP_TEST: many targets with the same name not supported in Xcode. Patches welcome.')
5 endif
6
7 # Idea behind this test is to create targets with identical name
8 # but different output files. We can do this by choosing different
9 # name_prefix of libraries. Target id does not depend on name_prefix.
10
11 main_foo = static_library('foo', 'foo.c', name_prefix : 'main')
12 subdir('subdir') # defines subdir_foo
13
14 exe = executable('prog', 'main.c', link_with : [main_foo, subdir_foo])
15 test('main test', exe)