Apply the default debug level dependend on the compiler
This commit is contained in:
parent
89fbbaca46
commit
266e319451
1 changed files with 10 additions and 5 deletions
15
wscript
15
wscript
|
@ -161,8 +161,13 @@ def configure (conf):
|
||||||
conf.write_config_header ('config.h')
|
conf.write_config_header ('config.h')
|
||||||
conf.env.append_value ('CCFLAGS', '-DHAVE_CONFIG_H')
|
conf.env.append_value ('CCFLAGS', '-DHAVE_CONFIG_H')
|
||||||
debug_level = Options.options.debug_level
|
debug_level = Options.options.debug_level
|
||||||
if debug_level != 'no':
|
compiler = conf.env['CC_NAME']
|
||||||
compiler = conf.env['CC_NAME']
|
if debug_level == '':
|
||||||
|
if compiler == 'gcc':
|
||||||
|
debug_level = 'debug'
|
||||||
|
else:
|
||||||
|
debug_level = 'none'
|
||||||
|
if debug_level != 'none':
|
||||||
if compiler == 'gcc':
|
if compiler == 'gcc':
|
||||||
if debug_level == 'debug':
|
if debug_level == 'debug':
|
||||||
conf.env.append_value ('CCFLAGS', '-Wall -O0 -g')
|
conf.env.append_value ('CCFLAGS', '-Wall -O0 -g')
|
||||||
|
@ -221,9 +226,9 @@ def set_options (opt):
|
||||||
|
|
||||||
opt.tool_options ('compiler_cc')
|
opt.tool_options ('compiler_cc')
|
||||||
opt.get_option_group ('--check-c-compiler').add_option('-d', '--debug-level',
|
opt.get_option_group ('--check-c-compiler').add_option('-d', '--debug-level',
|
||||||
action = 'store', default = 'debug',
|
action = 'store', default = '',
|
||||||
help = 'Specify the debugging level. [\'no\', \'debug\', \'full\']',
|
help = 'Specify the debugging level. [\'none\', \'debug\', \'full\']',
|
||||||
choices = ['no', 'debug', 'full'], dest = 'debug_level')
|
choices = ['', 'none', 'debug', 'full'], dest = 'debug_level')
|
||||||
opt.tool_options ('gnu_dirs')
|
opt.tool_options ('gnu_dirs')
|
||||||
opt.parser.remove_option ('--oldincludedir')
|
opt.parser.remove_option ('--oldincludedir')
|
||||||
opt.parser.remove_option ('--htmldir')
|
opt.parser.remove_option ('--htmldir')
|
||||||
|
|
Loading…
Reference in a new issue