Skip to content

[clang-format] Add cmake target clang-format-style-options for updating ClangFormatStyleOptions.rst #111513

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Dec 5, 2024
10 changes: 10 additions & 0 deletions clang/lib/Format/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,13 @@ foreach (file IN LISTS files)
endforeach ()

add_custom_target(clang-format-check-format DEPENDS ${check_format_depends})

set(style_options_depends ${CLANG_SOURCE_DIR}/docs/ClangFormatStyleOptions.rst)
add_custom_command(OUTPUT ${style_options_depends}
COMMAND ${Python3_EXECUTABLE} dump_format_style.py
WORKING_DIRECTORY ${CLANG_SOURCE_DIR}/docs/tools
DEPENDS ${CLANG_SOURCE_DIR}/include/clang/Format/Format.h
${CLANG_SOURCE_DIR}/include/clang/Tooling/Inclusions/IncludeStyle.h
)
add_custom_target(clang-format-style-options DEPENDS ${style_options_depends})
add_dependencies(clangFormat clang-format-style-options)
Loading