diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2020-10-12 17:50:14 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-12 17:50:14 +0300 |
commit | aae23dfff3aa8269a07b6d42479a00923bf73c6e (patch) | |
tree | 6ab489fab1e889141ac3560af38c3da477628b7b /test cases/common | |
parent | ba71fde18652ca156a35cd576dd9981202088424 (diff) | |
parent | 726b82205492a9e1f2dfd0fba96b237b51eeb428 (diff) | |
download | meson-aae23dfff3aa8269a07b6d42479a00923bf73c6e.zip meson-aae23dfff3aa8269a07b6d42479a00923bf73c6e.tar.gz meson-aae23dfff3aa8269a07b6d42479a00923bf73c6e.tar.bz2 |
Merge pull request #7740 from bonzini/fallback-false
Allow blocking/forcing automatic subproject search
Diffstat (limited to 'test cases/common')
3 files changed, 16 insertions, 0 deletions
diff --git a/test cases/common/239 dependency allow_fallback/meson.build b/test cases/common/239 dependency allow_fallback/meson.build new file mode 100644 index 0000000..b189faf --- /dev/null +++ b/test cases/common/239 dependency allow_fallback/meson.build @@ -0,0 +1,12 @@ +project('subproject fallback', 'c') + +foob_dep = dependency('foob', allow_fallback: true, required: false) +assert(foob_dep.found()) + +# Careful! Once a submodule has been triggered and it has +# overridden the dependency, it sticks. +foob_dep = dependency('foob', allow_fallback: false, required: false) +assert(foob_dep.found()) + +foob3_dep = dependency('foob3', allow_fallback: false, required: false) +assert(not foob3_dep.found()) diff --git a/test cases/common/239 dependency allow_fallback/subprojects/foob/meson.build b/test cases/common/239 dependency allow_fallback/subprojects/foob/meson.build new file mode 100644 index 0000000..b2c4814 --- /dev/null +++ b/test cases/common/239 dependency allow_fallback/subprojects/foob/meson.build @@ -0,0 +1,2 @@ +project('foob', 'c') +meson.override_dependency('foob', declare_dependency()) diff --git a/test cases/common/239 dependency allow_fallback/subprojects/foob3/meson.build b/test cases/common/239 dependency allow_fallback/subprojects/foob3/meson.build new file mode 100644 index 0000000..9fdb188 --- /dev/null +++ b/test cases/common/239 dependency allow_fallback/subprojects/foob3/meson.build @@ -0,0 +1,2 @@ +project('foob3', 'c') +# Note that there is no override_dependency here |