Browse Source

wscript: allow compiling with disabled warning-as-error

pull/2/head
Alibek Omarov 3 years ago
parent
commit
2939ab8ea4
  1. 5
      wscript

5
wscript

@ -90,6 +90,9 @@ def options(opt):
grp.add_option('--ignore-projects', action = 'store', dest = 'IGNORE_PROJECTS', default = None, grp.add_option('--ignore-projects', action = 'store', dest = 'IGNORE_PROJECTS', default = None,
help = 'disable selected projects from build [default: %default]') 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 = opt.add_option_group('Utilities options')
grp.add_option('--enable-utils', action = 'store_true', dest = 'ENABLE_UTILS', default = False, 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 # And here C++ flags starts to be treated separately
cxxflags = list(cflags) 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_cc(cflags=cflags, linkflags=linkflags, msg='Checking for required C flags')
conf.check_cxx(cxxflags=cflags, linkflags=linkflags, msg='Checking for required C++ flags') conf.check_cxx(cxxflags=cflags, linkflags=linkflags, msg='Checking for required C++ flags')

Loading…
Cancel
Save