[bazel] Allow overriding py_test rule for lit_test (#119460)
[llvm-project.git] / libc / src / __support / StringUtil / CMakeLists.txt
blob41b20dc2cb1171eca8bc56ceea8e6bd806f4c859
1 add_header_library(
2   message_mapper
3   HDRS
4     message_mapper.h
5   DEPENDS
6     libc.src.__support.CPP.array
7     libc.src.__support.CPP.string_view
8     libc.src.__support.CPP.optional
11 # The table maps depend on message_mapper.
12 add_subdirectory(tables)
14 add_header_library(
15   platform_errors
16   HDRS
17     platform_errors.h
18   DEPENDS
19     # To avoid complicated conditionals, we will unconditionally add dependency
20     # on all platform errors which are included in platform_error_table.h.
21     # Ultimately, only the relevent error table will be used.
22     .tables.linux_platform_errors
23     .tables.minimal_platform_errors
26 add_header_library(
27   platform_signals
28   HDRS
29     platform_signals.h
30   DEPENDS
31     # To avoid complicated conditionals, we will unconditionally add dependency
32     # on all platform signals which are included in platform_signal_table.h.
33     # Ultimately, only the relevent signal table will be used.
34     .tables.linux_platform_signals
35     .tables.minimal_platform_signals
38 add_object_library(
39   error_to_string
40   HDRS
41     error_to_string.h
42   SRCS
43     error_to_string.cpp
44   DEPENDS
45     .message_mapper
46     .platform_errors
47     libc.src.__support.common
48     libc.src.__support.CPP.span
49     libc.src.__support.CPP.string_view
50     libc.src.__support.CPP.stringstream
51     libc.src.__support.integer_to_string
54 if(TARGET libc.include.signal)
55   add_object_library(
56     signal_to_string
57     HDRS
58       signal_to_string.h
59     SRCS
60       signal_to_string.cpp
61     DEPENDS
62       .message_mapper
63       .platform_signals
64       libc.include.signal
65       libc.src.__support.common
66       libc.src.__support.CPP.span
67       libc.src.__support.CPP.string_view
68       libc.src.__support.CPP.stringstream
69       libc.src.__support.integer_to_string
70   )
71 endif()