Skip to content
Snippets Groups Projects
Commit e708edd6 authored by René Fritze's avatar René Fritze
Browse files

[cmake] adds clang-format infrastructre + format file from dune-multiscale

parent 72dd78fa
No related branches found
No related tags found
No related merge requests found
# http://llvm.org/releases/3.7.0/tools/clang/docs/ClangFormatStyleOptions.html ---
AlignAfterOpenBracket: true # BasedOnStyle: LLVM
AlignConsecutiveAssignments: true AccessModifierOffset: -2
ConstructorInitializerIndentWidth: 2
AlignEscapedNewlinesLeft: false AlignEscapedNewlinesLeft: false
AlignOperands: true AlignTrailingComments: true
AlignTrailingComments: false
AllowAllParametersOfDeclarationOnNextLine: true AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Empty
AllowShortIfStatementsOnASingleLine: false AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: true AlwaysBreakTemplateDeclarations: true
BasedOnStyle: Mozilla AlwaysBreakBeforeMultilineStrings: false
BinPackArguments: false BreakBeforeBinaryOperators: false
BinPackParameters: true # this applies to template arguments, function arguments and typedefs, so we cannot set this to false (very much unfortunately)!
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeBraces: Mozilla
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: true BreakConstructorInitializersBeforeComma: true
ColumnLimit: 120 BinPackParameters: true
ColumnLimit: 120
ConstructorInitializerAllOnOneLineOrOnePerLine: false ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 2 DerivePointerBinding: false
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: false
ExperimentalAutoDetectBinPacking: false ExperimentalAutoDetectBinPacking: false
IndentCaseLabels: true IndentCaseLabels: true
IndentWidth: 2 MaxEmptyLinesToKeep: 1
IndentWrappedFunctionNames: false
KeepEmptyLinesAtTheStartOfBlocks: true
Language: Cpp
MaxEmptyLinesToKeep: 2
NamespaceIndentation: None NamespaceIndentation: None
ObjCSpaceBeforeProtocolList: true
PenaltyBreakComment: 60 PenaltyBreakComment: 60
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000 PenaltyBreakString: 1000
PenaltyBreakFirstLessLess: 120
PenaltyExcessCharacter: 1000000 PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60 PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Left PointerBindsToType: true
SpaceAfterCStyleCast: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1 SpacesBeforeTrailingComments: 1
SpacesInAngles: false Cpp11BracedListStyle: true
SpacesInCStyleCastParentheses: false Standard: Cpp11
IndentWidth: 2
TabWidth: 2
UseTab: false
BreakBeforeBraces: Attach
IndentFunctionDeclarationAfterType: false
SpacesInParentheses: false SpacesInParentheses: false
SpacesInSquareBrackets: false SpaceInEmptyParentheses: false
Standard: Cpp11 SpacesInCStyleCastParentheses: false
TabWidth: 2 SpaceAfterControlStatementKeyword: true
UseTab: Never ...
...@@ -36,5 +36,7 @@ endif(dune-grid_FOUND) ...@@ -36,5 +36,7 @@ endif(dune-grid_FOUND)
target_link_dune_default_libraries(dunestuff) target_link_dune_default_libraries(dunestuff)
add_analyze(${lib_dune_stuff_sources}) add_analyze(${lib_dune_stuff_sources})
FILE( GLOB_RECURSE _header "${CMAKE_CURRENT_SOURCE_DIR}/*.hh" )
add_format(${lib_dune_stuff_sources} ${_header})
add_subdirectory(test EXCLUDE_FROM_ALL) add_subdirectory(test EXCLUDE_FROM_ALL)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment