]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
meson: don't probe for -Werror if --werror is enabled
authorDaniel P. Berrangé <berrange@redhat.com>
Thu, 8 Apr 2021 10:50:30 +0000 (11:50 +0100)
committerDaniel P. Berrangé <berrange@redhat.com>
Fri, 23 Apr 2021 15:13:56 +0000 (16:13 +0100)
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 <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
meson.build

index 88ab72392261f5bb7718ae20baac263127d87419..951da67896da66bfcf2e0ad64c51a8957541c01a 100644 (file)
@@ -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,