[libc++][Android] Allow testing libc++ with clang-r536225 (#116149)
[llvm-project.git] / libc / src / time / CMakeLists.txt
blobb3318e7ca87fa53847c392a5e75b67103f8c95b9
1 if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${LIBC_TARGET_OS})
2   add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/${LIBC_TARGET_OS})
3 endif()
5 add_object_library(
6   time_utils
7   SRCS
8     time_utils.cpp
9   HDRS
10     time_utils.h
11   DEPENDS
12     libc.include.time
13     libc.src.__support.CPP.limits
14     libc.src.errno.errno
17 add_entrypoint_object(
18   asctime
19   SRCS
20     asctime.cpp
21   HDRS
22     asctime.h
23   DEPENDS
24     .time_utils
25     libc.include.time
28 add_entrypoint_object(
29   asctime_r
30   SRCS
31     asctime_r.cpp
32   HDRS
33     asctime_r.h
34   DEPENDS
35     .time_utils
36     libc.include.time
39 add_entrypoint_object(
40   ctime
41   SRCS
42     ctime.cpp
43   HDRS
44     ctime.h
45   DEPENDS
46     .time_utils
47     libc.hdr.types.time_t
48     libc.include.time
51 add_entrypoint_object(
52   ctime_r
53   SRCS
54     ctime_r.cpp
55   HDRS
56     ctime_r.h
57   DEPENDS
58     .time_utils
59     libc.hdr.types.time_t
60     libc.include.time
63 add_entrypoint_object(
64   difftime
65   SRCS
66     difftime.cpp
67   HDRS
68     difftime.h
69   DEPENDS
70     libc.include.time
73 add_entrypoint_object(
74   gmtime
75   SRCS
76     gmtime.cpp
77   HDRS
78     gmtime.h
79   DEPENDS
80     .time_utils
81     libc.include.time
84 add_entrypoint_object(
85   gmtime_r
86   SRCS
87     gmtime_r.cpp
88   HDRS
89     gmtime_r.h
90   DEPENDS
91     .time_utils
92     libc.include.time
95 add_entrypoint_object(
96   mktime
97   SRCS
98     mktime.cpp
99   HDRS
100     mktime.h
101   DEPENDS
102     .time_utils
103     libc.include.time
104     libc.src.errno.errno
107 add_entrypoint_object(
108   time
109   ALIAS
110   DEPENDS
111     .${LIBC_TARGET_OS}.time
114 add_entrypoint_object(
115   clock
116   ALIAS
117   DEPENDS
118     .${LIBC_TARGET_OS}.clock
121 add_entrypoint_object(
122   nanosleep
123   ALIAS
124   DEPENDS
125     .${LIBC_TARGET_OS}.nanosleep
128 add_entrypoint_object(
129   clock_gettime
130   ALIAS
131   DEPENDS
132     .${LIBC_TARGET_OS}.clock_gettime
135 add_entrypoint_object(
136   gettimeofday
137   ALIAS
138   DEPENDS
139     .${LIBC_TARGET_OS}.gettimeofday