Skip to content

Commit b93815a

Browse files
committed
upgrade to use latest small_vectors v3.1.0
1 parent ecc061c commit b93815a

17 files changed

+5175
-4923
lines changed

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cmake_minimum_required(VERSION 3.23)
22

33
project(stralgo
4-
VERSION 1.1.3
4+
VERSION 1.2.0
55
LANGUAGES CXX
66
HOMEPAGE_URL "https://github.com/arturbac/stralgo"
77
)
@@ -36,7 +36,7 @@ CPMAddPackage(
3636
CPMAddPackage(
3737
small_vectors
3838
GITHUB_REPOSITORY arturbac/small_vectors
39-
GIT_TAG v2.1.0
39+
GIT_TAG v3.1.0
4040
OPTIONS "SMALL_VECTORS_ENABLE_UNIT_TESTS=${STRALGO_ENABLE_UNIT_TESTS}"
4141
)
4242
#----------------------------------------------------------------
@@ -45,7 +45,7 @@ CPMAddPackage(
4545
CPMAddPackage(
4646
ut
4747
GITHUB_REPOSITORY boost-ext/ut
48-
GIT_TAG v1.1.9
48+
GIT_TAG v2.0.1
4949
)
5050

5151
if(NOT DEFINED CMAKE_CXX_STANDARD OR CMAKE_CXX_STANDARD LESS 20 )

format_sources.sh

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#!/bin/bash
2+
3+
# Define directories to skip
4+
SKIP_DIRS=("build" "cmake")
5+
6+
# Function to check if directory should be skipped
7+
should_skip() {
8+
for dir in "${SKIP_DIRS[@]}"; do
9+
if [[ "$1" == *"/$dir/"* ]]; then
10+
return 0 # 0 means true in bash, so skip
11+
fi
12+
done
13+
return 1 # 1 means false in bash, so don't skip
14+
}
15+
16+
# Main loop to find and format files
17+
find . -type f \( -iname \*.h -o -iname \*.hpp -o -iname \*.cc -o -iname \*.c -o -iname \*.cpp \) | while read -r file; do
18+
if should_skip "$file"; then
19+
# echo "Skipping $file"
20+
continue
21+
fi
22+
23+
# Create a temporary file to store the original content
24+
temp_file=$(mktemp)
25+
cp "$file" "$temp_file"
26+
27+
# Format the file
28+
clang-format -i "$file"
29+
30+
# Check if the file was changed by comparing it to the temporary file
31+
if ! cmp -s "$file" "$temp_file"; then
32+
echo "Formatted $file"
33+
# else
34+
# echo "$file unchanged."
35+
fi
36+
37+
# Clean up the temporary file
38+
rm "$temp_file"
39+
done
40+
41+
echo "Formatting complete."

0 commit comments

Comments
 (0)