| 1 |
project('cmakeSubTest_advanced', ['c', 'cpp']) |
| 2 |
|
| 3 |
cm = import('cmake') |
| 4 |
|
| 5 |
# Test the "normal" subproject call |
| 6 |
sub_pro = cm.subproject('cmMod') |
| 7 |
sub_dep = sub_pro.dependency('cmModLib') |
| 8 |
sub_sta = sub_pro.dependency('cmModLibStatic') |
| 9 |
|
| 10 |
# Build some files |
| 11 |
exe1 = executable('main1', ['main.cpp'], dependencies: [sub_dep]) |
| 12 |
exe2 = executable('main2', ['main.cpp'], dependencies: [sub_sta]) |
| 13 |
test('test1', exe1) |
| 14 |
test('test2', exe2) |
| 15 |
|
| 16 |
# Test if we can also extract executables |
| 17 |
assert(sub_pro.target_type('meson-testEXE') == 'executable', 'The type must be executable for obvious reasons') |
| 18 |
test('test3', sub_pro.target('meson-testEXE')) |
| 19 |
test('test4', sub_pro.target('benchmark')) |