From 1e43910aa2e018a1819bcfef6916d5ce5e1e7276 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Thu, 27 Feb 2020 21:01:55 -0800 Subject: [PATCH] meson: Enable -Wno-deprecated only for bison > 2.3. Older versions of bison do not support the -W option. Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2571 Fixes: 11a1cb2fa8da ("meson: Disable bison's -Wdeprecated since we still support old bison.") Signed-off-by: Vinson Lee Reviewed-by: Erik Faye-Lund Tested-by: Marge Bot Part-of: --- meson.build | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index d69b17bb157..1484e7fec5d 100644 --- a/meson.build +++ b/meson.build @@ -1512,7 +1512,9 @@ else # Disable deprecated keyword warnings, since we have to use them for # old-bison compat. See discussion in # https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2161 - prog_bison = [prog_bison, '-Wno-deprecated'] + if meson.version().version_compare('>= 0.52.0') and find_program('bison', required : false, version : '> 2.3').found() + prog_bison = [prog_bison, '-Wno-deprecated'] + endif prog_flex = find_program('flex', required : with_any_opengl) endif -- 2.30.2