diff options
author | Angelos Mouzakitis <a.mouzakitis@virtualopensystems.com> | 2023-10-10 14:33:42 +0000 |
---|---|---|
committer | Angelos Mouzakitis <a.mouzakitis@virtualopensystems.com> | 2023-10-10 14:33:42 +0000 |
commit | af1a266670d040d2f4083ff309d732d648afba2a (patch) | |
tree | 2fc46203448ddcc6f81546d379abfaeb323575e9 /meson/test cases/common/232 dependency allow_fallback | |
parent | e02cda008591317b1625707ff8e115a4841aa889 (diff) |
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'meson/test cases/common/232 dependency allow_fallback')
3 files changed, 16 insertions, 0 deletions
diff --git a/meson/test cases/common/232 dependency allow_fallback/meson.build b/meson/test cases/common/232 dependency allow_fallback/meson.build new file mode 100644 index 000000000..b189faf12 --- /dev/null +++ b/meson/test cases/common/232 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/meson/test cases/common/232 dependency allow_fallback/subprojects/foob/meson.build b/meson/test cases/common/232 dependency allow_fallback/subprojects/foob/meson.build new file mode 100644 index 000000000..b2c4814e2 --- /dev/null +++ b/meson/test cases/common/232 dependency allow_fallback/subprojects/foob/meson.build @@ -0,0 +1,2 @@ +project('foob', 'c') +meson.override_dependency('foob', declare_dependency()) diff --git a/meson/test cases/common/232 dependency allow_fallback/subprojects/foob3/meson.build b/meson/test cases/common/232 dependency allow_fallback/subprojects/foob3/meson.build new file mode 100644 index 000000000..9fdb18817 --- /dev/null +++ b/meson/test cases/common/232 dependency allow_fallback/subprojects/foob3/meson.build @@ -0,0 +1,2 @@ +project('foob3', 'c') +# Note that there is no override_dependency here |