[libvirt PATCH 6/6] meson: don't probe for -Werror if -Dwerror is enabled
Daniel P. Berrangé
berrange at redhat.com
Thu Apr 8 10:58:23 UTC 2021
Meson has its own mechanism to turn on -Werror with the -Dwerror 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.
Signed-off-by: Daniel P. Berrangé <berrange at redhat.com>
---
meson.build | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/meson.build b/meson.build
index 9fda0c7948..725d0e1cf0 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
@@ -2300,7 +2300,6 @@ else
loader_res = ''
endif
misc_summary = {
- 'Use -Werror': cc_flags.contains('-Werror'),
'Warning Flags': supported_cc_flags,
'docs': gen_docs,
'tests': build_tests,
--
2.30.2
More information about the libvir-list
mailing list