aboutsummaryrefslogtreecommitdiffstats
path: root/waflib
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-09-15 08:40:53 +0200
committerDavid Robillard <d@drobilla.net>2018-09-15 08:40:53 +0200
commit7e02a0008d4299a19ea1d13a9c8e89c9fcebb74f (patch)
tree9430e72d158e077b0bbfb801e823a7405a828462 /waflib
parent0173f690d395aeaf57a1f62c827a3c21a08c9813 (diff)
downloadpugl-7e02a0008d4299a19ea1d13a9c8e89c9fcebb74f.tar.gz
pugl-7e02a0008d4299a19ea1d13a9c8e89c9fcebb74f.tar.bz2
pugl-7e02a0008d4299a19ea1d13a9c8e89c9fcebb74f.zip
Add autowaf.add_flags() for terse flag definition
Diffstat (limited to 'waflib')
-rw-r--r--waflib/extras/autowaf.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/waflib/extras/autowaf.py b/waflib/extras/autowaf.py
index 243ab05..57c0242 100644
--- a/waflib/extras/autowaf.py
+++ b/waflib/extras/autowaf.py
@@ -93,6 +93,11 @@ def set_options(opt, debug_by_default=False, test=False):
g_step = 1
+def add_flags(opt, flags):
+ for name, desc in flags.items():
+ opt.add_option('--' + name, action='store_true',
+ dest=name.replace('-', '_'), help=desc)
+
def get_check_func(conf, lang):
if lang == 'c':
return conf.check_cc