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
|
target('utfcpp')
set_kind("headeronly")
set_group("thirdparty")
add_headerfiles("utfcpp/**.h")
add_includedirs("utfcpp/source", {public=true})
target('oodle')
set_kind('headeronly')
set_group("thirdparty")
add_includedirs("Oodle/include", {public=true})
if is_os("windows") then
add_linkdirs("Oodle/lib/Win64", {public=true})
add_links("oo2core_win64", {public=true})
elseif is_os("linux") then
add_linkdirs("Oodle/lib/Linux_x64", {public=true})
add_links("oo2corelinux64", {public=true})
add_syslinks("pthread", {public=true})
elseif is_os("macosx") then
add_linkdirs("Oodle/lib/Mac_x64", {public=true})
add_links("oo2coremac64", {public=true})
end
target('timesinceprocessstart')
set_kind('headeronly')
set_group('thirdparty')
add_includedirs("GetTimeSinceProcessStart", {public=true})
add_headerfiles("GetTimeSinceProcessStart/**.h")
target('ue-trace')
set_kind('headeronly')
set_group('thirdparty')
add_includedirs("trace", {public=true})
add_headerfiles("trace/**.h")
-- rpmalloc 1.5.0-dev.20251026
-- Vendored from develop branch commit feb43aee0d4d (2025-10-26)
-- https://github.com/mjansson/rpmalloc/commit/feb43aee0d4d
target('rpmalloc')
set_kind("static")
set_group('thirdparty')
set_languages("c17", "cxx20")
if is_os("windows") and not (get_config("toolchain") or ""):find("clang") then
add_cflags("/experimental:c11atomics", {force=true, tools="cl"})
add_cflags("/wd5105", {tools="cl"})
end
add_defines("RPMALLOC_FIRST_CLASS_HEAPS=1", "ENABLE_STATISTICS=1", "ENABLE_OVERRIDE=0")
add_files("rpmalloc/rpmalloc.c")
add_headerfiles("rpmalloc/**.h")
add_includedirs("rpmalloc", {public=true})
target('protozero')
set_kind('headeronly')
set_group('thirdparty')
add_headerfiles("protozero/**.hpp")
add_includedirs("protozero/include", {public=true})
target('asio')
set_kind('headeronly')
set_group('thirdparty')
add_defines("ASIO_STANDALONE", "ASIO_HEADER_ONLY", {public=true})
-- if is_plat("linux") and not (get_config("toolchain") == "ue-clang") then
-- add_defines("ASIO_HAS_IO_URING", {public=true})
-- add_packages("liburing", {public=true})
-- end
add_headerfiles("asio/asio/include/**.hpp")
add_includedirs("asio/asio/include", {public=true})
target("blake3")
set_kind("static")
set_group('thirdparty')
add_files("blake3/c/blake3.c", "blake3/c/blake3_dispatch.c", "blake3/c/blake3_portable.c")
add_headerfiles("blake3/c/blake3.h")
add_includedirs("blake3/c", {public=true})
if is_os("windows") and not (get_config("toolchain") or ""):find("clang") then
add_cflags("/experimental:c11atomics", {tools="cl"})
add_cflags("/wd4245", {force = true}) -- conversion from 'type1' to 'type2', possible loss of data
elseif is_os("macosx") then
add_cflags("-Wno-unused-function")
end
if is_arch("x86_64", "x64") then
-- sbo: this breaks when using MINGW on windows (which is what you get in Git Bash), so just disable it
-- if is_subhost("msys", "cygwin") then
-- add_files("blake3/c/*x86-64_windows_gnu.S")
-- elseif is_plat("windows") then
if is_plat("windows") then
add_files("blake3/c/*x86-64_windows_msvc.asm")
else
add_files("blake3/c/*x86-64_unix.S")
end
elseif is_arch("x86", "i386") then
add_files("blake3/c/blake3_portable.c")
add_files("blake3/c/blake3_sse2.c")
add_files("blake3/c/blake3_sse41.c")
add_files("blake3/c/blake3_avx2.c")
add_files("blake3/c/blake3_avx512.c")
elseif is_arch("arm64", "arm64-v8a") then
add_files("blake3/c/blake3_neon.c")
add_defines("BLAKE3_USE_NEON=1")
end
target("cxxopts")
set_kind("headeronly")
set_group("thirdparty")
add_headerfiles("cxxopts/include/**.hpp")
add_includedirs("cxxopts/include", {public=true})
add_defines("CXXOPTS_NO_REGEX", {public=true})
target("doctest")
set_kind("headeronly")
set_group("thirdparty")
add_headerfiles("doctest/**.h")
add_includedirs("doctest", {public=true})
target("sol2")
set_kind("headeronly")
set_group("thirdparty")
add_defines("SOL_INSIDE_UNREAL=0", {public=true})
add_headerfiles("sol2/**.hpp")
add_includedirs("sol2", {public=true})
target("robin-map")
set_kind("headeronly")
set_group("thirdparty")
add_headerfiles("robin-map/include/*.h")
add_includedirs("robin-map/include", {public=true})
target("fmt")
set_kind("static")
set_group("thirdparty")
set_warnings("allextra")
if is_plat("windows") then
add_cxxflags("/wd4834", {force=true}) -- C4834: discarding return value of [[nodiscard]] function
end
add_files("fmt/src/format.cc", "fmt/src/os.cc")
add_headerfiles("fmt/include/**.h")
add_includedirs("fmt/include", {public=true})
includes("raw_pdb")
target("tourist")
set_kind("static")
set_group("thirdparty")
add_files(
"tourist/foundation/src/allocator.cpp",
"tourist/foundation/src/buffer.cpp",
"tourist/foundation/src/malloc.cpp",
"tourist/foundation/src/ref.cpp",
"tourist/foundation/src/scheduler.cpp",
"tourist/foundation/src/stream.cpp",
"tourist/trace/src/data.cpp",
"tourist/trace/src/preamble.cpp",
"tourist/trace/src/protocol.cpp",
"tourist/trace/src/transport.cpp",
"tourist/trace/src/types.cpp",
"tourist/analysis/src/dispatcher.cpp"
)
add_includedirs(
"tourist/foundation/include",
"tourist/trace/include",
"tourist/analysis/include",
{public=true}
)
-- Internal headers (slab.h, constants.h)
add_includedirs(
"tourist/foundation/src",
"tourist/trace/src"
)
add_headerfiles(
"tourist/foundation/include/**.h",
"tourist/trace/include/**.h",
"tourist/analysis/include/**.h",
"tourist/foundation/src/slab.h",
"tourist/trace/src/constants.h"
)
-- LZ4 for trace packet decompression
add_packages("lz4")
-- Suppress warnings from tourist's code style under zen's strict settings
if is_plat("windows") then
add_cxxflags("/wd4668", {force=true}) -- 'X' is not defined as a preprocessor macro
add_cxxflags("/wd4189", {force=true}) -- local variable is initialized but not referenced
add_cxxflags("/wd4702", {force=true}) -- unreachable code
end
|