-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3fc4529
commit ff1a65d
Showing
11 changed files
with
376 additions
and
316 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Language: Cpp | ||
|
||
BasedOnStyle: Google | ||
BreakBeforeBraces: Custom | ||
AllowShortIfStatementsOnASingleLine: Never | ||
AllowAllConstructorInitializersOnNextLine: false | ||
BreakConstructorInitializers: BeforeComma | ||
KeepEmptyLinesAtTheStartOfBlocks: true | ||
BraceWrapping: | ||
AfterCaseLabel: true | ||
AfterClass: true | ||
AfterControlStatement: true | ||
AfterEnum: true | ||
AfterExternBlock: true | ||
AfterFunction: true | ||
AfterNamespace: true | ||
AfterStruct: true | ||
BeforeCatch: true | ||
BeforeElse: true | ||
SplitEmptyFunction: false | ||
SplitEmptyNamespace: false | ||
SplitEmptyRecord: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# clang-format support | ||
function(add_clang_format_target) | ||
if(NOT ${PROJECT_NAME}_CLANG_FORMAT_BINARY) | ||
find_program(${PROJECT_NAME}_CLANG_FORMAT_BINARY clang-format) | ||
endif() | ||
|
||
message(STATUS ${ALL_SOURCES} ${ALL_HEADERS}) | ||
|
||
if(${PROJECT_NAME}_CLANG_FORMAT_BINARY) | ||
add_custom_target(clang-format | ||
COMMAND ${${PROJECT_NAME}_CLANG_FORMAT_BINARY} --verbose | ||
-i ${ALL_SOURCES} ${ALL_HEADERS} | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}) | ||
|
||
message(STATUS "Format the project using the `clang-format` target (i.e: cmake --build build --target clang-format).\n") | ||
endif() | ||
endfunction() |
Oops, something went wrong.