Skip to content

Commit

Permalink
initial implementation of #150, minus adjustments to CONTRIBUTING.md
Browse files Browse the repository at this point in the history
- drop dead code within `CMakeLists.txt`
- remove old `.github/workflows/.clang-format`
- create new `.clang-format` at the repository root, with settings based on observed patterns & `CONTRIBUTING.md`
  • Loading branch information
superwhiskers committed Jun 3, 2024
1 parent d913854 commit b0d3861
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 14 deletions.
41 changes: 41 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
Language: Cpp
AccessModifierOffset: 0
AlignConsecutiveMacros: true
BreakBeforeBraces: Linux
IndentWidth: 2
ConstructorInitializerIndentWidth: 2
AlignAfterOpenBracket: Align
Standard: c++11
IndentAccessModifiers: true
IndentCaseBlocks: true
IndentCaseLabels: true
IndentGotoLabels: true
IndentExternBlock: Indent
UseTab: Never
ReflowComments: true
QualifierAlignment: Left
ReferenceAlignment: Pointer
PointerAlignment: Left
InsertBraces: true
NamespaceIndentation: All
LineEnding: LF
IntegerLiteralSeparator:
Binary: 4
BinaryMinDigits: 8
Decimal: 3
DecimalMinDigits: 4
Hex: 2
HexMinDigits: 6
BreakTemplateDeclarations: Yes
BinPackArguments: false
BinPackParameters: false
AllowShortFunctionsOnASingleLine: None
AllowAllArgumentsOnNextLine: false
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^<resolve/'
Priority: 1
- Regex: '^<[[:alnum:].]+>'
Priority: -1
- Regex: '.*'
Priority: 0
9 changes: 0 additions & 9 deletions .github/workflows/.clang-format

This file was deleted.

6 changes: 1 addition & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@ set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib)
# Add CMake sources from `cmake` dir
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)

# Including clang-format cmake files to do automatic checking of formating
# TODO: Set up clang-format
#include(./cmake/clang-format)

# This will create target `doxygen` for building documentation locally.
# For now, this target is intended only for developers who want to test
# different documentation configurations. To have Doxygen configuration
Expand Down Expand Up @@ -153,7 +149,7 @@ configure_package_config_file(./cmake/ReSolveConfig.cmake.in
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ReSolveConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/ReSolveConfigVersion.cmake"
DESTINATION share/resolve/cmake)

# Add usage examples
add_subdirectory(examples)

Expand Down

0 comments on commit b0d3861

Please sign in to comment.