Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / libc / test / src / time / CMakeLists.txt
blob10b63ce6f39d295d71264f9ff5064539c120fc4a
1 add_custom_target(libc_time_unittests)
3 add_libc_unittest(
4   asctime_test
5   SUITE
6     libc_time_unittests
7   SRCS
8     asctime_test.cpp
9   HDRS
10     TmHelper.h
11     TmMatcher.h
12   CXX_STANDARD
13     20
14   DEPENDS
15     libc.src.time.asctime
18 add_libc_unittest(
19   asctime_r_test
20   SUITE
21     libc_time_unittests
22   SRCS
23     asctime_r_test.cpp
24   HDRS
25     TmHelper.h
26     TmMatcher.h
27   CXX_STANDARD
28     20
29   DEPENDS
30     libc.src.time.asctime_r
33 add_libc_unittest(
34   clock_gettime_test
35   SUITE
36     libc_time_unittests
37   SRCS
38   clock_gettime_test.cpp
39   DEPENDS
40     libc.src.time.clock_gettime
43 add_libc_unittest(
44   difftime_test
45   SUITE
46     libc_time_unittests
47   SRCS
48     difftime_test.cpp
49   DEPENDS
50     libc.src.time.difftime
53 add_libc_unittest(
54   gettimeofday_test
55   SUITE
56     libc_time_unittests
57   SRCS
58     gettimeofday_test.cpp
59   DEPENDS
60     libc.include.time
61     libc.src.time.gettimeofday
64 add_libc_unittest(
65   gmtime_test
66   SUITE
67     libc_time_unittests
68   SRCS
69     gmtime_test.cpp
70   HDRS
71     TmMatcher.h
72   DEPENDS
73     libc.src.time.gmtime
76 add_libc_unittest(
77   gmtime_r_test
78   SUITE
79     libc_time_unittests
80   SRCS
81     gmtime_r_test.cpp
82   HDRS
83     TmMatcher.h
84   DEPENDS
85     libc.src.time.gmtime_r
88 add_libc_unittest(
89   mktime_test
90   SUITE
91     libc_time_unittests
92   SRCS
93     mktime_test.cpp
94   HDRS
95     TmHelper.h
96     TmMatcher.h
97   CXX_STANDARD
98     20
99   DEPENDS
100     libc.src.time.mktime
103 # Sleeping is not supported on older NVPTX architectures.
104 set(unsupported_architectures "sm_35;sm_37;sm_50;sm_52;sm_53;sm_60;sm_61;sm_62")
105 if (NOT ("${LIBC_GPU_TARGET_ARCHITECTURE}" IN_LIST unsupported_architectures))
106   add_libc_test(
107     nanosleep_test
108     SUITE
109       libc_time_unittests
110     SRCS
111       nanosleep_test.cpp
112     DEPENDS
113       libc.include.time
114       libc.src.time.nanosleep
115       libc.src.errno.errno
116   )
117 endif()
119 add_libc_unittest(
120   time_test
121   SUITE
122     libc_time_unittests
123   SRCS
124     time_test.cpp
125   DEPENDS
126     libc.include.time
127     libc.src.time.time
128     libc.src.errno.errno
131 add_libc_test(
132   clock_test
133   SUITE
134     libc_time_unittests
135   SRCS
136     clock_test.cpp
137   DEPENDS
138     libc.include.time
139     libc.src.time.clock
140     libc.src.errno.errno