Browse Source

waf: create taskgen for gtest in _build_common_taskgens

So that it belongs to 'build' group.
master
Gustavo Jose de Sousa 9 years ago committed by Lucas De Marchi
parent
commit
fdc87df074
  1. 8
      Tools/ardupilotwaf/gtest.py
  2. 3
      wscript

8
Tools/ardupilotwaf/gtest.py

@ -5,6 +5,8 @@ @@ -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): @@ -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)

3
wscript

@ -155,6 +155,8 @@ def _build_common_taskgens(bld): @@ -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): @@ -203,7 +205,6 @@ def build(bld):
bld.post_mode = Build.POST_LAZY
bld.load('ardupilotwaf')
bld.load('gtest')
_build_cmd_tweaks(bld)

Loading…
Cancel
Save