The Meson Build System
http://mesonbuild.com/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
721 B
19 lines
721 B
project('proj', 'c') |
|
subproject('sub') |
|
libSub = dependency('sub', fallback: ['sub', 'libSub']) |
|
|
|
exe = executable('prog', 'prog.c', dependencies: libSub) |
|
test('subproject subdir', exe) |
|
|
|
# Verify the subproject has placed dependency override. |
|
dependency('sub-1.0') |
|
|
|
# Verify we can now take 'sub' dependency without fallback, but only version 1.0. |
|
dependency('sub') |
|
d = dependency('sub', version : '>=2.0', required : false) |
|
assert(not d.found(), 'version should not match') |
|
|
|
# Verify that not-found does not get cached, we can still fallback afterward. |
|
dependency('sub2', required : false) |
|
d = dependency('sub2', fallback: ['sub', 'libSub']) |
|
assert(d.found(), 'Should fallback even if a previous call returned not-found')
|
|
|