summaryrefslogtreecommitdiff
path: root/libc/src/spawn/CMakeLists.txt
blob: fe5f81effc3f041b881105c78368d8d4eb316b14 (plain)
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
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${LIBC_TARGET_OS})
  add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/${LIBC_TARGET_OS})
endif()

add_header_library(
  file_actions
  HDRS
    file_actions.h
  DEPENDS
    libc.hdr.stdint_proxy
    libc.include.spawn
)

add_entrypoint_object(
  posix_spawn_file_actions_init
  SRCS
    posix_spawn_file_actions_init.cpp
  HDRS
    posix_spawn_file_actions_init.h
  DEPENDS
    libc.include.spawn
)

add_entrypoint_object(
  posix_spawn_file_actions_destroy
  SRCS
    posix_spawn_file_actions_destroy.cpp
  HDRS
    posix_spawn_file_actions_destroy.h
  DEPENDS
    .file_actions
    libc.include.spawn
    libc.src.__support.CPP.new
    libc.src.errno.errno
)

add_entrypoint_object(
  posix_spawn_file_actions_adddup2
  SRCS
    posix_spawn_file_actions_adddup2.cpp
  HDRS
    posix_spawn_file_actions_adddup2.h
  DEPENDS
    .file_actions
    libc.include.spawn
    libc.src.__support.CPP.new
    libc.src.errno.errno
)

add_entrypoint_object(
  posix_spawn_file_actions_addopen
  SRCS
    posix_spawn_file_actions_addopen.cpp
  HDRS
    posix_spawn_file_actions_addopen.h
  DEPENDS
    .file_actions
    libc.include.spawn
    libc.src.__support.CPP.new
    libc.src.errno.errno
)

add_entrypoint_object(
  posix_spawn_file_actions_addclose
  SRCS
    posix_spawn_file_actions_addclose.cpp
  HDRS
    posix_spawn_file_actions_addclose.h
  DEPENDS
    .file_actions
    libc.include.spawn
    libc.src.__support.CPP.new
    libc.src.errno.errno
)

add_entrypoint_object(
  posix_spawn
  ALIAS
  DEPENDS
    .${LIBC_TARGET_OS}.posix_spawn
)