mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-29 20:18: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
|
gtest is a Waf tool for test builds in Ardupilot
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
from waflib.Configure import conf
|
||||||
|
|
||||||
def configure(cfg):
|
def configure(cfg):
|
||||||
cfg.env.HAS_GTEST = False
|
cfg.env.HAS_GTEST = False
|
||||||
|
|
||||||
@ -27,11 +29,13 @@ def configure(cfg):
|
|||||||
|
|
||||||
cfg.env.HAS_GTEST = True
|
cfg.env.HAS_GTEST = True
|
||||||
|
|
||||||
def build(bld):
|
@conf
|
||||||
bld.stlib(
|
def libgtest(bld, **kw):
|
||||||
|
kw.update(
|
||||||
source='modules/gtest/src/gtest-all.cc',
|
source='modules/gtest/src/gtest-all.cc',
|
||||||
target='gtest/gtest',
|
target='gtest/gtest',
|
||||||
includes='modules/gtest/ modules/gtest/include',
|
includes='modules/gtest/ modules/gtest/include',
|
||||||
export_includes='modules/gtest/include',
|
export_includes='modules/gtest/include',
|
||||||
name='GTEST',
|
name='GTEST',
|
||||||
)
|
)
|
||||||
|
return bld.stlib(**kw)
|
||||||
|
3
wscript
3
wscript
@ -155,6 +155,8 @@ def _build_common_taskgens(bld):
|
|||||||
use='mavlink',
|
use='mavlink',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
bld.libgtest()
|
||||||
|
|
||||||
def _build_recursion(bld):
|
def _build_recursion(bld):
|
||||||
common_dirs_patterns = [
|
common_dirs_patterns = [
|
||||||
# TODO: Currently each vehicle also generate its own copy of the
|
# 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.post_mode = Build.POST_LAZY
|
||||||
|
|
||||||
bld.load('ardupilotwaf')
|
bld.load('ardupilotwaf')
|
||||||
bld.load('gtest')
|
|
||||||
|
|
||||||
_build_cmd_tweaks(bld)
|
_build_cmd_tweaks(bld)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user