diff options
author | Xavier Claessens <xavier.claessens@collabora.com> | 2020-04-13 14:35:06 -0400 |
---|---|---|
committer | Xavier Claessens <xavier.claessens@collabora.com> | 2020-10-13 17:55:16 -0400 |
commit | 6333ee88c1a243f28b3a7a9bce2dd003b541280a (patch) | |
tree | b93f3685bc8eb0c96fb6ba6f4350b781ba2f6213 /test cases/common | |
parent | 311a07c39a34e2aa4c193b4188d47f5e50ca1eda (diff) | |
download | meson-6333ee88c1a243f28b3a7a9bce2dd003b541280a.zip meson-6333ee88c1a243f28b3a7a9bce2dd003b541280a.tar.gz meson-6333ee88c1a243f28b3a7a9bce2dd003b541280a.tar.bz2 |
Merge wraps from subprojects into wraps from main project
wraps from subprojects are now merged into the list of wraps from main
project, so they can be used to download dependencies of dependencies
instead of having to promote wraps manually. If multiple projects
provides the same wrap file, the first one to be configured wins.
This also fix usage of sub-subproject that don't have wrap files. We can
now configure B when its source tree is at
`subprojects/A/subprojects/B/`. This has the implication that we cannot
assume that subproject "foo" is at `self.subproject_dir / 'foo'` any
more.
Diffstat (limited to 'test cases/common')
4 files changed, 18 insertions, 0 deletions
diff --git a/test cases/common/102 subproject subdir/meson.build b/test cases/common/102 subproject subdir/meson.build index a891ca9..36e48a7 100644 --- a/test cases/common/102 subproject subdir/meson.build +++ b/test cases/common/102 subproject subdir/meson.build @@ -54,3 +54,14 @@ assert(d.type_name() == 'internal') # Using gobject-2.0 here because some CI runners have it installed. d = dependency('gobject-2.0', required : false) assert(not d.found()) + +# Verify that implicit fallback works because subprojects/sub_implicit/subprojects/subsub +# directory exists. +d = dependency('subsub') +assert(d.found(), 'Should be able to fallback to sub-subproject') + +# Verify that implicit fallback works because +# subprojects/sub_implicit/subprojects/subsub/subprojects/subsubsub.wrap +# file exists. +d = dependency('subsubsub') +assert(d.found(), 'Should be able to fallback to sub-sub-subproject') diff --git a/test cases/common/102 subproject subdir/subprojects/packagefiles/subsubsub-1.0.zip b/test cases/common/102 subproject subdir/subprojects/packagefiles/subsubsub-1.0.zip Binary files differnew file mode 100644 index 0000000..dfb7576 --- /dev/null +++ b/test cases/common/102 subproject subdir/subprojects/packagefiles/subsubsub-1.0.zip diff --git a/test cases/common/102 subproject subdir/subprojects/sub_implicit/subprojects/subsub/meson.build b/test cases/common/102 subproject subdir/subprojects/sub_implicit/subprojects/subsub/meson.build new file mode 100644 index 0000000..18e2cea --- /dev/null +++ b/test cases/common/102 subproject subdir/subprojects/sub_implicit/subprojects/subsub/meson.build @@ -0,0 +1,3 @@ +project('subsub') + +meson.override_dependency('subsub', declare_dependency()) diff --git a/test cases/common/102 subproject subdir/subprojects/sub_implicit/subprojects/subsub/subprojects/subsubsub.wrap b/test cases/common/102 subproject subdir/subprojects/sub_implicit/subprojects/subsub/subprojects/subsubsub.wrap new file mode 100644 index 0000000..6567ed0 --- /dev/null +++ b/test cases/common/102 subproject subdir/subprojects/sub_implicit/subprojects/subsub/subprojects/subsubsub.wrap @@ -0,0 +1,4 @@ +[wrap-file] +directory = subsubsub-1.0 +source_filename = subsubsub-1.0.zip +source_hash = c073a96b7251937e53216578f6f03d91b84816618a0f1ce3ecfb867beddf1498 |