From dd1b7d0391ade4f07d66b67d108d0813fbc0f286 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 4 Oct 2015 19:28:50 +0000 Subject: Add option to avoid gcov git-svn-id: http://svn.drobilla.net/lad/trunk/sratom@5743 a436a847-0d15-0410-975c-d299462d15a1 --- wscript | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'wscript') diff --git a/wscript b/wscript index de28592..8fd2a5c 100644 --- a/wscript +++ b/wscript @@ -22,6 +22,8 @@ def options(opt): autowaf.set_options(opt) opt.add_option('--test', action='store_true', dest='build_tests', help="Build unit tests") + opt.add_option('--no-coverage', action='store_true', dest='no_coverage', + help='Do not use gcov for code coverage') opt.add_option('--static', action='store_true', dest='static', help="Build static library") opt.add_option('--no-shared', action='store_true', dest='no_shared', @@ -40,11 +42,8 @@ def configure(conf): if not conf.env.BUILD_SHARED and not conf.env.BUILD_STATIC: conf.fatal('Neither a shared nor a static build requested') - # Check for gcov library (for test coverage) - if conf.env.BUILD_TESTS: - conf.check_cc(lib='gcov', - define_name='HAVE_GCOV', - mandatory=False) + if conf.env.BUILD_TESTS and not Options.options.no_coverage: + conf.check_cc(lib='gcov', define_name='HAVE_GCOV', mandatory=False) autowaf.check_pkg(conf, 'lv2', uselib_store='LV2', atleast_version='1.8.1', mandatory=True) -- cgit v1.2.1