check for clang-format version

This commit is contained in:
Erik Frojdh
2020-05-05 10:37:17 +02:00
parent 8ff9b0cdac
commit 31ec3c8cf7
2 changed files with 14 additions and 7 deletions

View File

@@ -17,6 +17,7 @@ foreach (SOURCE_FILE ${ALL_SOURCE_FILES})
endforeach ()
endforeach ()
#target for formatting soruce files
add_custom_target(format
COMMENT "Running clang-format to change files"
COMMAND ${ClangFormat_BIN}
@@ -25,7 +26,8 @@ add_custom_target(format
${ALL_SOURCE_FILES}
)
#put back i
#target to check format on source files
add_custom_target(format-check
COMMENT "Checking clang-format changes"
# Use ! to negate the result for correct output
@@ -37,7 +39,7 @@ add_custom_target(format-check
| grep -q "replacement offset"
)
# debug to check which file will be formatted
add_custom_target(
listformatfiles
COMMAND