[PATCH] meson: add option to disable selective werror
Marty E. Plummer
hanetzer at startmail.com
Thu Aug 9 17:37:02 UTC 2018
Signed-off-by: Marty E. Plummer <hanetzer at startmail.com>
---
meson.build | 12 +++++++-----
meson_options.txt | 2 ++
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/meson.build b/meson.build
index cd1e4a58c..b2c46f730 100644
--- a/meson.build
+++ b/meson.build
@@ -50,11 +50,13 @@ else
endif
common_wflags = []
-foreach wflag: test_wflags
- if cc.has_argument(wflag)
- common_wflags += [ wflag ]
- endif
-endforeach
+if get_option('selective-werror')
+ foreach wflag: test_wflags
+ if cc.has_argument(wflag)
+ common_wflags += [ wflag ]
+ endif
+ endforeach
+endif
add_global_arguments(common_wflags, language : 'c')
diff --git a/meson_options.txt b/meson_options.txt
index 3453b8df5..c7f299a4a 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -16,6 +16,8 @@ option('xvfb', type: 'boolean', value: true,
description: 'Enable Xvfb X server')
option('xwin', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto',
description: 'Enable XWin X server')
+option('selective-werror', type: 'boolean', value true,
+ description: 'Enable selective werror')
option('builder_addr', type: 'string', description: 'Builder address', value: 'xorg at lists.freedesktop.org')
option('builder_string', type: 'string', description: 'Additional builder string')
--
2.18.0
More information about the xorg-devel
mailing list