diff options
author | David Robillard <d@drobilla.net> | 2018-09-15 08:42:26 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2018-09-15 08:53:35 +0200 |
commit | 444365a7437ac61f5be47d305f202e9d2c0f6446 (patch) | |
tree | f437f3c252fbeb5236f1612f553d709e81d49711 /waflib/extras | |
parent | efe1b5a266a65f84f1656e464b20e31cca3db467 (diff) | |
download | pugl-444365a7437ac61f5be47d305f202e9d2c0f6446.tar.gz pugl-444365a7437ac61f5be47d305f202e9d2c0f6446.tar.bz2 pugl-444365a7437ac61f5be47d305f202e9d2c0f6446.zip |
Add msgs argument to autowaf.display_summary() and show flags
Diffstat (limited to 'waflib/extras')
-rw-r--r-- | waflib/extras/autowaf.py | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/waflib/extras/autowaf.py b/waflib/extras/autowaf.py index 40d2373..6b8385e 100644 --- a/waflib/extras/autowaf.py +++ b/waflib/extras/autowaf.py @@ -308,14 +308,23 @@ def configure(conf): conf.env.prepend_value('CXXFLAGS', '-I' + os.path.abspath('.')) g_step = 2 -def display_summary(conf): +def display_summary(conf, msgs=None): global g_is_child Logs.pprint('', '') if not g_is_child: display_msg(conf, "Install prefix", conf.env['PREFIX']) - display_msg(conf, "Debuggable build", bool(conf.env['DEBUG'])) + if 'COMPILER_CC' in conf.env: + display_msg(conf, "C Flags", ' '.join(conf.env['CFLAGS'])) + if 'COMPILER_CXX' in conf.env: + display_msg(conf, "C++ Flags", ' '.join(conf.env['CXXFLAGS'])) + display_msg(conf, "Debuggable", bool(conf.env['DEBUG'])) display_msg(conf, "Build documentation", bool(conf.env['DOCS'])) + if msgs is not None: + display_msgs(conf, msgs) + + Logs.pprint('', '') + def set_c_lang(conf, lang): "Set a specific C language standard, like 'c99' or 'c11'" if conf.env.MSVC_COMPILER: @@ -445,6 +454,10 @@ def display_msg(conf, msg, status = None, color = None): Logs.pprint('NORMAL', ":", sep='') Logs.pprint(color, status) +def display_msgs(conf, msgs): + for k, v in msgs.items(): + display_msg(conf, k, v) + def link_flags(env, lib): return ' '.join(map(lambda x: env['LIB_ST'] % x, env['LIB_' + lib])) |