This repository was archived by the owner on Oct 7, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
508 lines (404 loc) · 11 KB
/
CMakeLists.txt
File metadata and controls
508 lines (404 loc) · 11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
cmake_minimum_required(VERSION 3.15)
project(coreutils_cpp LANGUAGES CXX)
# Some of the coreutils original names are reserved in cmake
# turn off policy for the reserved keywords to allow for the
# use of the original coreutils program names
if(POLICY CMP0037)
cmake_policy(SET CMP0037 OLD)
endif()
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY build)
set(CMAKE_CXX_STANDARD 20)
include_directories(src/include)
find_package(docopt 0.6 REQUIRED)
add_executable(echo
src/include/globals.h
src/echo.cpp)
target_link_libraries(echo docopt)
add_executable(touch
src/include/globals.h
src/touch.cpp)
target_link_libraries(touch docopt)
add_executable(b2sum
src/include/globals.h
src/b2sum.cpp)
target_link_libraries(b2sum docopt)
add_executable(basename
src/include/globals.h
src/basename.cpp)
target_link_libraries(basename docopt)
add_executable(basenc
src/include/globals.h
src/basenc.cpp)
target_link_Libraries(basenc docopt)
add_executable(cat
src/include/globals.h
src/cat.cpp)
target_link_libraries(cat docopt)
add_executable(chcon
src/include/globals.h
src/chcon.cpp)
target_link_libraries(chcon docopt)
add_executable(chgrp
src/include/globals.h
src/chgrp.cpp)
target_link_libraries(chgrp docopt)
add_executable(chmod
src/include/globals.h
src/chmod.cpp)
target_link_libraries(chmod docopt)
add_executable(chown
src/include/globals.h
src/chown.cpp)
target_link_libraries(chown docopt)
add_executable(chroot
src/include/globals.h
src/chroot.cpp)
target_link_libraries(chroot docopt)
add_executable(cksum
src/include/globals.h
src/cksum.cpp)
target_link_libraries(cksum docopt)
add_executable(comm
src/include/globals.h
src/comm.cpp)
target_link_libraries(comm docopt)
add_executable(coreutils
src/include/globals.h
src/coreutils.cpp)
target_link_libraries(coreutils docopt)
add_executable(cp
src/include/globals.h
src/cp.cpp)
target_link_libraries(cp docopt)
add_executable(csplit
src/include/globals.h
src/csplit.cpp)
target_link_libraries(csplit docopt)
add_executable(cut
src/include/globals.h
src/cut.cpp)
target_link_libraries(cut docopt)
add_executable(date
src/include/globals.h
src/date.cpp)
target_link_libraries(date docopt)
add_executable(dd
src/include/globals.h
src/dd.cpp)
target_link_libraries(dd docopt)
add_executable(df
src/include/globals.h
src/df.cpp)
target_link_libraries(df docopt)
add_executable(dircolors
src/include/globals.h
src/dircolors.cpp)
target_link_libraries(dircolors docopt)
add_executable(dirname
src/include/globals.h
src/dirname.cpp)
target_link_libraries(dirname docopt)
add_executable(du
src/include/globals.h
src/du.cpp)
target_link_libraries(du docopt)
add_executable(env
src/include/globals.h
src/env.cpp)
target_link_libraries(env docopt)
add_executable(expand
src/include/globals.h
src/expand.cpp)
target_link_libraries(expand docopt)
add_executable(expr
src/include/globals.h
src/expr.cpp)
target_link_libraries(expr docopt)
add_executable(factor
src/include/globals.h
src/factor.cpp)
target_link_libraries(factor docopt)
add_executable(false
src/include/globals.h
src/false.cpp)
target_link_libraries(false docopt)
add_executable(fmt
src/include/globals.h
src/fmt.cpp)
target_link_libraries(fmt docopt)
add_executable(fold
src/include/globals.h
src/fold.cpp)
target_link_libraries(fold docopt)
add_executable(groups
src/include/globals.h
src/groups.cpp)
target_link_libraries(groups docopt)
add_executable(head
src/include/globals.h
src/head.cpp)
target_link_libraries(head docopt)
add_executable(hostid
src/include/globals.h
src/hostid.cpp)
target_link_libraries(hostid docopt)
add_executable(hostname
src/include/globals.h
src/hostname.cpp)
target_link_libraries(hostname docopt)
add_executable(id
src/include/globals.h
src/id.cpp)
target_link_libraries(id docopt)
add_executable(install
src/include/globals.h
src/install.cpp)
target_link_libraries(install docopt)
add_executable(join
src/include/globals.h
src/join.cpp)
target_link_libraries(join docopt)
add_executable(kill
src/include/globals.h
src/kill.cpp)
target_link_libraries(kill docopt)
add_executable(link
src/include/globals.h
src/link.cpp)
target_link_libraries(link docopt)
add_executable(ln
src/include/globals.h
src/ln.cpp)
target_link_libraries(ln docopt)
add_executable(logname
src/include/globals.h
src/logname.cpp)
target_link_libraries(logname docopt)
add_executable(ls
src/include/globals.h
src/ls.cpp)
target_link_libraries(ls docopt)
add_executable(md5sum
src/include/globals.h
src/md5sum.cpp)
target_link_libraries(md5sum docopt)
add_executable(mkdir
src/include/globals.h
src/mkdir.cpp)
target_link_libraries(mkdir docopt)
add_executable(mkfifo
src/include/globals.h
src/mkfifo.cpp)
target_link_libraries(mkfifo docopt)
add_executable(mknod
src/include/globals.h
src/mknod.cpp)
target_link_libraries(mknod docopt)
add_executable(mktemp
src/include/globals.h
src/mktemp.cpp)
target_link_libraries(mktemp docopt)
add_executable(mv
src/include/globals.h
src/mv.cpp)
target_link_libraries(mv docopt)
add_executable(nice
src/include/globals.h
src/nice.cpp)
target_link_libraries(nice docopt)
add_executable(nl
src/include/globals.h
src/nl.cpp)
target_link_libraries(nl docopt)
add_executable(nohup
src/include/globals.h
src/nohup.cpp)
target_link_libraries(nohup docopt)
add_executable(nproc
src/include/globals.h
src/nproc.cpp)
target_link_libraries(nproc docopt)
add_executable(numfmt
src/include/globals.h
src/numfmt.cpp)
target_link_libraries(numfmt docopt)
add_executable(od
src/include/globals.h
src/od.cpp)
target_link_libraries(od docopt)
add_executable(paste
src/include/globals.h
src/paste.cpp)
target_link_libraries(paste docopt)
add_executable(pathchk
src/include/globals.h
src/pathchk.cpp)
target_link_libraries(pathchk docopt)
add_executable(pinky
src/include/globals.h
src/pinky.cpp)
target_link_libraries(pinky docopt)
add_executable(pr
src/include/globals.h
src/pr.cpp)
target_link_libraries(pr docopt)
add_executable(printenv
src/include/globals.h
src/printenv.cpp)
target_link_libraries(printenv docopt)
add_executable(ptx
src/include/globals.h
src/ptx.cpp)
target_link_libraries(ptx docopt)
add_executable(printf
src/include/globals.h
src/printf.cpp)
target_link_libraries(printf docopt)
add_executable(pwd
src/include/globals.h
src/pwd.cpp)
target_link_libraries(pwd docopt)
add_executable(readlink
src/include/globals.h
src/readlink.cpp)
target_link_libraries(readlink docopt)
add_executable(realpath
src/include/globals.h
src/realpath.cpp)
target_link_libraries(realpath docopt)
add_executable(rm
src/include/globals.h
src/rm.cpp)
target_link_libraries(rm docopt)
add_executable(rmdir
src/include/globals.h
src/rmdir.cpp)
target_link_libraries(rmdir docopt)
add_executable(runcon
src/include/globals.h
src/runcon.cpp)
target_link_libraries(runcon docopt)
add_executable(seq
src/include/globals.h
src/seq.cpp)
target_link_libraries(seq docopt)
add_executable(shred
src/include/globals.h
src/shred.cpp)
target_link_libraries(shred docopt)
add_executable(shuf
src/include/globals.h
src/shuf.cpp)
target_link_libraries(shuf docopt)
add_executable(sleep
src/include/globals.h
src/sleep.cpp)
target_link_libraries(sleep docopt)
add_executable(sort
src/include/globals.h
src/sort.cpp)
target_link_libraries(sort docopt)
add_executable(split
src/include/globals.h
src/split.cpp)
target_link_libraries(split docopt)
add_executable(stat
src/include/globals.h
src/stat.cpp)
target_link_libraries(stat docopt)
add_executable(stdbuf
src/include/globals.h
src/stdbuf.cpp)
target_link_libraries(stdbuf docopt)
add_executable(stty
src/include/globals.h
src/stty.cpp)
target_link_libraries(stty docopt)
add_executable(sum
src/include/globals.h
src/sum.cpp)
target_link_libraries(sum docopt)
add_executable(sync
src/include/globals.h
src/sync.cpp)
target_link_libraries(sync docopt)
add_executable(tac
src/include/globals.h
src/tac.cpp)
target_link_libraries(tac docopt)
add_executable(tail
src/include/globals.h
src/tail.cpp)
target_link_libraries(tail docopt)
add_executable(tee
src/include/globals.h
src/tee.cpp)
target_link_libraries(tee docopt)
add_executable(test
src/include/globals.h
src/test.cpp)
target_link_libraries(test docopt)
add_executable(timeout
src/include/globals.h
src/timeout.cpp)
target_link_libraries(timeout docopt)
add_executable(tr
src/include/globals.h
src/tr.cpp)
target_link_libraries(tr docopt)
add_executable(true
src/include/globals.h
src/true.cpp)
target_link_libraries(true docopt)
add_executable(truncate
src/include/globals.h
src/truncate.cpp)
target_link_libraries(truncate docopt)
add_executable(tsort
src/include/globals.h
src/tsort.cpp)
target_link_libraries(tsort docopt)
add_executable(tty
src/include/globals.h
src/tty.cpp)
target_link_libraries(tty docopt)
add_executable(uname
src/include/globals.h
src/uname.cpp)
target_link_libraries(uname docopt)
add_executable(unexpand
src/include/globals.h
src/unexpand.cpp)
target_link_libraries(unexpand docopt)
add_executable(uniq
src/include/globals.h
src/uniq.cpp)
target_link_libraries(uniq docopt)
add_executable(unlink
src/include/globals.h
src/unlink.cpp)
target_link_libraries(unlink docopt)
add_executable(uptime
src/include/globals.h
src/uptime.cpp)
target_link_libraries(uptime docopt)
add_executable(users
src/include/globals.h
src/users.cpp)
target_link_libraries(users docopt)
add_executable(wc
src/include/globals.h
src/wc.cpp)
target_link_libraries(wc docopt)
add_executable(who
src/include/globals.h
src/who.cpp)
target_link_libraries(who docopt)
add_executable(whoami
src/include/globals.h
src/whoami.cpp)
target_link_libraries(whoami docopt)
add_executable(yes
src/include/globals.h
src/yes.cpp)
target_link_libraries(yes docopt)