We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
clang-format
1 parent a099020 commit 111c3c5Copy full SHA for 111c3c5
cmake/FixFormat.cmake
@@ -20,7 +20,11 @@ function(target_fix_format TARGET)
20
return()
21
endif()
22
23
- find_program(CLANG_FORMAT_PROGRAM clang-format REQUIRED)
+ find_program(CLANG_FORMAT_PROGRAM clang-format)
24
+ if(CLANG_FORMAT_PROGRAM STREQUAL CLANG_FORMAT_PROGRAM-NOTFOUND)
25
+ message(WARNING "Cannot find the `clang-format` program required for formatting the `${TARGET}` target")
26
+ return()
27
+ endif()
28
29
# Append source files of the target to be formatted.
30
get_target_property(TARGET_SOURCE_DIR ${TARGET} SOURCE_DIR)
0 commit comments