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:
Gustavo Jose de Sousa 2016-05-19 17:00:29 -03:00 committed by Lucas De Marchi
parent 83244dfe10
commit e630c2b33f
2 changed files with 6 additions and 2 deletions

View File

@ -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

View File

@ -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='''