1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-06 13:18:07 +03:00
samba-mirror/third_party/cmocka/wscript
Andreas Schneider 36e8d715bc third_party: Only link cmocka against librt if really needed
cmocka also uses clock_gettime().

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14140

Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Isaac Boukris <iboukris@gmail.com>
Pair-Programmed-With: Isaac Boukris <iboukris@gmail.com>
Reviewed-by: Matthias Dieter Wallnöfer <mdw@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2019-09-25 15:39:40 +00:00

25 lines
595 B
Python

#!/usr/bin/env python
from waflib import Options
def configure(conf):
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',
deps=extra_libs,
allow_warnings=True,
private_library=True)