Skip to content

Commit

Permalink
Include examples in clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
dsieger committed Sep 4, 2022
1 parent d3a4e37 commit 3f0d607
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion cmake/clang-format.cmake
Expand Up @@ -12,7 +12,15 @@ if(CLANG_FORMAT_EXE)
message(STATUS "clang-format found: ${CLANG_FORMAT_EXE}")

# get all sources
file(GLOB_RECURSE ALL_SOURCES "src/*.cpp" "src/*.h" "tests/*.cpp" "tests/*.h")
file(
GLOB_RECURSE
ALL_SOURCES
"src/*.cpp"
"src/*.h"
"tests/*.cpp"
"tests/*.h"
"examples/*.cpp"
"examples/*.h")

add_custom_target(clang-format COMMAND ${CLANG_FORMAT_EXE} -style=file -i
${ALL_SOURCES})
Expand Down

0 comments on commit 3f0d607

Please sign in to comment.