Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
4f606cf
ci: Remove temporary workflow file
FrozenLemonTee Oct 4, 2025
e5d2675
ci: Change branch to normal
FrozenLemonTee Oct 4, 2025
0028a92
ci: Set default build type to release
FrozenLemonTee Oct 4, 2025
7b4b057
Merge pull request #16 from FrozenLemonTee/pre-0.1.5
FrozenLemonTee Oct 4, 2025
6e85f2b
ci: Fix doc update logic
FrozenLemonTee Oct 4, 2025
82e7d9d
ci: Add workflow trigger conditions
FrozenLemonTee Oct 5, 2025
3b05054
ci: Show test details
FrozenLemonTee Oct 5, 2025
7720132
ci: Add trigger condition
FrozenLemonTee Oct 5, 2025
aff7233
feat: Add conversion method to DWORD milliseconds
FrozenLemonTee Oct 8, 2025
8af067b
chore: Add more excluded directories
FrozenLemonTee Oct 8, 2025
0ef54e0
refactor: Optimize precompiled macro code blocks
FrozenLemonTee Oct 8, 2025
3b4bf1a
chore: Add platform setting for Visual Studio generator
FrozenLemonTee Oct 8, 2025
1d241e8
feat: Add wThread for msvc
FrozenLemonTee Oct 8, 2025
b503fbd
feat: Add wMutex for msvc
FrozenLemonTee Oct 8, 2025
5696ddf
feat: Add wCondition for msvc
FrozenLemonTee Oct 8, 2025
f89315f
refactor: Add missing platform marcos definitions
FrozenLemonTee Oct 8, 2025
9884d41
refactor: Add missing template arg for msvc
FrozenLemonTee Oct 8, 2025
05ec5cb
refactor: Use correct header to avoid architecture not defined error
FrozenLemonTee Oct 8, 2025
f8698c5
feat: Add declaration of atomic for msvc
FrozenLemonTee Oct 8, 2025
e087325
feat: Add condition tool some
FrozenLemonTee Oct 9, 2025
a555bf4
feat: Add impl of atomicImpl<false> for msvc
FrozenLemonTee Oct 9, 2025
26065a9
feat: Add alias some_t for some::type
FrozenLemonTee Oct 9, 2025
8196d1b
feat: Add impl of atomicImpl<true> for msvc
FrozenLemonTee Oct 9, 2025
61a7ee7
test: Enable big object test
FrozenLemonTee Oct 10, 2025
cf476e8
refactor: Rename to maximum
FrozenLemonTee Oct 10, 2025
1d14a42
refactor: Rename to minimum
FrozenLemonTee Oct 10, 2025
759666f
refactor: Use parentheses to avoid symbol conflicts
FrozenLemonTee Oct 10, 2025
89f4999
refactor: Use cross-platform wrapper
FrozenLemonTee Oct 10, 2025
9139174
refactor: Add or remove keywords
FrozenLemonTee Oct 10, 2025
8957956
fix: Use atomicCastBack and atomicCastTo to ensure correct conversion
FrozenLemonTee Oct 10, 2025
7bb1124
fix: Correct function signature
FrozenLemonTee Oct 10, 2025
53c432e
fix: Fix headers containing order
FrozenLemonTee Oct 10, 2025
35785ff
fix: Use full namespace
FrozenLemonTee Oct 10, 2025
51ed749
feat: Impl time::point::now for msvc
FrozenLemonTee Oct 10, 2025
3836ccb
feat: Add cross-platform wrapper for mutex.h and condition.h
FrozenLemonTee Oct 10, 2025
ee7b93a
fix: Align feature of wMutex to pMutex
FrozenLemonTee Oct 10, 2025
d747e40
fix: Fix access control permission issues
FrozenLemonTee Oct 10, 2025
937cc0b
fix: Fix template mismatch issue
FrozenLemonTee Oct 10, 2025
32c28f9
refactor: Change destructors to virtual function
FrozenLemonTee Oct 10, 2025
5947cec
fix: Fix headers containing order
FrozenLemonTee Oct 10, 2025
5fb9a82
fix: Fix API and logic of wThread
FrozenLemonTee Oct 10, 2025
2ac0072
refactor: Rename to null
FrozenLemonTee Oct 10, 2025
acb8481
fix: Fix initialization order
FrozenLemonTee Oct 10, 2025
3ac8508
refactor: Use parentheses to avoid symbol conflicts
FrozenLemonTee Oct 10, 2025
84c348a
refactor: Use std::rethrow_exception
FrozenLemonTee Oct 10, 2025
7bcd081
fix: Fix comparison logic
FrozenLemonTee Oct 10, 2025
f3bbf69
fix: Use cross-platform wrapper
FrozenLemonTee Oct 10, 2025
427bd2a
fix: Fix test assertion statements
FrozenLemonTee Oct 10, 2025
71a9eee
refactor: Add qualifiers
FrozenLemonTee Oct 10, 2025
c69c9a4
fix: Add missing header
FrozenLemonTee Oct 10, 2025
6cfb3cc
fix: Fix the definition method of callable objects
FrozenLemonTee Oct 10, 2025
45e56d1
fix: Fix the test logic of SharedFutureVoidWaitFor
FrozenLemonTee Oct 10, 2025
a1dfb3a
fix: Correct platform logic
FrozenLemonTee Oct 10, 2025
2c4c2c2
refactor: Using thread::sleep
FrozenLemonTee Oct 10, 2025
cae3249
refactor: Using compile-time type detection
FrozenLemonTee Oct 10, 2025
5b209c8
refactor: Using const lvalue reference
FrozenLemonTee Oct 10, 2025
9b0cc03
refactor: Using const lvalue reference
FrozenLemonTee Oct 10, 2025
a049e73
refactor: Adjust the initialization sequence
FrozenLemonTee Oct 10, 2025
97fb392
chore: Add MVP gdb formatter scripts
FrozenLemonTee Oct 11, 2025
dcb68f2
chore: Add new exclusive directories
FrozenLemonTee Oct 11, 2025
4371ffe
chore: Extract testing config
FrozenLemonTee Oct 11, 2025
30362a9
chore: Add all clion build directories to exclusive list
FrozenLemonTee Oct 13, 2025
cadc4e7
chore: Add register logic for all printers
FrozenLemonTee Oct 13, 2025
bda8cca
chore: Add auto-load permissions for setting up GDB
FrozenLemonTee Oct 13, 2025
404ff42
chore: Add pretty printers for auto pointers, couple and tuple
FrozenLemonTee Oct 13, 2025
df75c24
chore: Add all clion tmp directories to exclusive list
FrozenLemonTee Oct 13, 2025
58631dc
feat: Add helper functions in utils.py
FrozenLemonTee Oct 13, 2025
6f58f89
refactor: Remove redundant info
FrozenLemonTee Oct 13, 2025
a4918dc
refactor: Use helpers in utils.py
FrozenLemonTee Oct 13, 2025
95a06d4
fix: Fix show bugs in printer of autoPtr
FrozenLemonTee Oct 13, 2025
34fe818
feat: Add pretty printer for serial containers and container adaptors
FrozenLemonTee Oct 13, 2025
475f349
feat: Add helper to print address
FrozenLemonTee Oct 14, 2025
2a2bb28
refactor: Show more info in to_string
FrozenLemonTee Oct 14, 2025
24718d9
refactor: Optimize the output of the children method
FrozenLemonTee Oct 14, 2025
5f4de23
feat: Add printer for hashSet and hashMap
FrozenLemonTee Oct 14, 2025
dac53a7
fix: Properly handle reference types
FrozenLemonTee Oct 14, 2025
9f6df6b
feat: Add pretty format for treeSet and treeMap
FrozenLemonTee Oct 14, 2025
3279236
refactor: Optimize the output of the children/to_string methods
FrozenLemonTee Oct 14, 2025
3ed6372
fix: Fix the issue where ctest cannot find the tests
FrozenLemonTee Oct 14, 2025
21a8f0a
fix: Add missing headers
FrozenLemonTee Oct 14, 2025
63fdd4c
refactor: Change trigger condition of ci test
FrozenLemonTee Oct 14, 2025
8782f52
refactor: Add compiler version min require
FrozenLemonTee Oct 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gdbinit
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
python
import sys
import os
sys.path.insert(0, os.path.join(os.getcwd(), 'debug'))
import gdbinit
print("GDB pretty-printer for original initialized.")
end
2 changes: 1 addition & 1 deletion .github/workflows/basic-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
name: Test Branch CI - Basic Tests

on:
push:
pull_request:
branches: [ test ]

jobs:
Expand Down
116 changes: 0 additions & 116 deletions .github/workflows/deploy-docs-existing-tags.yml

This file was deleted.

3 changes: 2 additions & 1 deletion .github/workflows/deploy-docs-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ name: Deploy Documentation - Latest

on:
push:
branches: [ master ] # Temporary change from test to master to avoid concurrency push
branches: [ test ]

jobs:
build-and-deploy:
if: github.repository == 'FrozenLemonTee/original'
runs-on: ubuntu-latest

steps:
Expand Down
44 changes: 39 additions & 5 deletions .github/workflows/deploy-docs-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ name: Deploy Documentation - Stable
on:
push:
branches: [ master ]
tags:
- 'v*.*.*'

jobs:
build-and-deploy:
if: github.repository == 'FrozenLemonTee/original'
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -45,7 +48,7 @@ jobs:
echo '<body>' >> ../original_docs/docs/html/version.html
echo ' <h1>Documentation Version</h1>' >> ../original_docs/docs/html/version.html
echo ' <p>Version: stable</p>' >> ../original_docs/docs/html/version.html
echo ' <p>Branch: master</p>' >> index.html
echo ' <p>Branch: master</p>' >> ../original_docs/docs/html/version.html
echo " <p>Build Date: $(date -u)</p>" >> ../original_docs/docs/html/version.html
echo " <p>Commit: ${{ github.sha }}</p>" >> ../original_docs/docs/html/version.html
echo '</body>' >> ../original_docs/docs/html/version.html
Expand All @@ -64,12 +67,12 @@ jobs:

cd deploy-repo

# Only update stable directory
# Update stable directory
rm -rf stable
mkdir -p stable
cp -r ../../original_docs/docs/html/* stable/

# Create index.html redirection
# Regenerate the main index.html to include the latest tag version
echo '<!DOCTYPE html>' > index.html
echo '<html>' >> index.html
echo '<head>' >> index.html
Expand All @@ -82,16 +85,47 @@ jobs:
echo ' <li><a href="stable/index.html">Stable (master branch)</a></li>' >> index.html
echo ' <li><a href="latest/index.html">Latest (test branch)</a></li>' >> index.html
echo ' <li><a href="versions/">Tag versions</a></li>' >> index.html
echo ' </ul>' >> index.html
echo ' <p>Recent tag versions:</p>' >> index.html
echo ' <ul>' >> index.html

# Regenerate the list of recent tag versions (last 5)
for dir in $(ls -1 versions/ 2>/dev/null | grep -E '^[0-9]+\.[0-9]+\.[0-9]+$' | sort -V -r | head -5); do
echo " <li><a href=\"versions/$dir/index.html\">Version $dir</a></li>" >> index.html
done

echo ' </ul>' >> index.html
echo '</body>' >> index.html
echo '</html>' >> index.html

# Also update versions/index.html to ensure that the list of all versions is up to date
echo '<!DOCTYPE html>' > versions/index.html
echo '<html>' >> versions/index.html
echo '<head>' >> versions/index.html
echo ' <title>Versioned Documentation</title>' >> versions/index.html
echo '</head>' >> versions/index.html
echo '<body>' >> versions/index.html
echo ' <h1>Versioned Documentation</h1>' >> versions/index.html
echo ' <p>Select a version:</p>' >> versions/index.html
echo ' <ul>' >> versions/index.html

# List all versions (from newest to oldest)
for dir in $(ls -1 versions/ 2>/dev/null | grep -E '^[0-9]+\.[0-9]+\.[0-9]+$' | sort -V -r); do
echo " <li><a href=\"$dir/index.html\">Version $dir</a></li>" >> versions/index.html
done

echo ' </ul>' >> versions/index.html
echo ' <p><a href="../stable/index.html">Stable (master branch)</a></p>' >> versions/index.html
echo ' <p><a href="../latest/index.html">Latest (test branch)</a></p>' >> versions/index.html
echo '</body>' >> versions/index.html
echo '</html>' >> versions/index.html

# Submit and push
git add .
if git diff-index --quiet HEAD --; then
echo "No changes to deploy"
else
git commit -m "Deploy ${{ steps.version.outputs.docs-version }} documentation from ${{ github.sha }}"
git commit -m "Deploy stable documentation from ${{ github.sha }} and update version lists"
git push origin master
echo "✅ Stable documentation deployed successfully"
echo "✅ Stable documentation deployed successfully with updated version lists"
fi
1 change: 1 addition & 0 deletions .github/workflows/deploy-docs-tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:

jobs:
build-and-deploy:
if: github.repository == 'FrozenLemonTee/original'
runs-on: ubuntu-latest

steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/full-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:

- name: Run tests
run: |
cd build && ctest --output-on-failure
cd build && ctest --verbose --output-on-failure

windows-tests:
runs-on: windows-latest
Expand All @@ -75,4 +75,4 @@ jobs:

- name: Run tests
run: |
cd build && ctest -C ${{ matrix.build_type }} --output-on-failure
cd build && ctest --verbose -C ${{ matrix.build_type }} --output-on-failure
15 changes: 9 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
cmake-build-debug/
.idea/
test.exe
original.zip
original.rar
cmake-build-*/
**/.idea/
build/
install/
.vs/
.vscode/
out/
original/
original/
**/__pycache__/

test.exe
original.zip
original.rar
58 changes: 41 additions & 17 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,48 @@
# CMakeLists.txt Main

cmake_minimum_required(VERSION 3.31)
if(CMAKE_GENERATOR MATCHES "Visual Studio" OR CMAKE_GENERATOR MATCHES "Ninja Multi-Config")
set(CMAKE_GENERATOR_PLATFORM x64 CACHE STRING "Platform" FORCE)
endif()
project(original LANGUAGES CXX)
set(ORIGINAL_VERSION 0.1.5)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_CXX_EXTENSIONS OFF)

if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13.0)
message(FATAL_ERROR "GCC version too old. Minimum required: 13.0. Current: ${CMAKE_CXX_COMPILER_VERSION}")
else()
message(STATUS "GCC version: ${CMAKE_CXX_COMPILER_VERSION} (>= 13.0 ✓)")
endif()
endif()

if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 20.0)
message(FATAL_ERROR "Clang version too old. Minimum required: 20.0. Current: ${CMAKE_CXX_COMPILER_VERSION}")
else()
message(STATUS "Clang version: ${CMAKE_CXX_COMPILER_VERSION} (>= 20.0 ✓)")
endif()
endif()
if(MSVC)
if(MSVC_VERSION LESS 1944)
message(FATAL_ERROR "MSVC version too old. Minimum required: 14.44.35207 (VS2022 17.10+). Current: ${MSVC_VERSION}")
else()
message(STATUS "MSVC version: ${MSVC_VERSION} (>= 14.44 ✓)")
endif()
set(CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION "10.0" CACHE STRING "Windows Target Platform Version")
endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
include(CheckCXXCompilerFlag)
check_cxx_compiler_flag("-std=c++23" HAS_CXX23_FLAG)
if(NOT HAS_CXX23_FLAG)
message(WARNING "Compiler may not fully support C++23 standard")
endif()
endif()

if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Debug CACHE STRING "Build type (default Debug)" FORCE)
set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type (default Release)" FORCE)
endif()

include(CMakePackageConfigHelpers)
Expand Down Expand Up @@ -69,24 +105,12 @@ install(FILES
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/original
)

add_subdirectory(debug)

option(BUILD_TESTING "Build the testing directories" ON)

if (BUILD_TESTING)
include(CTest)
if(MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zi")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Zi")
else()
if (NOT CMAKE_SYSTEM_NAME STREQUAL "Windows")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -g")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address -g")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g")
endif()
endif()

# test cases
add_subdirectory(test/other)
add_subdirectory(test/unit_test)
enable_testing()
add_subdirectory(test)
endif ()
Loading