From 2939ab8ea47a3a0c3f662e0b9fc73939ee9639dc Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Mon, 6 Sep 2021 00:04:27 +0300 Subject: [PATCH] wscript: allow compiling with disabled warning-as-error --- wscript | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wscript b/wscript index 0ac7fa96..14f63052 100644 --- a/wscript +++ b/wscript @@ -90,6 +90,9 @@ def options(opt): grp.add_option('--ignore-projects', action = 'store', dest = 'IGNORE_PROJECTS', default = None, help = 'disable selected projects from build [default: %default]') + grp.add_option('--disable-werror', action = 'store_true', dest = 'DISABLE_WERROR', default = False, + help = 'disable compilation abort on warning') + grp = opt.add_option_group('Utilities options') grp.add_option('--enable-utils', action = 'store_true', dest = 'ENABLE_UTILS', default = False, @@ -217,7 +220,7 @@ def configure(conf): # And here C++ flags starts to be treated separately cxxflags = list(cflags) - if conf.env.COMPILER_CC != 'msvc': + if conf.env.COMPILER_CC != 'msvc' and not conf.options.DISABLE_WERROR: conf.check_cc(cflags=cflags, linkflags=linkflags, msg='Checking for required C flags') conf.check_cxx(cxxflags=cflags, linkflags=linkflags, msg='Checking for required C++ flags')