diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-07-24 15:52:06 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-07-28 19:51:58 +0200 |
commit | 3dea817a597e4d2f10bfe3c1e006a0983555ad15 (patch) | |
tree | 55628052b6a5deeebc565a7f1b89cb2b86d3220c /mesonbuild/interpreter.py | |
parent | 18aff92d7a9f110cc3c790c61c2ced85b8d81a26 (diff) | |
download | meson-3dea817a597e4d2f10bfe3c1e006a0983555ad15.zip meson-3dea817a597e4d2f10bfe3c1e006a0983555ad15.tar.gz meson-3dea817a597e4d2f10bfe3c1e006a0983555ad15.tar.bz2 |
Only emit warning about "native:" on projects with minimum required version
'native:' keyword was only added in 0.54. For projects declaring
meson_version >= 0.54, warn, because those projects can and should set
the keyword. For older projects declaring support for older versions,
don't warn and use the default implicitly.
Fixes https://github.com/mesonbuild/meson/issues/6849.
Diffstat (limited to 'mesonbuild/interpreter.py')
-rw-r--r-- | mesonbuild/interpreter.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py index df81569..45813c1 100644 --- a/mesonbuild/interpreter.py +++ b/mesonbuild/interpreter.py @@ -3122,8 +3122,11 @@ external dependencies (including libraries) must go to "dependencies".''') return self.add_languages(args, required, self.machine_from_native_kwarg(kwargs)) else: # absent 'native' means 'both' for backwards compatibility - mlog.warning('add_languages is missing native:, assuming languages are wanted for both host and build.', - location=self.current_node) + tv = FeatureNew.get_target_version(self.subproject) + if FeatureNew.check_version(tv, '0.54.0'): + mlog.warning('add_languages is missing native:, assuming languages are wanted for both host and build.', + location=self.current_node) + success = self.add_languages(args, False, MachineChoice.BUILD) success &= self.add_languages(args, required, MachineChoice.HOST) return success |