From 8ad1fef18a1573bd8f8818a20b3c8d4708b42cc3 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 15 Jul 2020 17:24:49 +0200 Subject: Be explicit about warnings --- wscript | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) (limited to 'wscript') diff --git a/wscript b/wscript index 0fb3e94..6b40563 100644 --- a/wscript +++ b/wscript @@ -113,6 +113,64 @@ def configure(conf): if not conf.env.BUILD_SHARED and not conf.env.BUILD_STATIC: conf.fatal('Neither a shared nor a static build requested') + if Options.options.ultra_strict: + autowaf.add_compiler_flags(conf.env, '*', { + 'clang': [ + '-Wno-documentation-unknown-command', + ] + }) + + autowaf.add_compiler_flags(conf.env, 'c', { + 'clang': [ + '-Wno-cast-align', + '-Wno-cast-qual', + '-Wno-double-promotion', + '-Wno-float-equal', + '-Wno-format-nonliteral', + '-Wno-implicit-float-conversion', + '-Wno-implicit-int-conversion', + '-Wno-padded', + '-Wno-reserved-id-macro', + '-Wno-shorten-64-to-32', + '-Wno-sign-conversion', + '-Wno-switch-enum', + '-Wno-unused-parameter', + '-Wno-vla', + ], + 'gcc': [ + '-Wno-cast-align', + '-Wno-cast-qual', + '-Wno-conversion', + '-Wno-double-promotion', + '-Wno-float-equal', + '-Wno-padded', + '-Wno-stack-protector', + '-Wno-switch-enum', + '-Wno-unused-parameter', + '-Wno-vla', + ], + 'msvc': [ + '/wd4061', # enumerator in switch is not explicitly handled + '/wd4365', # signed/unsigned mismatch + '/wd4514', # unreferenced inline function has been removed + '/wd4774', # format string is not a string literal + '/wd4820', # padding added after construct + '/wd4996', # POSIX name for this item is deprecated + ], + }) + + autowaf.add_compiler_flags(conf.env, 'cxx', { + 'clang': [ + '-Wno-extra-semi', + '-Wno-zero-as-null-pointer-constant', + ], + 'gcc': [ + '-Wno-effc++', + '-Wno-extra-semi', + '-Wno-pedantic', + ], + }) + conf.check_pkg('lv2 >= 1.18.0', uselib_store='LV2') conf.check_pkg('serd-0 >= 0.30.0', uselib_store='SERD') conf.check_pkg('sord-0 >= 0.14.0', uselib_store='SORD') -- cgit v1.2.1