Honor dependency `fallback` argument even if the dependency is not required (#735)
You can potentially have a fallback subproject and if that subproject fails, you can continue without that dependencypull/737/head
parent
6475bdbe20
commit
e411c0b930
2 changed files with 25 additions and 9 deletions
@ -1,6 +1,10 @@ |
||||
project('dep fallback', 'c') |
||||
|
||||
bob = dependency('boblib', fallback : ['boblib', 'bob_dep']) |
||||
bob = dependency('boblib', fallback : ['boblib', 'bob_dep'], required: false) |
||||
if not bob.found() |
||||
error('Bob is actually needed') |
||||
endif |
||||
jimmy = dependency('jimmylib', fallback : ['jimmylib', 'jimmy_dep'], required: false) |
||||
|
||||
exe = executable('bobtester', 'tester.c', dependencies : bob) |
||||
test('bobtester', exe) |
||||
|
Loading…
Reference in new issue