xref: /llvm-project/libc/test/src/pthread/CMakeLists.txt (revision 46944b0cbc9a9d8daad0182c40fcd3560bc9ca35)
1add_custom_target(libc_pthread_unittests)
2
3add_libc_unittest(
4  pthread_attr_test
5  SUITE
6    libc_pthread_unittests
7  SRCS
8    pthread_attr_test.cpp
9  DEPENDS
10    libc.include.pthread
11    libc.src.pthread.pthread_attr_destroy
12    libc.src.pthread.pthread_attr_init
13    libc.src.pthread.pthread_attr_getdetachstate
14    libc.src.pthread.pthread_attr_getguardsize
15    libc.src.pthread.pthread_attr_getstacksize
16    libc.src.pthread.pthread_attr_getstack
17    libc.src.pthread.pthread_attr_setdetachstate
18    libc.src.pthread.pthread_attr_setguardsize
19    libc.src.pthread.pthread_attr_setstacksize
20    libc.src.pthread.pthread_attr_setstack
21    libc.hdr.errno_macros
22)
23
24add_libc_unittest(
25  pthread_mutexattr_test
26  SUITE
27    libc_pthread_unittests
28  SRCS
29    pthread_mutexattr_test.cpp
30  DEPENDS
31    libc.include.pthread
32    libc.src.pthread.pthread_mutexattr_destroy
33    libc.src.pthread.pthread_mutexattr_init
34    libc.src.pthread.pthread_mutexattr_getpshared
35    libc.src.pthread.pthread_mutexattr_getrobust
36    libc.src.pthread.pthread_mutexattr_gettype
37    libc.src.pthread.pthread_mutexattr_setpshared
38    libc.src.pthread.pthread_mutexattr_setrobust
39    libc.src.pthread.pthread_mutexattr_settype
40    libc.hdr.errno_macros
41)
42
43add_libc_unittest(
44  pthread_condattr_test
45  SUITE
46    libc_pthread_unittests
47  SRCS
48    pthread_condattr_test.cpp
49  DEPENDS
50    libc.include.llvm-libc-macros.generic_error_number_macros
51    libc.include.llvm-libc-macros.time_macros
52    libc.include.pthread
53    libc.src.pthread.pthread_condattr_destroy
54    libc.src.pthread.pthread_condattr_getclock
55    libc.src.pthread.pthread_condattr_getpshared
56    libc.src.pthread.pthread_condattr_init
57    libc.src.pthread.pthread_condattr_setclock
58    libc.src.pthread.pthread_condattr_setpshared
59)
60
61add_libc_unittest(
62  pthread_rwlockattr_test
63  SUITE
64    libc_pthread_unittests
65  SRCS
66    pthread_rwlockattr_test.cpp
67  DEPENDS
68    libc.include.pthread
69    libc.src.errno.errno
70    libc.src.pthread.pthread_rwlockattr_destroy
71    libc.src.pthread.pthread_rwlockattr_getkind_np
72    libc.src.pthread.pthread_rwlockattr_getpshared
73    libc.src.pthread.pthread_rwlockattr_init
74    libc.src.pthread.pthread_rwlockattr_setkind_np
75    libc.src.pthread.pthread_rwlockattr_setpshared
76)
77