diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2019-07-24 18:46:13 +0400 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2019-08-04 21:44:52 +0300 |
commit | 8ba14057421928b15a485214ac7023d246bfab7c (patch) | |
tree | 108c5faf51aa12b29c9a285e60e7a8ff13d57d3d /mesonbuild/modules/sourceset.py | |
parent | 940ebd658b9e7bf1679bd8fbfbcb6b429d80424a (diff) | |
download | meson-8ba14057421928b15a485214ac7023d246bfab7c.zip meson-8ba14057421928b15a485214ac7023d246bfab7c.tar.gz meson-8ba14057421928b15a485214ac7023d246bfab7c.tar.bz2 |
sourceset: add all_dependencies() method
'if_true' sources should be built with their dependencies, as
illustrated by test case change.
Ideally, I think we would want only the files with the dependencies to
be built with the flags, but that would probably change the way
sourceset are used.
Diffstat (limited to 'mesonbuild/modules/sourceset.py')
-rw-r--r-- | mesonbuild/modules/sourceset.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/mesonbuild/modules/sourceset.py b/mesonbuild/modules/sourceset.py index fc46a7a..a14bd70 100644 --- a/mesonbuild/modules/sourceset.py +++ b/mesonbuild/modules/sourceset.py @@ -41,6 +41,7 @@ class SourceSetHolder(MutableInterpreterObject, ObjectHolder): 'add': self.add_method, 'add_all': self.add_all_method, 'all_sources': self.all_sources_method, + 'all_dependencies': self.all_dependencies_method, 'apply': self.apply_method, }) @@ -131,6 +132,14 @@ class SourceSetHolder(MutableInterpreterObject, ObjectHolder): files = self.collect(lambda x: True, True) return list(files.sources) + @noKwargs + @noPosargs + @FeatureNew('source_set.all_dependencies() method', '0.52.0') + def all_dependencies_method(self, args, kwargs): + self.frozen = True + files = self.collect(lambda x: True, True) + return list(files.dependencies) + @permittedKwargs(['strict']) def apply_method(self, args, kwargs): if len(args) != 1: |