From d3fb7349884a2de4cdaaeee0bd01fd67349d5fd3 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 4 Oct 2015 13:19:14 -0400 Subject: Add option to avoid the use of gcov --- wscript | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'wscript') diff --git a/wscript b/wscript index f6ee320..8da1c5a 100644 --- a/wscript +++ b/wscript @@ -27,6 +27,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('--online-docs', action='store_true', dest='online_docs', help='Build documentation for web hosting') opt.add_option('--no-plugins', action='store_true', dest='no_plugins', @@ -69,7 +71,9 @@ def configure(conf): Logs.warn('Asciidoc not found, book will not be built') # Check for gcov library (for test coverage) - if conf.env.BUILD_TESTS and not conf.is_defined('HAVE_GCOV'): + if (conf.env.BUILD_TESTS + and not Options.options.no_coverage + and not conf.is_defined('HAVE_GCOV')): conf.check_cc(lib='gcov', define_name='HAVE_GCOV', mandatory=False) autowaf.set_recursive() -- cgit v1.2.1