From ee3003e7dec88c8e8b66e9b61037cabcf9bece47 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 21 Jan 2023 19:33:27 +0200 Subject: [PATCH 42/42] Meson: Silence c99-extensions warnings from Qt on Msys2 / clang64 See osdn #46576 Signed-off-by: Marko Lindqvist --- meson.build | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/meson.build b/meson.build index 68994fbf6a..1767e0dc43 100644 --- a/meson.build +++ b/meson.build @@ -168,12 +168,23 @@ if host_system == 'windows' if min_win_ver != '' add_global_arguments('-D_WIN32_WINNT=' + min_win_ver, language: ['c', 'cpp']) - elif get_option('qtver') == 'qt6' and \ - ( get_option('ruledit') or \ - get_option('clients').contains('qt') or \ - get_option('fcmp').contains('qt')) - add_global_arguments('-D_WIN32_WINNT=0x0A00', language : ['c', 'cpp']) - else + endif + + if get_option('ruledit') or \ + get_option('clients').contains('qt') or \ + get_option('fcmp').contains('qt') + if get_option('debug') + # Qt headers have malformed macro definition triggering this error + add_global_arguments('-Wno-c99-extensions', language : ['c', 'cpp']) + endif + if min_win_ver == '' + if get_option('qtver') == 'qt6' + add_global_arguments('-D_WIN32_WINNT=0x0A00', language : ['c', 'cpp']) + else + add_global_arguments('-D_WIN32_WINNT=0x0603', language : ['c', 'cpp']) + endif + endif + elif min_win_ver == '' add_global_arguments('-D_WIN32_WINNT=0x0603', language : ['c', 'cpp']) endif -- 2.39.0