ref: 445e60f592a50000ecaed674ce2d992f43e0d22b
parent: 917adb044bc6a1a63e6f79db81aae4ba50e89775
author: Paul Brossier <piem@piem.org>
date: Fri Sep 21 13:30:21 EDT 2018
wscript: add options to disable examples and tests
--- a/wscript
+++ b/wscript
@@ -97,6 +97,14 @@
help_str = 'build documentation (auto)',
help_disable_str = 'do not build documentation')
+ add_option_enable_disable(ctx, 'tests', default = True,
+ help_str = 'build tests (true)',
+ help_disable_str = 'do not build or run tests')
+
+ add_option_enable_disable(ctx, 'examples', default = True,
+ help_str = 'build examples (true)',
+ help_disable_str = 'do not build examples')
+
ctx.add_option('--with-target-platform', type='string',
help='set target platform for cross-compilation', dest='target_platform')
@@ -473,8 +481,10 @@
if bld.env['DEST_OS'] not in ['ios', 'iosimulator', 'android']:
if bld.env['DEST_OS']=='emscripten' and not bld.options.testcmd:
bld.options.testcmd = 'node %s'
- bld.recurse('examples')
- bld.recurse('tests')
+ if bld.options.enable_examples:
+ bld.recurse('examples')
+ if bld.options.enable_tests:
+ bld.recurse('tests')
# pkg-config template
bld( source = 'aubio.pc.in' )