From 3c3c55be66e230ef09ad927eda038dc32f01a166 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Thu, 8 Apr 2021 11:50:30 +0100 Subject: [PATCH] meson: don't probe for -Werror if --werror is enabled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Meson has its own mechanism to turn on -Werror with the --werror option. If this is set, then there is no reason for libvirt to check for -Werror itself. We remove the summary line output because it is potentially misleading when libvirt hasn't enabled -Werror, but meson has. Reviewed-by: Pavel Hrdina Signed-off-by: Daniel P. Berrangé --- meson.build | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 88ab723922..951da67896 100644 --- a/meson.build +++ b/meson.build @@ -207,7 +207,7 @@ cc = meson.get_compiler('c') cc_flags = [] git_werror = get_option('git_werror') -if git_werror.enabled() or git_werror.auto() and git +if (git_werror.enabled() or git_werror.auto()) and git and not get_option('werror') cc_flags += [ '-Werror' ] endif @@ -2269,7 +2269,6 @@ else loader_res = '' endif misc_summary = { - 'Use -Werror': cc_flags.contains('-Werror'), 'Warning Flags': supported_cc_flags, 'docs': gen_docs, 'tests': build_tests,