diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-29 04:41:38 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-29 04:41:38 +0000 |
commit | 7b6e527f440cd7e6f8be2b07cee320ee6ca18786 (patch) | |
tree | 4a2738d69fa2814659fdadddf5826282e73d81f4 /test cases/common/88 dep fallback/meson.build | |
parent | Initial commit. (diff) | |
download | meson-7b6e527f440cd7e6f8be2b07cee320ee6ca18786.tar.xz meson-7b6e527f440cd7e6f8be2b07cee320ee6ca18786.zip |
Adding upstream version 1.0.1.upstream/1.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test cases/common/88 dep fallback/meson.build')
-rw-r--r-- | test cases/common/88 dep fallback/meson.build | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/test cases/common/88 dep fallback/meson.build b/test cases/common/88 dep fallback/meson.build new file mode 100644 index 0000000..2e962f6 --- /dev/null +++ b/test cases/common/88 dep fallback/meson.build @@ -0,0 +1,38 @@ +project('dep fallback', 'c') + +bob = dependency('boblib', fallback : ['boblib', 'bob_dep'], required: false, + default_options : 'warning_level=1') +if not bob.found() + error('Bob is actually needed') +endif + +# boblib subproject exists, but bobinc is not a dependency variable +sita = dependency('sitalib', fallback : ['boblib', 'bobinc'], required: false) +assert(not sita.found()) +# boblib subproject exists, but sita_dep doesn't exist +sita = dependency('sitalib', fallback : ['boblib', 'sita_dep'], required: false) +assert(not sita.found()) +# boblib has been configured so zlib cannot be searched on the system +zlib = dependency('zlib', fallback : ['boblib', 'notfound_dep'], required: false) +assert(not zlib.found()) +# boblib has been configured so zlib cannot be searched on the system. +# Not variable name provided and the subproject does not override zlib. +zlib = dependency('zlib', fallback : 'boblib', required: false) +assert(not zlib.found()) + +# jimmylib subproject doesn't exist +jimmy = dependency('jimmylib', fallback : ['jimmylib', 'jimmy_dep'], required: false) +# dummylib subproject fails to configure +dummy = dependency('dummylib', fallback : ['dummylib', 'dummy_dep'], required: false) + +gensrc_py = find_program('gensrc.py') +gensrc = custom_target('gensrc.c', + input : 'tester.c', + output : 'gensrc.c', + command : [gensrc_py, '@INPUT@', '@OUTPUT@']) + +exe = executable('bobtester', + [gensrc], + dependencies : bob) + +test('bobtester', exe) |