From: Daniel P. Berrangé Date: Thu, 8 Apr 2021 10:50:30 +0000 (+0100) Subject: meson: don't probe for -Werror if --werror is enabled X-Git-Tag: v7.3.0-rc1~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c3c55be66e230ef09ad927eda038dc32f01a166;p=thirdparty%2Flibvirt.git meson: don't probe for -Werror if --werror is enabled 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é --- 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,