mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-21 23:33:57 -04:00
waf: cxx_checks: define ap_common_checks() instead of configure()
That allow loading the cxx_checks tool before the calls to configure_env(). That way, we can add check functions to be used across boards.
This commit is contained in:
parent
83244dfe10
commit
e630c2b33f
@ -31,6 +31,7 @@ class Board:
|
||||
def configure(self, cfg):
|
||||
cfg.env.TOOLCHAIN = self.toolchain
|
||||
cfg.load('toolchain')
|
||||
cfg.load('cxx_checks')
|
||||
|
||||
env = waflib.ConfigSet.ConfigSet()
|
||||
self.configure_env(cfg, env)
|
||||
@ -52,7 +53,7 @@ class Board:
|
||||
else:
|
||||
cfg.env[k] = val
|
||||
|
||||
cfg.load('cxx_checks')
|
||||
cfg.ap_common_checks()
|
||||
|
||||
def configure_env(self, cfg, env):
|
||||
# Use a dictionary instead of the convetional list for definitions to
|
||||
|
@ -24,7 +24,10 @@ Example::
|
||||
cfg.load('cxx_checks')
|
||||
"""
|
||||
|
||||
def configure(cfg):
|
||||
from waflib.Configure import conf
|
||||
|
||||
@conf
|
||||
def ap_common_checks(cfg):
|
||||
cfg.check(
|
||||
compiler='cxx',
|
||||
fragment='''
|
||||
|
Loading…
Reference in New Issue
Block a user