summaryrefslogtreecommitdiffstats
path: root/third_party/cmocka/wscript
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--third_party/cmocka/wscript26
1 files changed, 26 insertions, 0 deletions
diff --git a/third_party/cmocka/wscript b/third_party/cmocka/wscript
new file mode 100644
index 0000000..ebac963
--- /dev/null
+++ b/third_party/cmocka/wscript
@@ -0,0 +1,26 @@
+#!/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)