Skip to content

Commit 8a4bb35

Browse files
committed
repo files
1 parent a878d4d commit 8a4bb35

File tree

4 files changed

+343
-0
lines changed

4 files changed

+343
-0
lines changed

.clang-format

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Generated from CLion C/C++ Code Style settings
2+
BasedOnStyle: LLVM
3+
AccessModifierOffset: -4
4+
AlignAfterOpenBracket: Align
5+
AlignConsecutiveAssignments: None
6+
AlignOperands: Align
7+
AllowAllArgumentsOnNextLine: false
8+
AllowAllConstructorInitializersOnNextLine: false
9+
AllowAllParametersOfDeclarationOnNextLine: false
10+
AllowShortBlocksOnASingleLine: Always
11+
AllowShortCaseLabelsOnASingleLine: false
12+
AllowShortFunctionsOnASingleLine: All
13+
AllowShortIfStatementsOnASingleLine: Always
14+
AllowShortLambdasOnASingleLine: All
15+
AllowShortLoopsOnASingleLine: true
16+
AlwaysBreakAfterReturnType: None
17+
AlwaysBreakTemplateDeclarations: Yes
18+
BreakBeforeBraces: Custom
19+
BraceWrapping:
20+
BeforeLambdaBody: false
21+
AfterCaseLabel: false
22+
AfterClass: true
23+
AfterStruct: true
24+
AfterControlStatement: Always
25+
AfterEnum: true
26+
AfterFunction: true
27+
AfterNamespace: false
28+
AfterUnion: true
29+
BeforeCatch: false
30+
BeforeElse: true
31+
IndentBraces: false
32+
SplitEmptyFunction: false
33+
SplitEmptyRecord: true
34+
BreakBeforeBinaryOperators: None
35+
BreakBeforeTernaryOperators: true
36+
BreakConstructorInitializers: BeforeColon
37+
BreakInheritanceList: BeforeColon
38+
ColumnLimit: 0
39+
CompactNamespaces: false
40+
ContinuationIndentWidth: 8
41+
IndentCaseLabels: true
42+
IndentPPDirectives: None
43+
IndentWidth: 4
44+
KeepEmptyLinesAtTheStartOfBlocks: true
45+
MaxEmptyLinesToKeep: 2
46+
NamespaceIndentation: None
47+
ObjCSpaceAfterProperty: false
48+
ObjCSpaceBeforeProtocolList: true
49+
PointerAlignment: Left
50+
ReferenceAlignment: Left
51+
ReflowComments: false
52+
SpaceAfterCStyleCast: true
53+
SpaceAfterLogicalNot: false
54+
SpaceAfterTemplateKeyword: false
55+
SpaceBeforeAssignmentOperators: true
56+
SpaceBeforeCpp11BracedList: false
57+
SpaceBeforeCtorInitializerColon: true
58+
SpaceBeforeInheritanceColon: true
59+
SpaceBeforeParens: ControlStatements
60+
SpaceBeforeRangeBasedForLoopColon: false
61+
SpaceInEmptyParentheses: false
62+
SpacesBeforeTrailingComments: 0
63+
SpacesInAngles: false
64+
SpacesInCStyleCastParentheses: false
65+
SpacesInContainerLiterals: false
66+
SpacesInParentheses: false
67+
SpacesInSquareBrackets: false
68+
TabWidth: 4
69+
UseTab: Never
70+
InsertNewlineAtEOF: true
71+
SeparateDefinitionBlocks: Leave

.clang-tidy

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
# Generated from CLion Inspection settings
2+
---
3+
Checks: '-*,
4+
bugprone-argument-comment,
5+
bugprone-assert-side-effect,
6+
bugprone-bad-signal-to-kill-thread,
7+
bugprone-branch-clone,
8+
bugprone-copy-constructor-init,
9+
bugprone-dangling-handle,
10+
bugprone-dynamic-static-initializers,
11+
bugprone-fold-init-type,
12+
bugprone-forward-declaration-namespace,
13+
bugprone-forwarding-reference-overload,
14+
bugprone-inaccurate-erase,
15+
bugprone-incorrect-roundings,
16+
bugprone-integer-division,
17+
bugprone-lambda-function-name,
18+
bugprone-macro-parentheses,
19+
bugprone-macro-repeated-side-effects,
20+
bugprone-misplaced-operator-in-strlen-in-alloc,
21+
bugprone-misplaced-pointer-arithmetic-in-alloc,
22+
bugprone-misplaced-widening-cast,
23+
bugprone-move-forwarding-reference,
24+
bugprone-multiple-statement-macro,
25+
bugprone-no-escape,
26+
bugprone-not-null-terminated-result,
27+
bugprone-parent-virtual-call,
28+
bugprone-posix-return,
29+
bugprone-reserved-identifier,
30+
bugprone-sizeof-container,
31+
bugprone-sizeof-expression,
32+
bugprone-spuriously-wake-up-functions,
33+
bugprone-string-constructor,
34+
bugprone-string-integer-assignment,
35+
bugprone-string-literal-with-embedded-nul,
36+
bugprone-suspicious-enum-usage,
37+
bugprone-suspicious-include,
38+
bugprone-suspicious-memset-usage,
39+
bugprone-suspicious-missing-comma,
40+
bugprone-suspicious-semicolon,
41+
bugprone-suspicious-string-compare,
42+
bugprone-suspicious-memory-comparison,
43+
bugprone-suspicious-realloc-usage,
44+
bugprone-swapped-arguments,
45+
bugprone-terminating-continue,
46+
bugprone-throw-keyword-missing,
47+
bugprone-too-small-loop-variable,
48+
bugprone-undefined-memory-manipulation,
49+
bugprone-undelegated-constructor,
50+
bugprone-unhandled-self-assignment,
51+
bugprone-unused-raii,
52+
bugprone-unused-return-value,
53+
bugprone-use-after-move,
54+
bugprone-virtual-near-miss,
55+
cert-dcl21-cpp,
56+
cert-dcl58-cpp,
57+
cert-err34-c,
58+
cert-err52-cpp,
59+
cert-err60-cpp,
60+
cert-flp30-c,
61+
cert-msc50-cpp,
62+
cert-msc51-cpp,
63+
cert-str34-c,
64+
cppcoreguidelines-interfaces-global-init,
65+
cppcoreguidelines-narrowing-conversions,
66+
cppcoreguidelines-pro-type-member-init,
67+
cppcoreguidelines-pro-type-static-cast-downcast,
68+
cppcoreguidelines-slicing,
69+
google-default-arguments,
70+
google-explicit-constructor,
71+
google-runtime-operator,
72+
hicpp-exception-baseclass,
73+
hicpp-multiway-paths-covered,
74+
misc-misplaced-const,
75+
misc-new-delete-overloads,
76+
misc-no-recursion,
77+
misc-non-copyable-objects,
78+
misc-throw-by-value-catch-by-reference,
79+
misc-unconventional-assign-operator,
80+
misc-uniqueptr-reset-release,
81+
modernize-avoid-bind,
82+
modernize-concat-nested-namespaces,
83+
modernize-deprecated-headers,
84+
modernize-deprecated-ios-base-aliases,
85+
modernize-loop-convert,
86+
modernize-make-shared,
87+
modernize-make-unique,
88+
modernize-pass-by-value,
89+
modernize-raw-string-literal,
90+
modernize-redundant-void-arg,
91+
modernize-replace-auto-ptr,
92+
modernize-replace-disallow-copy-and-assign-macro,
93+
modernize-replace-random-shuffle,
94+
modernize-return-braced-init-list,
95+
modernize-shrink-to-fit,
96+
modernize-unary-static-assert,
97+
modernize-use-auto,
98+
modernize-use-bool-literals,
99+
modernize-use-emplace,
100+
modernize-use-equals-default,
101+
modernize-use-equals-delete,
102+
modernize-use-nodiscard,
103+
modernize-use-noexcept,
104+
modernize-use-nullptr,
105+
modernize-use-override,
106+
modernize-use-transparent-functors,
107+
modernize-use-uncaught-exceptions,
108+
mpi-buffer-deref,
109+
mpi-type-mismatch,
110+
openmp-use-default-none,
111+
performance-faster-string-find,
112+
performance-for-range-copy,
113+
performance-implicit-conversion-in-loop,
114+
performance-inefficient-algorithm,
115+
performance-inefficient-string-concatenation,
116+
performance-inefficient-vector-operation,
117+
performance-move-const-arg,
118+
performance-move-constructor-init,
119+
performance-no-automatic-move,
120+
performance-noexcept-move-constructor,
121+
performance-trivially-destructible,
122+
performance-type-promotion-in-math-fn,
123+
performance-unnecessary-copy-initialization,
124+
performance-unnecessary-value-param,
125+
portability-simd-intrinsics,
126+
readability-avoid-const-params-in-decls,
127+
readability-const-return-type,
128+
readability-container-size-empty,
129+
readability-convert-member-functions-to-static,
130+
readability-delete-null-pointer,
131+
readability-deleted-default,
132+
readability-inconsistent-declaration-parameter-name,
133+
readability-make-member-function-const,
134+
readability-misleading-indentation,
135+
readability-misplaced-array-index,
136+
readability-non-const-parameter,
137+
readability-redundant-control-flow,
138+
readability-redundant-declaration,
139+
readability-redundant-function-ptr-dereference,
140+
readability-redundant-smartptr-get,
141+
readability-redundant-string-cstr,
142+
readability-redundant-string-init,
143+
readability-simplify-subscript-expr,
144+
readability-static-accessed-through-instance,
145+
readability-static-definition-in-anonymous-namespace,
146+
readability-string-compare,
147+
readability-uniqueptr-delete-release,
148+
readability-use-anyofallof'
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: ci
2+
on:
3+
pull_request:
4+
push:
5+
branches:
6+
- master
7+
env:
8+
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
9+
BUILD_TYPE: Release
10+
11+
jobs:
12+
Build:
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
include:
18+
- os: windows-latest
19+
generator: Ninja
20+
compiler: msvc
21+
- os: ubuntu-latest
22+
generator: Ninja
23+
compiler: g++
24+
# - os: ubuntu-latest
25+
# generator: Ninja
26+
# compiler: em++
27+
steps:
28+
- uses: actions/[email protected]
29+
- uses: ilammy/[email protected]
30+
31+
- name: Setup Linux
32+
if: matrix.os == 'ubuntu-latest'
33+
run: |
34+
sudo apt-get update -y
35+
sudo apt-get install ninja-build libgl1-mesa-dev libegl1-mesa-dev xorg-dev libglu1-mesa-dev
36+
37+
- name: Setup emsdk
38+
if: matrix.compiler == 'em++'
39+
uses: mymindstorm/setup-emsdk@v14
40+
with:
41+
# Make sure to set a version number!
42+
version: 3.1.51
43+
# This is the name of the cache folder.
44+
# The cache folder will be placed in the build directory,
45+
# so make sure it doesn't conflict with anything!
46+
actions-cache-folder: 'emsdk-cache'
47+
48+
- name: Verify emsdk
49+
if: matrix.compiler == 'em++'
50+
run: emcc -v
51+
52+
- name: Set up cache
53+
uses: actions/[email protected]
54+
with:
55+
path: |
56+
~/cpm-cache
57+
key: ${{ runner.os }}-cpm-${{ hashFiles('**/') }}
58+
restore-keys: |
59+
${{ runner.os }}-cpm-
60+
61+
62+
- name: Configure CMake
63+
if: matrix.compiler != 'em++'
64+
run: |
65+
cmake -DCPM_SOURCE_CACHE=~/cpm-cache -S . -B ./build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -G "Ninja"
66+
67+
- name: Configure Emscripten CMake
68+
if: matrix.compiler == 'em++'
69+
run: |
70+
emcmake cmake -DCPM_SOURCE_CACHE=~/cpm-cache -S . -B ./build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -G "Ninja"
71+
72+
- name: Build CMake
73+
# Execute the build. You can specify a specific target with "--target <NAME>"
74+
run: |
75+
cmake --build ./build -j 14
76+
77+
#- name: Test
78+
# working-directory: ${{github.workspace}}/build
79+
# # Execute tests defined by the CMake configuration.
80+
# # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
81+
# run: ctest -C ${{env.BUILD_TYPE}}

.gitignore

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Prerequisites
2+
*.d
3+
4+
# Compiled Object files
5+
*.slo
6+
*.lo
7+
*.o
8+
9+
# Precompiled Headers
10+
*.gch
11+
*.pch
12+
13+
# Compiled Dynamic libraries
14+
*.so
15+
*.dylib
16+
*.dll
17+
18+
# Fortran module files
19+
*.mod
20+
*.smod
21+
22+
# Compiled Static libraries
23+
*.lai
24+
*.la
25+
*.a
26+
*.lib
27+
28+
# Executables
29+
*.exe
30+
*.out
31+
*.app
32+
33+
# Project exclude paths
34+
/cmake-build-debug/
35+
.idea/
36+
37+
# Build files
38+
build-debug
39+
build-release
40+
out
41+
42+
# CMake files
43+
CMakeUserPresets.json

0 commit comments

Comments
 (0)