diff options
author | Stefan Metzmacher <metze@samba.org> | 2014-03-12 11:48:06 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2019-08-06 07:50:13 +0000 |
commit | bed7fc5a1b5fbea7664aced72dac08846cce6ebc (patch) | |
tree | 837db32710423622bea77e8044df92c7cf0aa1cc /buildtools | |
parent | 0df28b3d143db93971ea7c5253a9caf4a7a9d61e (diff) | |
download | samba-bed7fc5a1b5fbea7664aced72dac08846cce6ebc.tar.gz |
wafsamba: change --picky-developer into --disable-warnings-as-errors
By default we're using -Werror now if --enable-developer is
specified.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Aug 6 07:50:14 UTC 2019 on sn-devel-184
Diffstat (limited to 'buildtools')
-rw-r--r-- | buildtools/wafsamba/samba_autoconf.py | 6 | ||||
-rw-r--r-- | buildtools/wafsamba/wscript | 10 |
2 files changed, 6 insertions, 10 deletions
diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py index 8e5dfb87102..352b5ca31d3 100644 --- a/buildtools/wafsamba/samba_autoconf.py +++ b/buildtools/wafsamba/samba_autoconf.py @@ -783,9 +783,9 @@ int main(void) { conf.env['EXTRA_CFLAGS'] = [] conf.env['EXTRA_CFLAGS'].extend(TO_LIST("-Werror=format")) - if Options.options.picky_developer: - conf.ADD_NAMED_CFLAGS('PICKY_CFLAGS', '-Werror -Wno-error=deprecated-declarations', testflags=True) - conf.ADD_NAMED_CFLAGS('PICKY_CFLAGS', '-Wno-error=tautological-compare', testflags=True) + if not Options.options.disable_warnings_as_errors: + conf.ADD_NAMED_CFLAGS('PICKY_CFLAGS', '-Werror -Wno-error=deprecated-declarations', testflags=True) + conf.ADD_NAMED_CFLAGS('PICKY_CFLAGS', '-Wno-error=tautological-compare', testflags=True) if Options.options.fatal_errors: conf.ADD_CFLAGS('-Wfatal-errors', testflags=True) diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript index 8014716e64e..e5017a4a02f 100644 --- a/buildtools/wafsamba/wscript +++ b/buildtools/wafsamba/wscript @@ -102,17 +102,13 @@ def options(opt): gr.add_option('--enable-developer', help=("Turn on developer warnings and debugging"), action="store_true", dest='developer', default=False) + gr.add_option('--disable-warnings-as-errors', + help=("Do not treat all warnings as errors (disable -Werror)"), + action="store_true", dest='disable_warnings_as_errors', default=False) opt.add_option('--enable-coverage', help=("enable options necessary for code coverage " "reporting on selftest (default=no)"), action="store_true", dest='enable_coverage', default=False) - def picky_developer_callback(option, opt_str, value, parser): - parser.values.developer = True - parser.values.picky_developer = True - gr.add_option('--picky-developer', - help=("Treat all warnings as errors (enable -Werror)"), - action="callback", callback=picky_developer_callback, - dest='picky_developer', default=False) gr.add_option('--fatal-errors', help=("Stop compilation on first error (enable -Wfatal-errors)"), action="store_true", dest='fatal_errors', default=False) |