diff options
Diffstat (limited to '')
-rw-r--r-- | test cases/unit/17 prebuilt shared/meson.build | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/test cases/unit/17 prebuilt shared/meson.build b/test cases/unit/17 prebuilt shared/meson.build new file mode 100644 index 0000000..7badcb7 --- /dev/null +++ b/test cases/unit/17 prebuilt shared/meson.build @@ -0,0 +1,38 @@ +project('prebuilt shared library', 'c') + +search_dir = get_option('search_dir') +if search_dir == 'auto' + search_dir = meson.current_source_dir() +endif + +cc = meson.get_compiler('c') +shlib = cc.find_library('alexandria', dirs : search_dir) + +exe = executable('patron', 'patron.c', dependencies : shlib) +test('visitation', exe) + +d = declare_dependency(dependencies : shlib) + +exe2 = executable('another_visitor', 'another_visitor.c', + dependencies : d) +test('another', exe2) + +stlib = static_library( + 'rejected', + 'rejected.c', + dependencies : shlib, +) + +rejected = executable( + 'rejected', + 'rejected_main.c', + link_with : stlib, +) +test('rejected', rejected) + +rejected_whole = executable( + 'rejected_whole', + 'rejected_main.c', + link_whole : stlib, +) +test('rejected (whole archive)', rejected_whole) |