mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-28 19:48:31 -04:00
waf: create taskgen for gtest in _build_common_taskgens
So that it belongs to 'build' group.
This commit is contained in:
parent
264c3e2d28
commit
fdc87df074
@ -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)
|
||||
|
3
wscript
3
wscript
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user