1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00
samba-mirror/third_party/cmocka/wscript
Andreas Schneider 740a217264 third_party:cmocka: Fix build when used in lib/tevent
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2021-07-07 05:07:30 +00:00

27 lines
679 B
Python

#!/usr/bin/env python
from waflib import Options
def configure(conf):
conf.CHECK_FUNCS('strsignal')
conf.CHECK_FUNCS('longjmp siglongjmp')
if conf.CHECK_CMOCKA():
conf.define('USING_SYSTEM_CMOCKA', 1)
def build(bld):
if bld.CONFIG_SET('USING_SYSTEM_CMOCKA'):
return
extra_libs=''
# Link to librt if needed for clock_gettime()
if bld.CONFIG_SET('HAVE_LIBRT'): extra_libs += ' rt'
bld.SAMBA_LIBRARY('cmocka',
source='cmocka.c',
cflags='-DHAVE_CONFIG_H=1',
deps=extra_libs,
allow_warnings=True,
private_library=True)