xref: /llvm-project/libcxx/utils/CMakeLists.txt (revision 41145feb77ddcb90b6628e3d11eea69e1ecf71c2)
1add_custom_target(libcxx-generate-feature-test-macros
2    COMMAND "${Python3_EXECUTABLE}" "${LIBCXX_SOURCE_DIR}/utils/generate_feature_test_macro_components.py"
3    COMMENT "Generate the <version> header and tests for feature test macros.")
4
5add_custom_target(libcxx-generate-std-cppm-in-file
6  COMMAND
7        "${Python3_EXECUTABLE}"
8		"${LIBCXX_SOURCE_DIR}/utils/generate_libcxx_cppm_in.py"
9		"std"
10  COMMENT "Generate the std.cppm.in file")
11
12add_custom_target(libcxx-generate-std-compat-cppm-in-file
13  COMMAND
14        "${Python3_EXECUTABLE}"
15		"${LIBCXX_SOURCE_DIR}/utils/generate_libcxx_cppm_in.py"
16		"std.compat"
17  COMMENT "Generate the std.compat.cppm.in file")
18
19add_custom_target(libcxx-generate-extended-grapheme-cluster-tables
20    COMMAND
21        "${Python3_EXECUTABLE}"
22        "${LIBCXX_SOURCE_DIR}/utils/generate_extended_grapheme_cluster_table.py"
23        "${LIBCXX_SOURCE_DIR}/include/__format/extended_grapheme_cluster_table.h"
24    COMMENT "Generate the extended grapheme cluster header.")
25
26add_custom_target(libcxx-generate-extended-grapheme-cluster-tests
27    COMMAND
28        "${Python3_EXECUTABLE}"
29        "${LIBCXX_SOURCE_DIR}/utils/generate_extended_grapheme_cluster_test.py"
30         "${LIBCXX_SOURCE_DIR}/test/libcxx/utilities/format/format.string/format.string.std/extended_grapheme_cluster.h"
31    COMMENT "Generate the extended grapheme cluster header.")
32
33add_custom_target(libcxx-generate-escaped-output-table
34    COMMAND
35        "${Python3_EXECUTABLE}"
36        "${LIBCXX_SOURCE_DIR}/utils/generate_escaped_output_table.py"
37        "${LIBCXX_SOURCE_DIR}/include/__format/escaped_output_table.h"
38    COMMENT "Generate the escaped output header")
39
40add_custom_target(libcxx-generate-width-estimation-table
41    COMMAND
42        "${Python3_EXECUTABLE}"
43        "${LIBCXX_SOURCE_DIR}/utils/generate_width_estimation_table.py"
44        "${LIBCXX_SOURCE_DIR}/include/__format/width_estimation_table.h"
45    COMMENT "Generate the width estimation header")
46
47add_custom_target(libcxx-indic-conjunct-break-table
48    COMMAND
49        "${Python3_EXECUTABLE}"
50        "${LIBCXX_SOURCE_DIR}/utils/generate_indic_conjunct_break_table.py"
51        "${LIBCXX_SOURCE_DIR}/include/__format/indic_conjunct_break_table.h"
52    COMMENT "Generate the Indic Conjunct Break header")
53
54add_custom_target(libcxx-generate-files
55    DEPENDS libcxx-generate-feature-test-macros
56            libcxx-generate-std-cppm-in-file
57            libcxx-generate-std-compat-cppm-in-file
58            libcxx-generate-extended-grapheme-cluster-tables
59            libcxx-generate-extended-grapheme-cluster-tests
60            libcxx-generate-escaped-output-table
61            libcxx-generate-width-estimation-table
62            libcxx-indic-conjunct-break-table
63    COMMENT "Create all the auto-generated files in libc++ and its tests.")
64