meson.build 487 B

123456789101112131415161718
  1. project('object extraction', 'c')
  2. if meson.is_unity()
  3. message('Skipping extraction test because this is a Unity build.')
  4. else
  5. lib1 = shared_library('somelib', 'src/lib.c')
  6. lib2 = shared_library('somelib2', 'lib.c')
  7. obj1 = lib1.extract_objects('src/lib.c')
  8. obj2 = lib2.extract_objects(['lib.c'])
  9. e1 = executable('main 1', 'main.c', objects : obj1)
  10. e2 = executable('main 2', 'main.c', objects : obj2)
  11. test('extraction test 1', e1)
  12. test('extraction test 2', e2)
  13. endif