You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
766 B
Python
25 lines
766 B
Python
# -*- mode: python -*-
|
|
|
|
from waflib import Context
|
|
libshit_cross = getattr(Context.g_module, 'LIBSHIT_CROSS', False)
|
|
|
|
def options(ctx):
|
|
ctx.system_opt('doctest', cross=libshit_cross)
|
|
|
|
def configure(ctx):
|
|
def system_doctest(ctx):
|
|
ctx.check_cxx(header_name='doctest.h', uselib_store='DOCTEST',
|
|
define_name='')
|
|
def doctest_post(ctx):
|
|
if ctx.env.WITH_TESTS: # will be false with host variant
|
|
defs = ['LIBSHIT_WITH_TESTS=1']
|
|
else:
|
|
defs = ['LIBSHIT_WITH_TESTS=0']
|
|
ctx.env.append_value('DEFINES_DOCTEST', defs)
|
|
ctx.with_chk(
|
|
'doctest', {'system': system_doctest, 'bundle': 'doctest/doctest'},
|
|
cross=libshit_cross, post_chk=doctest_post)
|
|
|
|
def build(ctx):
|
|
pass
|