feat add spdlog
Some checks failed
sm-rpc / build (Debug, aarch64-linux-gnu) (push) Failing after 29s
sm-rpc / build (Debug, arm-linux-gnueabihf) (push) Failing after 16s
sm-rpc / build (Debug, host.gcc) (push) Failing after 11s
sm-rpc / build (Debug, mipsel-linux-gnu) (push) Failing after 12s
sm-rpc / build (Release, aarch64-linux-gnu) (push) Failing after 11s
sm-rpc / build (Release, arm-linux-gnueabihf) (push) Failing after 11s
sm-rpc / build (Release, host.gcc) (push) Failing after 12s
sm-rpc / build (Release, mipsel-linux-gnu) (push) Failing after 16s

This commit is contained in:
tqcq
2025-08-22 18:22:57 +08:00
parent 3d395b45f0
commit c68893bace
2331 changed files with 1306786 additions and 103 deletions

12
third_party/spdlog/scripts/ci_setup_clang.sh vendored Executable file
View File

@@ -0,0 +1,12 @@
#!/bin/bash
set -ex
VERSION=$1
apt-get update
apt-get install -y libc++-${VERSION}-dev libc++abi-${VERSION}-dev
if [[ "${VERSION}" -ge 12 ]]; then
apt-get install -y --no-install-recommends libunwind-${VERSION}-dev
fi

17
third_party/spdlog/scripts/extract_version.py vendored Executable file
View File

@@ -0,0 +1,17 @@
#!/usr/bin/env python3
import os
import re
base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
config_h = os.path.join(base_path, 'include', 'spdlog', 'version.h')
data = {'MAJOR': 0, 'MINOR': 0, 'PATCH': 0}
reg = re.compile(r'^\s*#define\s+SPDLOG_VER_([A-Z]+)\s+([0-9]+).*$')
with open(config_h, 'r') as fp:
for l in fp:
m = reg.match(l)
if m:
data[m.group(1)] = int(m.group(2))
print(f"{data['MAJOR']}.{data['MINOR']}.{data['PATCH']}")

19
third_party/spdlog/scripts/format.sh vendored Executable file
View File

@@ -0,0 +1,19 @@
#!/bin/bash
cd "$(dirname "$0")"/..
pwd
find_sources="find include src tests example bench -not ( -path include/spdlog/fmt/bundled -prune ) -type f -name *\.h -o -name *\.cpp"
echo -n "Running dos2unix "
$find_sources | xargs -I {} sh -c "dos2unix '{}' 2>/dev/null; echo -n '.'"
echo
echo -n "Running clang-format "
$find_sources | xargs -I {} sh -c "clang-format -i {}; echo -n '.'"
echo
echo -n "Running cmake-format "
find . -type f -name "CMakeLists.txt" -o -name "*\.cmake"|grep -v bundled|grep -v build|xargs -I {} sh -c "cmake-format --line-width 120 --tab-size 4 --max-subgroups-hwrap 4 -i {}; echo -n '.'"
echo