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
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
|
diff --git CMakeLists.txt CMakeLists.txt
index 882a3a88a2..f3fa193cc8 100644
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -63,7 +63,6 @@ OPTION(ENABLE_LUA_REPL "Enables Lua repl (requires C++11 compiler) [default: ON]
OPTION(ENABLE_FASTTEXT "Link with FastText library [default: OFF]" OFF)
OPTION(ENABLE_BACKWARD "Build rspamd with backward-cpp stacktrace [default: ON]" ON)
OPTION(SYSTEM_ZSTD "Use system zstd instead of bundled one [default: OFF]" OFF)
-OPTION(SYSTEM_FMT "Use system fmt instead of bundled one [default: OFF]" OFF)
OPTION(SYSTEM_DOCTEST "Use system doctest instead of bundled one [default: OFF]" OFF)
OPTION(SYSTEM_XXHASH "Use system xxhash instead of bundled one [default: OFF]" OFF)
@@ -655,11 +654,6 @@ IF (BACKWARD_LIBRARIES)
message(STATUS "Backward-cpp libraries: ${BACKWARD_LIBRARIES}")
ENDIF ()
-IF (SYSTEM_FMT MATCHES "OFF")
- INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/contrib/fmt/include")
-ELSE ()
- find_package(fmt)
-ENDIF ()
IF (SYSTEM_DOCTEST MATCHES "OFF")
ADD_SUBDIRECTORY(contrib/doctest)
INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/contrib/doctest")
diff --git src/client/rspamc.cxx src/client/rspamc.cxx
index 31a4aaf241..4043598773 100644
--- src/client/rspamc.cxx
+++ src/client/rspamc.cxx
@@ -1,5 +1,5 @@
/*
- * Copyright 2024 Vsevolod Stakhov
+ * Copyright 2025 Vsevolod Stakhov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -35,8 +35,8 @@
#include "frozen/string.h"
#include "frozen/unordered_map.h"
-#include "fmt/format.h"
-#include "fmt/color.h"
+#include "contrib/fmt/include/fmt/format.h"
+#include "contrib/fmt/include/fmt/color.h"
#include "libutil/cxx/file_util.hxx"
#include "libutil/cxx/util.hxx"
diff --git src/libmime/lang_detection_fasttext.cxx src/libmime/lang_detection_fasttext.cxx
index 89916151f3..8ea2706e66 100644
--- src/libmime/lang_detection_fasttext.cxx
+++ src/libmime/lang_detection_fasttext.cxx
@@ -1,5 +1,5 @@
/*
- * Copyright 2024 Vsevolod Stakhov
+ * Copyright 2025 Vsevolod Stakhov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,7 +20,7 @@
#include "fasttext/fasttext.h"
#include "libserver/cfg_file.h"
#include "libserver/logger.h"
-#include "fmt/base.h"
+#include "contrib/fmt/include/fmt/base.h"
#include "stat_api.h"
#include <exception>
#include <string_view>
diff --git src/libserver/backtrace.cxx src/libserver/backtrace.cxx
index c24e619369..5ebde677ed 100644
--- src/libserver/backtrace.cxx
+++ src/libserver/backtrace.cxx
@@ -1,5 +1,5 @@
/*
- * Copyright 2024 Vsevolod Stakhov
+ * Copyright 2025 Vsevolod Stakhov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,7 +19,7 @@
#ifdef BACKWARD_ENABLE
#include "contrib/backward-cpp/backward.hpp"
-#include "fmt/base.h"
+#include "contrib/fmt/include/fmt/base.h"
#include "logger.h"
namespace rspamd {
diff --git src/libserver/cfg_rcl.cxx src/libserver/cfg_rcl.cxx
index 6ea8945abc..f383669080 100644
--- src/libserver/cfg_rcl.cxx
+++ src/libserver/cfg_rcl.cxx
@@ -1,5 +1,5 @@
/*
- * Copyright 2024 Vsevolod Stakhov
+ * Copyright 2025 Vsevolod Stakhov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -34,7 +34,7 @@
#include <algorithm>// for std::transform
#include <memory>
#include "contrib/ankerl/unordered_dense.h"
-#include "fmt/base.h"
+#include "contrib/fmt/include/fmt/base.h"
#include "libutil/cxx/util.hxx"
#include "libutil/cxx/file_util.hxx"
#include "frozen/unordered_set.h"
diff --git src/libserver/cfg_utils.cxx src/libserver/cfg_utils.cxx
index 9612cdae46..dfbdc6bee2 100644
--- src/libserver/cfg_utils.cxx
+++ src/libserver/cfg_utils.cxx
@@ -1,5 +1,5 @@
/*
- * Copyright 2024 Vsevolod Stakhov
+ * Copyright 2025 Vsevolod Stakhov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -65,7 +65,7 @@
#include <string>
#include <string_view>
#include <vector>
-#include "fmt/base.h"
+#include "contrib/fmt/include/fmt/base.h"
#include "cxx/util.hxx"
#include "frozen/unordered_map.h"
#include "frozen/string.h"
diff --git src/libserver/css/css_parser.cxx src/libserver/css/css_parser.cxx
index 11fa830f07..ade499ba40 100644
--- src/libserver/css/css_parser.cxx
+++ src/libserver/css/css_parser.cxx
@@ -1,5 +1,5 @@
/*
- * Copyright 2024 Vsevolod Stakhov
+ * Copyright 2025 Vsevolod Stakhov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,7 +20,7 @@
#include "css_rule.hxx"
#include "css_util.hxx"
#include "css.hxx"
-#include "fmt/base.h"
+#include "contrib/fmt/include/fmt/base.h"
#include <vector>
#include <unicode/utf8.h>
diff --git src/libserver/css/css_selector.cxx src/libserver/css/css_selector.cxx
index d2ae093cbb..527b123774 100644
--- src/libserver/css/css_selector.cxx
+++ src/libserver/css/css_selector.cxx
@@ -1,5 +1,5 @@
/*
- * Copyright 2024 Vsevolod Stakhov
+ * Copyright 2025 Vsevolod Stakhov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,7 +17,7 @@
#include "css_selector.hxx"
#include "css.hxx"
#include "libserver/html/html.hxx"
-#include "fmt/base.h"
+#include "contrib/fmt/include/fmt/base.h"
#define DOCTEST_CONFIG_IMPLEMENTATION_IN_DLL
#include "doctest/doctest.h"
diff --git src/libserver/css/css_value.cxx src/libserver/css/css_value.cxx
index f2ff553638..52a61d3b64 100644
--- src/libserver/css/css_value.cxx
+++ src/libserver/css/css_value.cxx
@@ -1,5 +1,5 @@
/*
- * Copyright 2024 Vsevolod Stakhov
+ * Copyright 2025 Vsevolod Stakhov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,7 +20,7 @@
#include "frozen/string.h"
#include "libutil/util.h"
#include "contrib/ankerl/unordered_dense.h"
-#include "fmt/base.h"
+#include "contrib/fmt/include/fmt/base.h"
#define DOCTEST_CONFIG_IMPLEMENTATION_IN_DLL
#include "doctest/doctest.h"
diff --git src/libserver/html/html.cxx src/libserver/html/html.cxx
index 0fe31c2a30..93d1fdf91b 100644
--- src/libserver/html/html.cxx
+++ src/libserver/html/html.cxx
@@ -1,11 +1,11 @@
-/*-
- * Copyright 2021 Vsevolod Stakhov
+/*
+ * Copyright 2025 Vsevolod Stakhov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -35,9 +35,9 @@
#include "html_tag.hxx"
#include "html_url.hxx"
-#include <frozen/unordered_map.h>
-#include <frozen/string.h>
-#include <fmt/core.h>
+#include "contrib/frozen/include/frozen/unordered_map.h"
+#include "contrib/frozen/include/frozen/string.h"
+#include "contrib/fmt/include/fmt/core.h"
#include <unicode/uversion.h>
diff --git src/libserver/html/html_tests.cxx src/libserver/html/html_tests.cxx
index 00595feaaa..3be836a2d5 100644
--- src/libserver/html/html_tests.cxx
+++ src/libserver/html/html_tests.cxx
@@ -1,5 +1,5 @@
/*
- * Copyright 2024 Vsevolod Stakhov
+ * Copyright 2025 Vsevolod Stakhov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,7 +19,7 @@
#include "libserver/task.h"
#include <vector>
-#include <fmt/core.h>
+#include "contrib/fmt/include/fmt/core.h"
#define DOCTEST_CONFIG_IMPLEMENTATION_IN_DLL
diff --git src/libserver/hyperscan_tools.cxx src/libserver/hyperscan_tools.cxx
index 5035bee2c6..75863bf39b 100644
--- src/libserver/hyperscan_tools.cxx
+++ src/libserver/hyperscan_tools.cxx
@@ -1,5 +1,5 @@
/*
- * Copyright 2024 Vsevolod Stakhov
+ * Copyright 2025 Vsevolod Stakhov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,7 +21,7 @@
#include <filesystem>
#include "contrib/ankerl/unordered_dense.h"
#include "contrib/ankerl/svector.h"
-#include "fmt/base.h"
+#include "contrib/fmt/include/fmt/base.h"
#include "libutil/cxx/file_util.hxx"
#include "libutil/cxx/error.hxx"
#include "hs.h"
diff --git src/libserver/symcache/symcache_impl.cxx src/libserver/symcache/symcache_impl.cxx
index 7159555d2c..4d17348c20 100644
--- src/libserver/symcache/symcache_impl.cxx
+++ src/libserver/symcache/symcache_impl.cxx
@@ -1,5 +1,5 @@
/*
- * Copyright 2024 Vsevolod Stakhov
+ * Copyright 2025 Vsevolod Stakhov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,7 +21,7 @@
#include "unix-std.h"
#include "libutil/cxx/file_util.hxx"
#include "libutil/cxx/util.hxx"
-#include "fmt/base.h"
+#include "contrib/fmt/include/fmt/base.h"
#include "contrib/t1ha/t1ha.h"
#ifdef __has_include
diff --git src/libserver/symcache/symcache_item.cxx src/libserver/symcache/symcache_item.cxx
index 233e8113aa..f58332ea5f 100644
--- src/libserver/symcache/symcache_item.cxx
+++ src/libserver/symcache/symcache_item.cxx
@@ -1,5 +1,5 @@
/*
- * Copyright 2024 Vsevolod Stakhov
+ * Copyright 2025 Vsevolod Stakhov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,7 +17,7 @@
#include "lua/lua_common.h"
#include "symcache_internal.hxx"
#include "symcache_item.hxx"
-#include "fmt/base.h"
+#include "contrib/fmt/include/fmt/base.h"
#include "libserver/task.h"
#include "libutil/cxx/util.hxx"
#include <numeric>
diff --git src/libstat/backends/cdb_backend.cxx src/libstat/backends/cdb_backend.cxx
index bd05e8ef8c..0f55a725c4 100644
--- src/libstat/backends/cdb_backend.cxx
+++ src/libstat/backends/cdb_backend.cxx
@@ -1,5 +1,5 @@
/*
- * Copyright 2024 Vsevolod Stakhov
+ * Copyright 2025 Vsevolod Stakhov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -28,7 +28,7 @@
#include <optional>
#include "contrib/expected/expected.hpp"
#include "contrib/ankerl/unordered_dense.h"
-#include "fmt/base.h"
+#include "contrib/fmt/include/fmt/base.h"
namespace rspamd::stat::cdb {
diff --git src/libstat/backends/redis_backend.cxx src/libstat/backends/redis_backend.cxx
index 06842b078f..7137904e99 100644
--- src/libstat/backends/redis_backend.cxx
+++ src/libstat/backends/redis_backend.cxx
@@ -1,5 +1,5 @@
/*
- * Copyright 2024 Vsevolod Stakhov
+ * Copyright 2025 Vsevolod Stakhov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,7 +19,7 @@
#include "stat_internal.h"
#include "upstream.h"
#include "libserver/mempool_vars_internal.h"
-#include "fmt/base.h"
+#include "contrib/fmt/include/fmt/base.h"
#include "libutil/cxx/error.hxx"
diff --git src/libutil/cxx/file_util.cxx src/libutil/cxx/file_util.cxx
index 2f031f076e..bc5dcdf3ba 100644
--- src/libutil/cxx/file_util.cxx
+++ src/libutil/cxx/file_util.cxx
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 Vsevolod Stakhov
+ * Copyright 2025 Vsevolod Stakhov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
#include "file_util.hxx"
-#include <fmt/core.h>
+#include "contrib/fmt/include/fmt/core.h"
#include "libutil/util.h"
#include "libutil/unix-std.h"
diff --git src/lua/lua_shingles.cxx src/lua/lua_shingles.cxx
index 4682ef74f5..7d4b277fc4 100644
--- src/lua/lua_shingles.cxx
+++ src/lua/lua_shingles.cxx
@@ -17,7 +17,7 @@
#include "lua_common.h"
#include "lua_classnames.h"
#include "shingles.h"
-#include "fmt/format.h"
+#include "contrib/fmt/include/fmt/format.h"
/***
* @module rspamd_shingle
diff --git test/rspamd_cxx_unit_dkim.hxx test/rspamd_cxx_unit_dkim.hxx
index d445c3800d..d501aaedd8 100644
--- test/rspamd_cxx_unit_dkim.hxx
+++ test/rspamd_cxx_unit_dkim.hxx
@@ -1,5 +1,5 @@
/*
- * Copyright 2024 Vsevolod Stakhov
+ * Copyright 2025 Vsevolod Stakhov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,7 +21,7 @@
#define DOCTEST_CONFIG_IMPLEMENTATION_IN_DLL
#include "doctest/doctest.h"
-#include "fmt/base.h"
+#include "contrib/fmt/include/fmt/base.h"
#include "libserver/dkim.h"
#include <vector>
|