meson/test cases/cmake/1 basic/meson.build

15 lines
608 B
Meson
Raw Normal View History

2019-04-19 16:14:03 +08:00
project('cmakeSubTest', ['c', 'cpp'])
2019-02-22 04:30:42 +08:00
2019-05-28 22:57:10 +08:00
cm = import('cmake')
sub_pro = cm.subproject('cmMod')
sub_dep = sub_pro.dependency('cmModLib++', include_type: 'system')
2019-05-28 22:57:10 +08:00
assert(sub_pro.found(), 'found() method reports not found, but should be found')
assert(sub_pro.target_list() == ['cmModLib++'], 'There should be exactly one target')
assert(sub_pro.target_type('cmModLib++') == 'shared_library', 'Target type should be shared_library')
assert(sub_dep.include_type() == 'system', 'the include_type kwarg of dependency() works')
2019-02-22 04:30:42 +08:00
2019-02-23 18:50:46 +08:00
exe1 = executable('main', ['main.cpp'], dependencies: [sub_dep])
2019-02-22 04:30:42 +08:00
test('test1', exe1)