Skip to content

Commit 2abda4e

Browse files
committed
Much nicer python interface and improved error messages
1 parent 681640f commit 2abda4e

23 files changed

+1301
-832
lines changed

.clang-format

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
---
2+
AlignAfterOpenBracket: Align
3+
AlignConsecutiveMacros: 'true'
4+
AlignConsecutiveAssignments: 'true'
5+
AlignConsecutiveDeclarations: 'false'
6+
AlignEscapedNewlines: Right
7+
AlignOperands: 'true'
8+
AlignTrailingComments: 'true'
9+
AllowAllArgumentsOnNextLine: 'true'
10+
AllowAllConstructorInitializersOnNextLine: 'true'
11+
AllowAllParametersOfDeclarationOnNextLine: 'true'
12+
AllowShortBlocksOnASingleLine: 'true'
13+
AllowShortCaseLabelsOnASingleLine: 'true'
14+
AllowShortFunctionsOnASingleLine: All
15+
AllowShortIfStatementsOnASingleLine: WithoutElse
16+
AllowShortLambdasOnASingleLine: All
17+
AllowShortLoopsOnASingleLine: 'true'
18+
AlwaysBreakAfterDefinitionReturnType: None
19+
AlwaysBreakAfterReturnType: None
20+
AlwaysBreakBeforeMultilineStrings: 'true'
21+
AlwaysBreakTemplateDeclarations: 'Yes'
22+
BinPackArguments: 'false'
23+
BinPackParameters: 'true'
24+
BreakBeforeBinaryOperators: None
25+
BreakBeforeBraces: Attach
26+
BreakBeforeTernaryOperators: 'true'
27+
BreakConstructorInitializers: AfterColon
28+
BreakInheritanceList: BeforeColon
29+
BreakStringLiterals: 'true'
30+
ColumnLimit: '100'
31+
CompactNamespaces: 'true'
32+
ConstructorInitializerAllOnOneLineOrOnePerLine: 'false'
33+
ConstructorInitializerIndentWidth: '8'
34+
ContinuationIndentWidth: '2'
35+
Cpp11BracedListStyle: 'true'
36+
DerivePointerAlignment: 'false'
37+
DisableFormat: 'false'
38+
FixNamespaceComments: 'true'
39+
IncludeBlocks: Merge
40+
IndentCaseLabels: 'true'
41+
IndentPPDirectives: AfterHash
42+
IndentWidth: '4'
43+
IndentWrappedFunctionNames: 'false'
44+
KeepEmptyLinesAtTheStartOfBlocks: 'false'
45+
Language: Cpp
46+
MaxEmptyLinesToKeep: '1'
47+
NamespaceIndentation: All
48+
PointerAlignment: Right
49+
SortIncludes: 'false'
50+
SortUsingDeclarations: 'true'
51+
SpaceAfterCStyleCast: 'false'
52+
SpaceAfterLogicalNot: 'false'
53+
SpaceAfterTemplateKeyword: 'false'
54+
SpaceBeforeAssignmentOperators: 'true'
55+
SpaceBeforeCpp11BracedList: 'true'
56+
SpaceBeforeCtorInitializerColon: 'true'
57+
SpaceBeforeInheritanceColon: 'true'
58+
SpaceBeforeParens: ControlStatements
59+
SpaceBeforeRangeBasedForLoopColon: 'true'
60+
SpaceInEmptyParentheses: 'false'
61+
SpacesBeforeTrailingComments: '1'
62+
SpacesInAngles: 'false'
63+
SpacesInCStyleCastParentheses: 'false'
64+
SpacesInContainerLiterals: 'false'
65+
SpacesInParentheses: 'false'
66+
SpacesInSquareBrackets: 'false'
67+
Standard: Cpp11
68+
TabWidth: '4'
69+
UseTab: Always
70+
AccessModifierOffset: -4
71+
...

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ file(GLOB_RECURSE LIBRAPID_SOURCES
8787
if (${SKBUILD})
8888
message(STATUS "[ LIBRAPID ] Building for Python")
8989
set(module_name "_librapid")
90-
9190
set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build shared libraries" FORCE)
9291
set(LIBRAPID_QUIET ON) # Disable warnings for a cleaner output.
9392

@@ -163,6 +162,7 @@ if (${SKBUILD})
163162
${PYTHON_SOURCES}
164163
)
165164

165+
target_compile_definitions(${module_name} PUBLIC LIBRAPID_PYTHON)
166166
install(TARGETS ${module_name} DESTINATION .)
167167
else()
168168
set(module_name "librapid")

0 commit comments

Comments
 (0)