waf: create taskgen for gtest in _build_common_taskgens

So that it belongs to 'build' group.
This commit is contained in:
Gustavo Jose de Sousa 2016-02-05 12:59:13 +00:00 committed by Lucas De Marchi
parent 264c3e2d28
commit fdc87df074
2 changed files with 8 additions and 3 deletions

View File

@ -5,6 +5,8 @@
gtest is a Waf tool for test builds in Ardupilot
"""
from waflib.Configure import conf
def configure(cfg):
cfg.env.HAS_GTEST = False
@ -27,11 +29,13 @@ def configure(cfg):
cfg.env.HAS_GTEST = True
def build(bld):
bld.stlib(
@conf
def libgtest(bld, **kw):
kw.update(
source='modules/gtest/src/gtest-all.cc',
target='gtest/gtest',
includes='modules/gtest/ modules/gtest/include',
export_includes='modules/gtest/include',
name='GTEST',
)
return bld.stlib(**kw)

View File

@ -155,6 +155,8 @@ def _build_common_taskgens(bld):
use='mavlink',
)
bld.libgtest()
def _build_recursion(bld):
common_dirs_patterns = [
# TODO: Currently each vehicle also generate its own copy of the
@ -203,7 +205,6 @@ def build(bld):
bld.post_mode = Build.POST_LAZY
bld.load('ardupilotwaf')
bld.load('gtest')
_build_cmd_tweaks(bld)