Skip to content

Commit 30d835a

Browse files
committed
cloop was updated upstream. Merge it here.
Upstream hash: bb120a185357a98b25ef149e63452140015d4e71
1 parent c595cfd commit 30d835a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+2901
-2416
lines changed

extern/cloop/.clang-format

Lines changed: 192 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,192 @@
1+
---
2+
Language: Cpp
3+
# BasedOnStyle: WebKit
4+
AccessModifierOffset: -4
5+
AlignAfterOpenBracket: DontAlign
6+
AlignArrayOfStructures: None
7+
AlignConsecutiveMacros: None
8+
AlignConsecutiveAssignments: None
9+
AlignConsecutiveBitFields: None
10+
AlignConsecutiveDeclarations: None
11+
AlignEscapedNewlines: Right
12+
AlignOperands: DontAlign
13+
AlignTrailingComments: false
14+
AllowAllArgumentsOnNextLine: true
15+
AllowAllParametersOfDeclarationOnNextLine: true
16+
AllowShortEnumsOnASingleLine: true
17+
AllowShortBlocksOnASingleLine: Empty
18+
AllowShortCaseLabelsOnASingleLine: false
19+
AllowShortFunctionsOnASingleLine: Empty
20+
AllowShortLambdasOnASingleLine: All
21+
AllowShortIfStatementsOnASingleLine: Never
22+
AllowShortLoopsOnASingleLine: false
23+
AlwaysBreakAfterDefinitionReturnType: None
24+
AlwaysBreakAfterReturnType: None
25+
AlwaysBreakBeforeMultilineStrings: false
26+
AlwaysBreakTemplateDeclarations: Yes
27+
AttributeMacros:
28+
- __capability
29+
BinPackArguments: true
30+
BinPackParameters: true
31+
BraceWrapping:
32+
AfterCaseLabel: false
33+
AfterClass: false
34+
AfterControlStatement: Never
35+
AfterEnum: false
36+
AfterFunction: true
37+
AfterNamespace: false
38+
AfterObjCDeclaration: false
39+
AfterStruct: false
40+
AfterUnion: false
41+
AfterExternBlock: false
42+
BeforeCatch: false
43+
BeforeElse: false
44+
BeforeLambdaBody: false
45+
BeforeWhile: false
46+
IndentBraces: false
47+
SplitEmptyFunction: true
48+
SplitEmptyRecord: true
49+
SplitEmptyNamespace: true
50+
BreakBeforeBinaryOperators: None
51+
BreakBeforeConceptDeclarations: true
52+
BreakBeforeBraces: Allman
53+
BreakBeforeInheritanceComma: false
54+
BreakInheritanceList: BeforeColon
55+
BreakBeforeTernaryOperators: true
56+
BreakConstructorInitializersBeforeComma: false
57+
BreakConstructorInitializers: BeforeColon
58+
BreakAfterJavaFieldAnnotations: false
59+
BreakStringLiterals: true
60+
ColumnLimit: 120
61+
CommentPragmas: '^ IWYU pragma:'
62+
QualifierAlignment: Leave
63+
CompactNamespaces: false
64+
ConstructorInitializerIndentWidth: 4
65+
ContinuationIndentWidth: 4
66+
Cpp11BracedListStyle: true
67+
DeriveLineEnding: true
68+
DerivePointerAlignment: false
69+
DisableFormat: false
70+
EmptyLineAfterAccessModifier: Never
71+
EmptyLineBeforeAccessModifier: LogicalBlock
72+
ExperimentalAutoDetectBinPacking: false
73+
PackConstructorInitializers: Never
74+
BasedOnStyle: ''
75+
ConstructorInitializerAllOnOneLineOrOnePerLine: false
76+
AllowAllConstructorInitializersOnNextLine: true
77+
FixNamespaceComments: true
78+
ForEachMacros:
79+
- foreach
80+
- Q_FOREACH
81+
- BOOST_FOREACH
82+
IfMacros:
83+
- KJ_IF_MAYBE
84+
IncludeBlocks: Preserve
85+
IncludeCategories:
86+
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
87+
Priority: 2
88+
SortPriority: 0
89+
CaseSensitive: false
90+
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
91+
Priority: 3
92+
SortPriority: 0
93+
CaseSensitive: false
94+
- Regex: '.*'
95+
Priority: 1
96+
SortPriority: 0
97+
CaseSensitive: false
98+
IncludeIsMainRegex: '(Test)?$'
99+
IncludeIsMainSourceRegex: ''
100+
IndentAccessModifiers: false
101+
IndentCaseLabels: true
102+
IndentCaseBlocks: false
103+
IndentGotoLabels: true
104+
IndentPPDirectives: None
105+
IndentExternBlock: AfterExternBlock
106+
IndentRequires: false
107+
IndentWidth: 4
108+
IndentWrappedFunctionNames: false
109+
InsertTrailingCommas: None
110+
JavaScriptQuotes: Leave
111+
JavaScriptWrapImports: true
112+
KeepEmptyLinesAtTheStartOfBlocks: true
113+
LambdaBodyIndentation: Signature
114+
MacroBlockBegin: ''
115+
MacroBlockEnd: ''
116+
MaxEmptyLinesToKeep: 2
117+
NamespaceIndentation: All
118+
ObjCBinPackProtocolList: Auto
119+
ObjCBlockIndentWidth: 4
120+
ObjCBreakBeforeNestedBlockParam: true
121+
ObjCSpaceAfterProperty: true
122+
ObjCSpaceBeforeProtocolList: true
123+
PenaltyBreakAssignment: 2
124+
PenaltyBreakBeforeFirstCallParameter: 19
125+
PenaltyBreakComment: 300
126+
PenaltyBreakFirstLessLess: 120
127+
PenaltyBreakOpenParenthesis: 0
128+
PenaltyBreakString: 1000
129+
PenaltyBreakTemplateDeclaration: 10
130+
PenaltyExcessCharacter: 1000000
131+
PenaltyReturnTypeOnItsOwnLine: 60
132+
PenaltyIndentedWhitespace: 0
133+
PointerAlignment: Left
134+
PPIndentWidth: -1
135+
ReferenceAlignment: Pointer
136+
ReflowComments: true
137+
RemoveBracesLLVM: false
138+
SeparateDefinitionBlocks: Leave
139+
ShortNamespaceLines: 1
140+
SortIncludes: Never
141+
SortJavaStaticImport: Before
142+
SortUsingDeclarations: true
143+
SpaceAfterCStyleCast: true
144+
SpaceAfterLogicalNot: false
145+
SpaceAfterTemplateKeyword: true
146+
SpaceBeforeAssignmentOperators: true
147+
SpaceBeforeCaseColon: false
148+
SpaceBeforeCpp11BracedList: false
149+
SpaceBeforeCtorInitializerColon: true
150+
SpaceBeforeInheritanceColon: true
151+
SpaceBeforeParens: ControlStatements
152+
SpaceBeforeParensOptions:
153+
AfterControlStatements: true
154+
AfterForeachMacros: true
155+
AfterFunctionDefinitionName: false
156+
AfterFunctionDeclarationName: false
157+
AfterIfMacros: true
158+
AfterOverloadedOperator: false
159+
BeforeNonEmptyParentheses: false
160+
SpaceAroundPointerQualifiers: Default
161+
SpaceBeforeRangeBasedForLoopColon: true
162+
SpaceInEmptyBlock: true
163+
SpaceInEmptyParentheses: false
164+
SpacesBeforeTrailingComments: 2
165+
SpacesInAngles: Never
166+
SpacesInConditionalStatement: false
167+
SpacesInContainerLiterals: true
168+
SpacesInCStyleCastParentheses: false
169+
SpacesInLineCommentPrefix:
170+
Minimum: 1
171+
Maximum: -1
172+
SpacesInParentheses: false
173+
SpacesInSquareBrackets: false
174+
SpaceBeforeSquareBrackets: false
175+
BitFieldColonSpacing: Both
176+
Standard: Latest
177+
StatementAttributeLikeMacros:
178+
- Q_EMIT
179+
StatementMacros:
180+
- Q_UNUSED
181+
- QT_REQUIRE_VERSION
182+
TabWidth: 4
183+
UseCRLF: false
184+
UseTab: AlignWithSpaces
185+
WhitespaceSensitiveMacros:
186+
- STRINGIZE
187+
- PP_STRINGIZE
188+
- BOOST_PP_STRINGIZE
189+
- NS_SWIFT_NAME
190+
- CF_SWIFT_NAME
191+
...
192+

extern/cloop/.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
charset = utf-8
3+
insert_final_newline = true
4+
trim_trailing_whitespace = true
5+
6+
[*]
7+
indent_style = tab
8+
indent_size = 4
9+
10+
[*.{yml,json,cfg}]
11+
indent_style = space
12+
indent_size = 2

extern/cloop/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
build
22
output
3+
target
34
*.sdf
45
*.opensdf
56
*.suo
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"configurations": [
3+
{
4+
"name": "Debug",
5+
"includePath": [
6+
"${workspaceFolder}/**"
7+
],
8+
"defines": [],
9+
"compilerPath": "/usr/bin/clang",
10+
"cStandard": "c11",
11+
"cppStandard": "c++20",
12+
"intelliSenseMode": "clang-x64",
13+
"compileCommands": "${workspaceFolder}/build/Debug/compile_commands.json",
14+
"configurationProvider": "ms-vscode.cmake-tools"
15+
}
16+
],
17+
"version": 4
18+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"recommendations": [
3+
"EditorConfig.EditorConfig",
4+
"ms-vscode.cmake-tools",
5+
"xaver.clang-format"
6+
]
7+
}

extern/cloop/.vscode/settings.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"files.exclude": {
3+
"build": true
4+
},
5+
"cmake.sourceDirectory": "${workspaceFolder}",
6+
"cmake.buildDirectory": "${workspaceFolder}/build/${buildType}",
7+
"cmake.generator": "Ninja",
8+
"cmake.configureSettings": {
9+
"CMAKE_VERBOSE_MAKEFILE": "ON",
10+
"CMAKE_BUILD_TYPE": "${buildType}",
11+
"CMAKE_CXX_COMPILER": "${buildKitTriple}"
12+
},
13+
"editor.tabSize": 4,
14+
"[cpp]": {
15+
"editor.formatOnSave": true,
16+
"editor.defaultFormatter": "xaver.clang-format"
17+
}
18+
}

extern/cloop/CMakeLists.txt

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
cmake_minimum_required(VERSION 3.16)
2+
3+
project(cloop LANGUAGES C CXX)
4+
5+
option(CLOOP_BUILD_TESTS "Build the sample test artifacts" ON)
6+
option(CLOOP_WITH_PASCAL "Build Pascal test artifacts using Free Pascal" ON)
7+
8+
set(CMAKE_CXX_STANDARD 20)
9+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
10+
set(CMAKE_C_STANDARD 99)
11+
set(CMAKE_C_STANDARD_REQUIRED ON)
12+
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
13+
14+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
15+
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
16+
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
17+
18+
if(MSVC)
19+
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
20+
endif()
21+
22+
if(APPLE)
23+
set(CMAKE_OSX_DEPLOYMENT_TARGET "15.0" CACHE STRING "" FORCE)
24+
endif()
25+
26+
if(CMAKE_CONFIGURATION_TYPES)
27+
foreach(cfg ${CMAKE_CONFIGURATION_TYPES})
28+
string(TOUPPER "${cfg}" cfg_upper)
29+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_${cfg_upper} ${CMAKE_BINARY_DIR}/bin/${cfg})
30+
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_${cfg_upper} ${CMAKE_BINARY_DIR}/lib/${cfg})
31+
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${cfg_upper} ${CMAKE_BINARY_DIR}/lib/${cfg})
32+
endforeach()
33+
endif()
34+
35+
add_subdirectory(src/cloop)
36+
37+
if(CLOOP_BUILD_TESTS)
38+
add_subdirectory(src/tests/test1)
39+
endif()

0 commit comments

Comments
 (0)