added format target
This commit is contained in:
parent
ccdd081d36
commit
fb8ff21666
2 changed files with 11 additions and 0 deletions
5
.clang-format
Normal file
5
.clang-format
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
BasedOnStyle: LLVM
|
||||||
|
IndentWidth: 4
|
||||||
|
TabWidth: 4
|
||||||
|
UseTab: Never
|
||||||
|
Cpp11BracedListStyle: false
|
||||||
|
|
@ -47,6 +47,12 @@ set(SOURCES
|
||||||
${STATES_SOURCES}
|
${STATES_SOURCES}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
add_custom_target(format
|
||||||
|
COMMAND clang-format -i -- **.c **.h
|
||||||
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||||
|
COMMENT "Formatting source files..."
|
||||||
|
)
|
||||||
|
|
||||||
add_executable(kubo ${SOURCES})
|
add_executable(kubo ${SOURCES})
|
||||||
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue