Skip to content

Commit 739e234

Browse files
author
Zishan Mirza
committed
use LIBC_TARGET_OS for platform independent implementations
1 parent 4069f3f commit 739e234

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

libc/src/time/CMakeLists.txt

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,8 @@ add_entrypoint_object(
6464
time_utils.h
6565
DEPENDS
6666
.time_utils
67-
.timezone
68-
libc.hdr.types.time_t
69-
libc.include.time
67+
.${LIBC_TARGET_OS}.localtime_utils
68+
.${LIBC_TARGET_OS}.timezone
7069
libc.src.stdio.fopen
7170
)
7271

@@ -78,8 +77,8 @@ add_entrypoint_object(
7877
ctime_r.h
7978
time_utils.h
8079
DEPENDS
81-
.linux.localtime_utils
82-
.linux.timezone
80+
.${LIBC_TARGET_OS}.localtime_utils
81+
.${LIBC_TARGET_OS}.timezone
8382
.time_utils
8483
.timezone
8584
libc.hdr.types.time_t
@@ -90,38 +89,38 @@ add_entrypoint_object(
9089
add_entrypoint_object(
9190
localtime
9291
SRCS
93-
linux/localtime.cpp
92+
${LIBC_TARGET_OS}/localtime.cpp
9493
HDRS
9594
localtime.h
9695
DEPENDS
97-
.linux.localtime_utils
98-
.linux.timezone
96+
.${LIBC_TARGET_OS}.localtime_utils
97+
.${LIBC_TARGET_OS}.timezone
9998
.time_utils
10099
libc.src.stdio.fopen
101100
)
102101

103102
add_entrypoint_object(
104103
localtime_r
105104
SRCS
106-
linux/localtime_r.cpp
105+
${LIBC_TARGET_OS}/localtime_r.cpp
107106
HDRS
108107
localtime_r.h
109108
DEPENDS
110-
.linux.localtime_utils
111-
.linux.timezone
109+
.${LIBC_TARGET_OS}.localtime_utils
110+
.${LIBC_TARGET_OS}.timezone
112111
.time_utils
113112
libc.src.stdio.fopen
114113
)
115114

116115
add_entrypoint_object(
117116
localtime_s
118117
SRCS
119-
linux/localtime_s.cpp
118+
${LIBC_TARGET_OS}/localtime_s.cpp
120119
HDRS
121120
localtime_s.h
122121
DEPENDS
123-
.linux.localtime_utils
124-
.linux.timezone
122+
.${LIBC_TARGET_OS}.localtime_utils
123+
.${LIBC_TARGET_OS}.timezone
125124
.time_utils
126125
libc.src.stdio.fopen
127126
)

0 commit comments

Comments
 (0)