diff --git a/wscript b/wscript index 044e4e9923..28e331e022 100644 --- a/wscript +++ b/wscript @@ -80,6 +80,7 @@ def configure(cfg): cfg.load('waf_unit_test') cfg.load('mavgen') cfg.load('gbenchmark') + cfg.load('gtest') cfg.load('static_linking') cfg.start_msg('Benchmarks') @@ -88,12 +89,11 @@ def configure(cfg): else: cfg.end_msg('disabled', color='YELLOW') - cfg.env.HAS_GTEST = cfg.check_cxx( - lib='gtest', - mandatory=False, - uselib_store='GTEST', - errmsg='not found, unit tests disabled', - ) + cfg.start_msg('Unit tests') + if cfg.env.HAS_GTEST: + cfg.end_msg('enabled') + else: + cfg.end_msg('disabled', color='YELLOW') cfg.env.prepend_value('INCLUDES', [ cfg.srcnode.abspath() + '/libraries/', @@ -117,6 +117,7 @@ def list_boards(ctx): print(*boards.get_boards_names()) def build(bld): + bld.load('gtest') #generate mavlink headers bld(