Fix spdlog include.

This commit is contained in:
THoehne
2024-09-19 15:41:33 +02:00
parent 2cd51e29ac
commit 44e16fc8fb
197 changed files with 33037 additions and 185 deletions

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

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']}")

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