From bb46a010bbe9f703ff9d48e450dbd6529906b8e9 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Tue, 10 Nov 2020 18:17:57 -0800 Subject: [PATCH] meson: Fix Clang microsoft-enum-value detection. Fixes: 3aee462781a ("meson: add windows compiler checks and libraries") Signed-off-by: Vinson Lee Reviewed-by: Dylan Baker Part-of: --- meson.build | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 015bc9745739..f87ec1495a9d 100644 --- a/meson.build +++ b/meson.build @@ -1030,10 +1030,6 @@ if cc.get_id() == 'msvc' cpp_args += a endif endforeach - if cc.has_argument('-Wmicrosoft-enum-value') # Clang - c_args += '-Wno-microsoft-enum-value' - cpp_args += '-Wno-microsoft-enum-value' - endif else _trial = [ '-Werror=implicit-function-declaration', @@ -1102,6 +1098,11 @@ else cpp_msvc_compat_args += a endif endforeach + + if cc.has_argument('-Wmicrosoft-enum-value') # Clang + c_args += '-Wno-microsoft-enum-value' + cpp_args += '-Wno-microsoft-enum-value' + endif endif # set linker arguments -- GitLab