]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Fix] Use bundled libfmt everywhere 5380/head
authorVsevolod Stakhov <vsevolod@rspamd.com>
Mon, 10 Mar 2025 10:52:51 +0000 (10:52 +0000)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Mon, 10 Mar 2025 10:52:51 +0000 (10:52 +0000)
Issue: #5258

19 files changed:
CMakeLists.txt
src/client/rspamc.cxx
src/libmime/lang_detection_fasttext.cxx
src/libserver/backtrace.cxx
src/libserver/cfg_rcl.cxx
src/libserver/cfg_utils.cxx
src/libserver/css/css_parser.cxx
src/libserver/css/css_selector.cxx
src/libserver/css/css_value.cxx
src/libserver/html/html.cxx
src/libserver/html/html_tests.cxx
src/libserver/hyperscan_tools.cxx
src/libserver/symcache/symcache_impl.cxx
src/libserver/symcache/symcache_item.cxx
src/libstat/backends/cdb_backend.cxx
src/libstat/backends/redis_backend.cxx
src/libutil/cxx/file_util.cxx
src/lua/lua_shingles.cxx
test/rspamd_cxx_unit_dkim.hxx

index 882a3a88a283bfc3c95643c1cfe582346ca337ae..f3fa193cc8130ab3add1a8610d9b6d0b67356777 100644 (file)
@@ -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")
index 31a4aaf2412bc4881d9997f3631b9343de3994bb..40435987735c3b7aa4aa185427263ce2e5ca9090 100644 (file)
@@ -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"
 
index 89916151f32fea976c4c385077fc2e90566a27a0..8ea2706e66e81cf2aee685aa47e5d8e4221fa84c 100644 (file)
@@ -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>
index c24e619369ecfc0cb2edbe81685486348095eb7d..5ebde677edef0b6496aff3cfd3a82f48d1c1476f 100644 (file)
@@ -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 {
index 6ea8945abcfce8027a9d629539ed9cf9d8646f0a..f383669080a9b738a47703ccb97caa2d0dd1680a 100644 (file)
@@ -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"
index 9612cdae46db86e84dd1a2302355a9778e81cd50..dfbdc6bee20861b95f0e1b88752c406d2233e307 100644 (file)
@@ -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"
index 11fa830f07c3ff27d39f5a4d356034eb9e812e9b..ade499ba40c8492359902187b432f53ab37a7922 100644 (file)
@@ -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>
index d2ae093cbbfef239d95736f0742a58171eb4fac9..527b123774ea77b42303eb9e7d6ea387c26e0ab0 100644 (file)
@@ -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"
 
index f2ff5536382968ea6ed73766d37838b3424cf707..52a61d3b64526d8c79060c241bf016807a1dbc5f 100644 (file)
@@ -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"
index 0fe31c2a3067c04bdd307a88488e7a198d17cc7e..93d1fdf91b32a57e62c2580ef1316ccd364a9003 100644 (file)
@@ -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>
 
index 00595feaaa587ee7665bcd59abf792e731266a19..3be836a2d5c81505ef2fafa57dd4167ee69423bf 100644 (file)
@@ -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
index 5035bee2c6438ffb8390daa04d049b8df2c77bf4..75863bf39b8ec99efc8bcbabb9d7ec9e6c7a8de8 100644 (file)
@@ -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"
index 7159555d2c961084e79fa205c44920a5019a89c6..4d17348c2089af1d0572f114ec9c8b9f5a33f812 100644 (file)
@@ -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
index 233e8113aad6f4aaa6894ba6d1b5bec1d8c42819..f58332ea5fb9be686a6976206dc0b8d1d754b4a2 100644 (file)
@@ -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>
index bd05e8ef8c236a20c44d23172b72f4876bd96d82..0f55a725c422134aae9fc5bf81144d194e32bc2e 100644 (file)
@@ -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 {
 
index 06842b078f242167dbd37f8a9c860da66a9d4328..7137904e992de536b276373e0c9eb715625b83a0 100644 (file)
@@ -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"
 
index 2f031f076e0191790623d2857184f1c87b859926..bc5dcdf3ba56093e6c7f7fb72af854660436b38f 100644 (file)
@@ -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"
 
index 4682ef74f538b2e0c130155da9b3348bf872cc85..7d4b277fc4ceb96b13ce936ed9e24df7aa045c0d 100644 (file)
@@ -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
index d445c3800db89787d43e58e81b9c9868ed6ef744..d501aaedd801f84c29c1504acac11871958e7e93 100644 (file)
@@ -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>