mirror of https://github.com/libp2p/cpp-libp2p.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
428 B
22 lines
428 B
file(GLOB_RECURSE
|
|
ALL_CXX_SOURCE_FILES
|
|
core/*.[ch]pp
|
|
core/*.[ch]
|
|
test/*.[ch]pp
|
|
test/*.[ch]
|
|
)
|
|
|
|
# Adding clang-format target if executable is found
|
|
if(NOT CLANG_FORMAT_BIN)
|
|
find_program(CLANG_FORMAT_BIN "clang-format")
|
|
endif()
|
|
|
|
if(CLANG_FORMAT_BIN)
|
|
message(STATUS "Target clang-format enabled")
|
|
add_custom_target(
|
|
clang-format
|
|
COMMAND "${CLANG_FORMAT_BIN}"
|
|
-i
|
|
${ALL_CXX_SOURCE_FILES}
|
|
)
|
|
endif()
|
|
|