meson: Fix Clang microsoft-enum-value detection.
Fixes: 3aee462781a ("meson: add windows compiler checks and libraries")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7543>
(cherry picked from commit bb46a010bbe9f703ff9d48e450dbd6529906b8e9)
diff --git a/meson.build b/meson.build
index b0107a2..c2843a3 100644
--- a/meson.build
+++ b/meson.build
@@ -1002,10 +1002,6 @@
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',
@@ -1074,6 +1070,11 @@
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