File: CMakeLists.txt

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (149 lines) | stat: -rw-r--r-- 3,517 bytes parent folder | download | duplicates (2)
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
if (CMAKE_VERSION VERSION_LESS 3.26)
  message(WARNING "The libc++ modules won't be available because the CMake version is too old. Update to CMake 3.26 or later.")
  return()
endif()

# The headers of Table 24: C++ library headers [tab:headers.cpp]
# and the headers of Table 25: C++ headers for C library facilities [tab:headers.cpp.c]
set(LIBCXX_SOURCES_MODULE_STD
  std.cppm
  std/algorithm.cppm
  std/any.cppm
  std/array.cppm
  std/atomic.cppm
  std/barrier.cppm
  std/bit.cppm
  std/bitset.cppm
  std/cassert.cppm
  std/cctype.cppm
  std/cerrno.cppm
  std/cfenv.cppm
  std/cfloat.cppm
  std/charconv.cppm
  std/chrono.cppm
  std/cinttypes.cppm
  std/climits.cppm
  std/clocale.cppm
  std/cmath.cppm
  std/codecvt.cppm
  std/compare.cppm
  std/complex.cppm
  std/concepts.cppm
  std/condition_variable.cppm
  std/coroutine.cppm
  std/csetjmp.cppm
  std/csignal.cppm
  std/cstdarg.cppm
  std/cstddef.cppm
  std/cstdint.cppm
  std/cstdio.cppm
  std/cstdlib.cppm
  std/cstring.cppm
  std/ctime.cppm
  std/cuchar.cppm
  std/cwchar.cppm
  std/cwctype.cppm
  std/deque.cppm
  std/exception.cppm
  std/execution.cppm
  std/expected.cppm
  std/filesystem.cppm
  std/flat_map.cppm
  std/flat_set.cppm
  std/format.cppm
  std/forward_list.cppm
  std/fstream.cppm
  std/functional.cppm
  std/future.cppm
  std/generator.cppm
  std/hazard_pointer.cppm
  std/initializer_list.cppm
  std/iomanip.cppm
  std/ios.cppm
  std/iosfwd.cppm
  std/iostream.cppm
  std/iostream.cppm
  std/istream.cppm
  std/iterator.cppm
  std/latch.cppm
  std/limits.cppm
  std/list.cppm
  std/locale.cppm
  std/map.cppm
  std/mdspan.cppm
  std/memory.cppm
  std/memory_resource.cppm
  std/mutex.cppm
  std/new.cppm
  std/numbers.cppm
  std/numeric.cppm
  std/optional.cppm
  std/ostream.cppm
  std/print.cppm
  std/queue.cppm
  std/random.cppm
  std/ranges.cppm
  std/ratio.cppm
  std/rcu.cppm
  std/regex.cppm
  std/scoped_allocator.cppm
  std/semaphore.cppm
  std/set.cppm
  std/shared_mutex.cppm
  std/source_location.cppm
  std/span.cppm
  std/spanstream.cppm
  std/sstream.cppm
  std/stack.cppm
  std/stacktrace.cppm
  std/stdexcept.cppm
  std/stdexcept.cppm
  std/stdfloat.cppm
  std/stop_token.cppm
  std/streambuf.cppm
  std/string.cppm
  std/string_view.cppm
  std/strstream.cppm
  std/syncstream.cppm
  std/system_error.cppm
  std/text_encoding.cppm
  std/thread.cppm
  std/tuple.cppm
  std/type_traits.cppm
  std/typeindex.cppm
  std/typeinfo.cppm
  std/unordered_map.cppm
  std/unordered_set.cppm
  std/utility.cppm
  std/valarray.cppm
  std/variant.cppm
  std/vector.cppm
  std/version.cppm
)

# TODO MODULES the CMakeLists.txt in the install directory is only temporary
# When that is removed the configured file can use the substitution
# LIBCXX_GENERATED_INCLUDE_TARGET_DIR avoiding this set.
# Also clean up the parts needed to generate the install version.
set(LIBCXX_CONFIGURED_INCLUDE_DIR ${LIBCXX_GENERATED_INCLUDE_TARGET_DIR})
configure_file(
  "CMakeLists.txt.in"
  "${LIBCXX_GENERATED_MODULE_DIR}/CMakeLists.txt"
  @ONLY
)

set(_all_modules "${LIBCXX_GENERATED_MODULE_DIR}/CMakeLists.txt")
foreach(file ${LIBCXX_SOURCES_MODULE_STD})
  set(src "${CMAKE_CURRENT_SOURCE_DIR}/${file}")
  set(dst "${LIBCXX_GENERATED_MODULE_DIR}/${file}")
  add_custom_command(OUTPUT ${dst}
    DEPENDS ${src}
    COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${dst}
    COMMENT "Copying CXX module ${file}")
  list(APPEND _all_modules "${dst}")
endforeach()

add_custom_target(generate-cxx-modules
  ALL DEPENDS
    ${_all_modules}
)