Skip to content

Commit

Permalink
更新为最新的cmake内容
Browse files Browse the repository at this point in the history
  • Loading branch information
zmoth committed Nov 29, 2023
1 parent 327192e commit 8f5b58b
Show file tree
Hide file tree
Showing 30 changed files with 522 additions and 3,165 deletions.
7 changes: 4 additions & 3 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
BasedOnStyle: Google
IndentWidth: 4
---
Language: Cpp
AccessModifierOffset: -2
AllowShortBlocksOnASingleLine: Empty
Expand All @@ -11,9 +10,11 @@ AllowShortLoopsOnASingleLine: false
BreakBeforeBraces: Mozilla
BreakConstructorInitializers: BeforeComma
BreakInheritanceList: BeforeComma
ColumnLimit: 100
ColumnLimit: 120
DerivePointerAlignment: false
DisableFormat: false
PackConstructorInitializers: NextLine
PointerAlignment: Right
SortIncludes: true
ReflowComments: true # 重排注释
SortIncludes: CaseSensitive
UseTab: Never
69 changes: 69 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
---
Checks: "\
bugprone-*,\
cert-*,\
clang-analyzer-*,\
concurrency-*,\
google-*,\
llvm-*,\
misc-*,\
modernize-*,\
portability-*,\
performance-*,\
readability-*,\
-bugprone-easily-swappable-parameters,\
-bugprone-reserved-identifier,\
-cert-dcl51-cpp,\
-cert-dcl37-c,\
-readability-magic-numbers,\
-readability-identifier-length,\
-readability-implicit-bool-conversion,\
-readability-isolate-declaration,\
-readability-static-accessed-through-instance,\
-readability-redundant-access-specifiers,\
-google-build-using-namespace,\
-google-readability-casting,\
-google-readability-todo,\
-modernize-avoid-c-arrays,\
-modernize-use-trailing-return-type,\
-misc-non-private-member-variables-in-classes,\
-llvm-header-guard\
"
WarningsAsErrors: "-*"
HeaderFilterRegex: '^.*\.hpp$'
FormatStyle: file
AnalyzeTemporaryDtors: false
# check https://clang.llvm.org/extra/clang-tidy/checks/readability/identifier-naming.html
CheckOptions:
- key: readability-identifier-naming.ClassCase
value: CamelCase
- key: readability-identifier-naming.EnumCase
value: CamelCase
- key: readability-identifier-naming.ClassMemberCase
value: lower_case
- key: readability-identifier-naming.FunctionCase
value: lower_case
- key: readability-identifier-naming.ParameterCase
value: lower_case
- key: readability-identifier-naming.VariableCase
value: lower_case
- key: readability-identifier-naming.MethodCase
value: lower_case
- key: readability-identifier-naming.MemberCase
value: lower_case
- key: readability-identifier-naming.PrivateMemberCase
value: lower_case
- key: readability-identifier-naming.MacroDefinitionCase
value: UPPER_CASE
- key: readability-identifier-naming.PublicMemberPrefix
value: ""
- key: readability-identifier-naming.ProtectedMemberPrefix
value: ""
- key: readability-identifier-naming.PrivateMemberPrefix
value: "_"
- key: readability-identifier-naming.PublicMethodPrefix
value: ""
- key: readability-identifier-naming.ProtectedMethodPrefix
value: ""
- key: readability-identifier-naming.PrivateMethodPrefix
value: "_"
59 changes: 0 additions & 59 deletions .cmake-format.yaml

This file was deleted.

31 changes: 31 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# https://editorconfig.org/

root = true

[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 4

[{CMakeLists.*,*.cmake}]
indent_style = space
indent_size = 2

[Makefile]
indent_style = tab

[*.{bat,cmd,cmd.*}]
end_of_line = crlf
indent_style = space
indent_size = 2

[*.{ps1,ps1.*}]
end_of_line = crlf
indent_style = space
indent_size = 4

[*.{md,markdown}]
indent_size = 2
105 changes: 89 additions & 16 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,17 +1,90 @@
*.h text eol=lf
*.hpp text eol=lf
*.cpp text eol=lf
*.c text eol=lf
*.cc text eol=lf

*.in text eol=lf
*.rc text eol=lf
*.qrc text eol=lf
*.ui text eol=lf
*.py text eol=lf
*.cmake text eol=lf
*.sh text eol=lf
*.yml text eol=lf
*.md text eol=lf
*.txt text eol=lf
* text=auto whitespace=trailing-space,space-before-tab,-indent-with-non-tab,tab-in-indent,tabwidth=4

.git* text export-ignore

*.aidl text
*.appxmanifest text
*.bib text
*.c text
*.cl text
*.conf text
*.cpp text
*.css_t text
*.cu text
*.cxx text
*.def text
*.filelist text
*.h text
*.hpp text
*.htm text
*.html text
*.hxx text
*.i text
*.idl text
*.java text
*.js text
*.m text
*.mk text
*.mm text
*.plist text
*.properties text
*.py text
*.qrc text
*.qss text
*.rc text
*.rc.in text
*.S text
*.sbt text
*.scala text
*.sty text
*.tex text
*.txt text
*.xaml text

# reST underlines/overlines can look like conflict markers
*.rst text conflict-marker-size=80
# Markdown heading markers can look like conflict markers
*.md text conflict-marker-size=200

*.cmake text whitespace=tabwidth=2
*.cmakein text whitespace=tabwidth=2
*.in text whitespace=tabwidth=2
CMakeLists.txt text whitespace=tabwidth=2

*.avi binary
*.bmp binary
*.exr binary
*.ico binary
*.jpeg binary
*.jpg binary
*.png binary

*.a binary
*.so binary
*.dll binary
*.jar binary

*.pdf binary
*.pbxproj binary
*.vec binary
*.doc binary
*.dia binary

*.xml -text whitespace=cr-at-eol
*.yml -text whitespace=cr-at-eol
.project -text whitespace=cr-at-eol merge=union
.classpath -text whitespace=cr-at-eol merge=union
.cproject -text whitespace=cr-at-eol merge=union
org.eclipse.jdt.core.prefs -text whitespace=cr-at-eol merge=union

*.bat text eol=crlf
*.cmd text eol=crlf
*.cmd.tmpl text eol=crlf
*.dsp text eol=crlf -whitespace
*.ps1 text eol=crlf
*.ps1.in text eol=crlf
*.sln text eol=crlf -whitespace
*.vcproj text eol=crlf -whitespace merge=union
*.vcxproj text eol=crlf -whitespace merge=union

*.sh text eol=lf
1 change: 0 additions & 1 deletion 3rdparty/.clang-format
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
DisableFormat: true
SortIncludes: false
2 changes: 2 additions & 0 deletions 3rdparty/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# 第三方库 Third-party libraries

用于放置第三方库类
Loading

0 comments on commit 8f5b58b

Please sign in to comment.