@@ -41,31 +41,33 @@ file(GLOB_RECURSE files
41
41
42
42
set (check_format_depends)
43
43
set (i 0)
44
- foreach (file IN LISTS files )
45
- add_custom_command (OUTPUT clang-format-check-format ${i}
44
+ foreach (file IN LISTS files )
45
+ add_custom_command (OUTPUT check_format_depend_ ${i}
46
46
COMMAND clang-format ${file} | diff -u ${file} -
47
47
VERBATIM
48
- COMMENT "Checking format of ${file} ... "
48
+ COMMENT "Checking format of ${file} "
49
49
)
50
- list (APPEND check_format_depends clang-format-check-format ${i} )
50
+ list (APPEND check_format_depends check_format_depend_ ${i} )
51
51
52
52
math (EXPR i ${i} +1)
53
- endforeach ()
53
+ endforeach ()
54
54
55
55
add_custom_target (clang-format-check-format DEPENDS ${check_format_depends} )
56
56
57
- if (CLANG_INCLUDE_DOCS)
58
- set (style_options_depends ${CMAKE_CURRENT_BINARY_DIR} /dummy_output)
59
- set (docs_tools_dir ${CLANG_SOURCE_DIR} /docs/tools)
60
- add_custom_command (OUTPUT ${style_options_depends}
61
- COMMAND ${Python3_EXECUTABLE} dump_format_style.py &&
62
- touch ${style_options_depends}
63
- WORKING_DIRECTORY ${docs_tools_dir}
64
- DEPENDS ${CLANG_SOURCE_DIR} /include /clang/Format/Format.h
65
- ${CLANG_SOURCE_DIR} /include /clang/Tooling/Inclusions/IncludeStyle.h
66
- ${CLANG_SOURCE_DIR} /docs/ClangFormatStyleOptions.rst
67
- ${docs_tools_dir} /plurals.txt
68
- ${docs_tools_dir} /dump_format_style.py
69
- )
70
- add_custom_target (clang-format-style-options DEPENDS ${style_options_depends} )
71
- endif ()
57
+ set (style_options_depends ${CMAKE_CURRENT_BINARY_DIR} /dummy_output)
58
+ set (docs_tools_dir ${CLANG_SOURCE_DIR} /docs/tools)
59
+ set (style_options_rst ${CLANG_SOURCE_DIR} /docs/ClangFormatStyleOptions.rst)
60
+ add_custom_command (OUTPUT ${style_options_depends}
61
+ COMMAND ${Python3_EXECUTABLE} dump_format_style.py &&
62
+ touch ${style_options_depends}
63
+ WORKING_DIRECTORY ${docs_tools_dir}
64
+ VERBATIM
65
+ COMMENT "Updating ${style_options_rst} "
66
+ DEPENDS ${CLANG_SOURCE_DIR} /include /clang/Format/Format.h
67
+ ${CLANG_SOURCE_DIR} /include /clang/Tooling/Inclusions/IncludeStyle.h
68
+ ${style_options_rst}
69
+ ${docs_tools_dir} /plurals.txt
70
+ ${docs_tools_dir} /dump_format_style.py
71
+ )
72
+
73
+ add_custom_target (clang-format-style-options DEPENDS ${style_options_depends} )
0 commit comments