diff options
| -rw-r--r-- | mesonbuild/build.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py index 83c65b6b7..041cb1972 100644 --- a/mesonbuild/build.py +++ b/mesonbuild/build.py @@ -758,8 +758,8 @@ class BuildTarget(Target): self.link(link_targets) self.link_whole(link_whole_targets) - if not any([self.sources, self.generated, self.objects, self.link_whole_targets, self.structured_sources, - kwargs.pop('_allow_no_sources', False)]): + if not any([[src for src in self.sources if not is_header(src)], self.generated, self.objects, + self.link_whole_targets, self.structured_sources, kwargs.pop('_allow_no_sources', False)]): mlog.warning(f'Build target {name} has no sources. ' 'This was never supposed to be allowed but did because of a bug, ' 'support will be removed in a future release of Meson') |
