selftest/Samba4: make more use of get_cmd_env_vars()
[Samba.git] / lib / pthreadpool / wscript_build
blobe270f90333f0861f2965d09586b2bf7817c9a170
1 #!/usr/bin/env python
3 if bld.env.WITH_PTHREADPOOL:
4 extra_libs=''
6 # Link to librt if needed for clock_gettime()
7 if bld.CONFIG_SET('HAVE_LIBRT'): extra_libs += ' rt'
9 bld.SAMBA_SUBSYSTEM('PTHREADPOOL',
10 source='''pthreadpool.c
11 pthreadpool_pipe.c
12 pthreadpool_tevent.c
13 ''',
14 deps='pthread replace tevent-util' + extra_libs)
15 else:
16 bld.SAMBA_SUBSYSTEM('PTHREADPOOL',
17 source='''pthreadpool_sync.c
18 pthreadpool_pipe.c
19 pthreadpool_tevent.c
20 ''',
21 deps='replace tevent-util')
24 bld.SAMBA_BINARY('pthreadpooltest',
25 source='tests.c',
26 deps='PTHREADPOOL',
27 enabled=bld.env.WITH_PTHREADPOOL,
28 for_selftest=True)
30 bld.SAMBA_BINARY('pthreadpooltest_cmocka',
31 source='tests_cmocka.c',
32 deps='PTHREADPOOL cmocka',
33 ldflags='-Wl,--wrap=pthread_create',
34 enabled=bld.env.WITH_PTHREADPOOL and bld.env['HAVE_LDWRAP'],
35 for_selftest=True)