Debian Codegraph @

test cases/common/196 subproject with features/meson.build

raw
1 project('proj', 'c')
2
3 auto_subproj = subproject('sub', required: get_option('use-subproject'))
4 assert(auto_subproj.found(), 'Subproject should always be buildable and thus found')
5
6 auto_dep = dependency('', fallback: ['sub', 'libSub'], required: true)
7 assert(auto_dep.found() == true, 'Subproject is required and foundable, dependency should be found.')
8
9 disabled_subproj = subproject('disabled_sub', required: get_option('disabled-subproject'))
10 assert(disabled_subproj.found() == false, 'Disabled subproject should be NOT found')
11
12 disabled_dep = dependency('', fallback: ['disabled_sub', 'libSub'], required: false)
13 assert(disabled_dep.found() == false, 'Subproject was disabled, it should never be built.')
14 nothing = executable('nothing', 'nothing.c', dependencies: [disabled_dep])
15
16 subproj_with_missing_dep = subproject('auto_sub_with_missing_dep', required: get_option('auto-sub-with-missing-dep'))
17 assert(subproj_with_missing_dep.found() == false, 'Subproject with required=auto and missing dependency should be NOT found')