diff options
Diffstat (limited to 'meson/test cases/common/102 extract same name/meson.build')
-rw-r--r-- | meson/test cases/common/102 extract same name/meson.build | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/meson/test cases/common/102 extract same name/meson.build b/meson/test cases/common/102 extract same name/meson.build new file mode 100644 index 000000000..08daa5b22 --- /dev/null +++ b/meson/test cases/common/102 extract same name/meson.build @@ -0,0 +1,19 @@ +project('object extraction', 'c') + +if meson.backend() == 'xcode' + # Xcode gives object files unique names but only if they would clash. For example + # two files named lib.o instead get the following names: + # + # lib-4fbe522d8ba4cb1f1b89cc2df640a2336b92e1a5565f0a4c5a79b5b5e2969eb9.o + # lib-4fbe522d8ba4cb1f1b89cc2df640a2336deeff2bc2297affaadbe20f5cbfee56.o + # + # No-one has reverse engineered the naming scheme so we would access them. + # IF you feel up to the challenge, patches welcome. + error('MESON_SKIP_TEST, Xcode can not extract objs when they would have the same filename.') +endif + +lib = library('somelib', ['lib.c', 'src/lib.c']) +# Also tests that the object list is flattened properly +obj = lib.extract_objects(['lib.c', ['src/lib.c']]) +exe = executable('main', 'main.c', objects: obj) +test('extraction', exe) |