Skip to content

Commit f04bce0

Browse files
committed
First commit.
0 parents  commit f04bce0

22 files changed

Lines changed: 7525 additions & 0 deletions

.clang-format

Lines changed: 1481 additions & 0 deletions
Large diffs are not rendered by default.

.clang-tidy

Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
CheckOptions:
2+
- key: readability-identifier-naming.ClassCase
3+
value: CamelCase
4+
- key: readability-identifier-naming.ParameterCase
5+
value: camelBack
6+
- key: readability-identifier-naming.ClassMethodCase
7+
value: lower_case
8+
- key: readability-identifier-naming.FunctionCase
9+
value: lower_case
10+
- key: readability-identifier-naming.EnumConstantCase
11+
value: CamelCase
12+
- key: readability-identifier-naming.LocalVariableCase
13+
value: camelBack
14+
- key: readability-identifier-naming.PrivateMemberSuffix
15+
value: _
16+
- key: readability-identifier-naming.EnumCase
17+
value: CamelCase
18+
- key: readability-identifier-naming.GlobalVariableCase
19+
value: camelBack
20+
- key: readability-identifier-naming.LocalConstantCase
21+
value: aNy_CasE
22+
- key: readability-identifier-naming.ProtectedMemberSuffix
23+
value: _
24+
- key: readability-identifier-naming.ClassMemberCase
25+
value: camelBack
26+
- key: readability-identifier-naming.MacroDefinitionCase
27+
value: UPPER_CASE
28+
- key: readability-identifier-naming.GlobalVariablePrefix
29+
value: g_
30+
- key: readability-identifier-naming.GlobalConstantCase
31+
value: UPPER_CASE
32+
- key: performance-move-const-arg.CheckTriviallyCopyableMove
33+
value: false
34+
Checks: '-*,
35+
-bugprone-argument-comment,
36+
-bugprone-branch-clone,
37+
-bugprone-exception-escape,
38+
-bugprone-infinite-loop,
39+
-bugprone-lambda-function-name,
40+
-bugprone-macro-parentheses,
41+
-bugprone-narrowing-conversions,
42+
-bugprone-reserved-identifier,
43+
-bugprone-signed-char-misuse,
44+
-bugprone-string-integer-assignment,
45+
-bugprone-suspicious-include,
46+
-bugprone-use-after-move,
47+
-cppcoreguidelines-avoid-c-arrays,
48+
-cppcoreguidelines-avoid-magic-numbers,
49+
-cppcoreguidelines-avoid-non-const-global-variables,
50+
-cppcoreguidelines-explicit-virtual-functions,
51+
-cppcoreguidelines-init-variables,
52+
-cppcoreguidelines-interfaces-global-init,
53+
-cppcoreguidelines-macro-usage,
54+
-cppcoreguidelines-narrowing-conversions,
55+
-cppcoreguidelines-no-malloc,
56+
-cppcoreguidelines-non-private-member-variables-in-classes,
57+
-cppcoreguidelines-owning-memory,
58+
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
59+
-cppcoreguidelines-pro-bounds-constant-array-index,
60+
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
61+
-cppcoreguidelines-pro-type-const-cast,
62+
-cppcoreguidelines-pro-type-cstyle-cast,
63+
-cppcoreguidelines-pro-type-member-init,
64+
-cppcoreguidelines-pro-type-reinterpret-cast,
65+
-cppcoreguidelines-pro-type-static-cast-downcast,
66+
-cppcoreguidelines-pro-type-union-access,
67+
-cppcoreguidelines-pro-type-vararg,
68+
-cppcoreguidelines-special-member-functions,
69+
-fuchsia-statically-constructed-objects,
70+
-llvm-namespace-comment,
71+
-misc-definitions-in-headers,
72+
-modernize-avoid-bind,
73+
-modernize-concat-nested-namespaces,
74+
-modernize-deprecated-headers,
75+
-modernize-loop-convert,
76+
-modernize-make-shared,
77+
-modernize-make-unique,
78+
-modernize-pass-by-value,
79+
-modernize-raw-string-literal,
80+
-modernize-use-auto,
81+
-modernize-use-default-member-init,
82+
-modernize-use-emplace,
83+
-modernize-use-equals-default,
84+
-modernize-use-equals-delete,
85+
-modernize-use-nodiscard,
86+
-modernize-use-nullptr,
87+
-modernize-use-using,
88+
-performance-faster-string-find,
89+
-performance-for-range-copy,
90+
-performance-implicit-conversion-in-loop,
91+
-performance-inefficient-algorithm,
92+
-performance-inefficient-string-concatenation,
93+
-performance-inefficient-vector-operation,
94+
-performance-move-const-arg,
95+
-performance-move-constructor-init,
96+
-performance-no-automatic-move,
97+
-performance-no-int-to-ptr,
98+
-performance-noexcept-move-constructor,
99+
-performance-trivially-destructible,
100+
-performance-type-promotion-in-math-fn,
101+
-performance-unnecessary-copy-initialization,
102+
-performance-unnecessary-value-param,
103+
-portability-restrict-system-includes,
104+
-portability-simd-intrinsics,
105+
-readability-avoid-const-params-in-decls,
106+
-readability-braces-around-statements,
107+
-readability-const-return-type,
108+
-readability-container-size-empty,
109+
-readability-convert-member-functions-to-static,
110+
-readability-deleted-default,
111+
-readability-else-after-return,
112+
-readability-function-cognitive-complexity,
113+
-readability-function-size,
114+
-readability-identifier-naming,
115+
-readability-implicit-bool-conversion,
116+
-readability-inconsistent-declaration-parameter-name,
117+
-readability-isolate-declaration,
118+
-readability-magic-numbers,
119+
-readability-make-member-function-const,
120+
-readability-named-parameter,
121+
-readability-non-const-parameter,
122+
-readability-qualified-auto,
123+
-readability-redundant-access-specifiers,
124+
-readability-redundant-control-flow,
125+
-readability-redundant-declaration,
126+
-readability-redundant-member-init,
127+
-readability-redundant-smartptr-get,
128+
-readability-redundant-string-cstr,
129+
-readability-redundant-string-init,
130+
-readability-simplify-boolean-expr,
131+
-readability-static-accessed-through-instance,
132+
-readability-static-definition-in-anonymous-namespace,
133+
-readability-uppercase-literal-suffix,
134+
-readability-use-anyofallof,
135+
bugprone-branch-clone,
136+
bugprone-infinite-loop,
137+
bugprone-lambda-function-name,
138+
bugprone-macro-parentheses,
139+
bugprone-reserved-identifier,
140+
bugprone-string-integer-assignment,
141+
cppcoreguidelines-init-variables,
142+
cppcoreguidelines-no-malloc,
143+
cppcoreguidelines-pro-type-member-init,
144+
misc-definitions-in-headers,
145+
modernize-concat-nested-namespaces,
146+
modernize-make-shared,
147+
modernize-make-unique,
148+
modernize-pass-by-value,
149+
modernize-use-default-member-init,
150+
modernize-use-emplace,
151+
modernize-use-equals-default,
152+
modernize-use-equals-delete,
153+
modernize-use-using,
154+
llvm-namespace-comment,
155+
performance-faster-string-find,
156+
performance-for-range-copy,
157+
performance-inefficient-algorithm,
158+
performance-move-const-arg,
159+
performance-move-constructor-init,
160+
performance-no-automatic-move,
161+
performance-noexcept-move-constructor,
162+
performance-unnecessary-copy-initialization,
163+
performance-unnecessary-value-param,
164+
readability-avoid-const-params-in-decls,
165+
readability-convert-member-functions-to-static,
166+
readability-const-return-type,
167+
readability-identifier-naming,
168+
readability-inconsistent-declaration-parameter-name,
169+
readability-make-member-function-const,
170+
readability-redundant-declaration,
171+
readability-static-definition-in-anonymous-namespace,
172+
arcadia-typeid-name-restriction,
173+
bugprone-use-after-move,
174+
performance-implicit-conversion-in-loop,
175+
readability-identifier-naming'

.clangd

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
CompileFlags:
2+
Add: [-D_CLANGD=1, /std:c++20]
3+
CompilationDatabase: _build/

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*.{as,cpp,h,hpp,inl,txt}]
4+
charset = utf-8-bom
5+
end_of_line = lf
6+
insert_final_newline = true
7+
indent_style = space
8+
indent_size = 4
9+
trim_trailing_whitespace = true

.gitattributes

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
* text=auto
2+
*.htm text eol=crlf
3+
*.html text eol=crlf
4+
renames.txt text eol=crlf
5+
6+
*.v text eol=lf
7+
*.as text eol=lf
8+
*.cpp text eol=lf
9+
*.h text eol=lf
10+
*.js text eol=lf
11+
12+
*.feature text
13+
*.md text
14+
*.json text eol=lf
15+
16+
*.bat text eol=crlf
17+
*.cmd text eol=crlf
18+
*.ps1 text eol=crlf
19+
20+
*.sh text eol=lf
21+
*.groovy text eol=lf
22+
23+
# Archives
24+
# 1C
25+
*.xml text eol=crlf
26+
27+
*.bsl text eol=crlf
28+
*.os text eol=crlf
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# This starter workflow is for a CMake project running on multiple platforms. There is a different starter workflow if you just want a single platform.
2+
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-single-platform.yml
3+
name: CMake on multiple platforms
4+
5+
on:
6+
push:
7+
branches: [ "main" ]
8+
pull_request:
9+
branches: [ "main" ]
10+
11+
jobs:
12+
build:
13+
runs-on: ${{ matrix.os }}
14+
15+
strategy:
16+
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable.
17+
fail-fast: false
18+
19+
# Set up a matrix to run the following 3 configurations:
20+
# 1. <Windows, Release, latest MSVC compiler toolchain on the default runner image, default generator>
21+
# 2. <Linux, Release, latest GCC compiler toolchain on the default runner image, default generator>
22+
# 3. <Linux, Release, latest Clang compiler toolchain on the default runner image, default generator>
23+
#
24+
# To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list.
25+
matrix:
26+
os: [ubuntu-latest, windows-latest]
27+
build_type: [Release]
28+
c_compiler: [gcc, clang, cl]
29+
include:
30+
- os: windows-latest
31+
c_compiler: cl
32+
cpp_compiler: cl
33+
- os: ubuntu-latest
34+
c_compiler: gcc
35+
cpp_compiler: g++
36+
- os: ubuntu-latest
37+
c_compiler: clang
38+
cpp_compiler: clang++
39+
exclude:
40+
- os: windows-latest
41+
c_compiler: gcc
42+
- os: windows-latest
43+
c_compiler: clang
44+
- os: ubuntu-latest
45+
c_compiler: cl
46+
47+
steps:
48+
- uses: actions/checkout@v4
49+
50+
- name: Set reusable strings
51+
# Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file.
52+
id: strings
53+
shell: bash
54+
run: |
55+
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
56+
57+
- name: Configure CMake
58+
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
59+
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
60+
run: >
61+
cmake -B ${{ steps.strings.outputs.build-output-dir }}
62+
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
63+
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
64+
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
65+
-S ${{ github.workspace }}
66+
67+
- name: Build
68+
# Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
69+
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }}
70+
71+
- name: Test
72+
working-directory: ${{ steps.strings.outputs.build-output-dir }}
73+
# Execute tests defined by the CMake configuration. Note that --build-config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
74+
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
75+
run: ctest --build-config ${{ matrix.build_type }}

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
_build/
2+
build/
3+
out/
4+
!.gitignore
5+
*.ipch
6+
*.VC.*
7+
.vs/
8+
.vscode/
9+
CMakeUserPresets.json

0 commit comments

Comments
 (0)