Skip to content

Commit

Permalink
[Windows] Add git-clang-format wrapper bat file (#69228)
Browse files Browse the repository at this point in the history
This allows git-clang-format to be used on a Windows terminal without
manually needing to find the path and invoke the python interpreter. We
have a similar script for `scan-build`.

Fixes #69643
  • Loading branch information
llvm-beanz committed Oct 21, 2023
1 parent c2f02e3 commit 7d7e4d2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions clang/tools/clang-format/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,9 @@ install(FILES clang-format.py
install(PROGRAMS git-clang-format
DESTINATION "${CMAKE_INSTALL_BINDIR}"
COMPONENT clang-format)

if (WIN32 AND NOT CYGWIN)
install(PROGRAMS git-clang-format.bat
DESTINATION "${CMAKE_INSTALL_BINDIR}"
COMPONENT clang-format)
endif()
1 change: 1 addition & 0 deletions clang/tools/clang-format/git-clang-format.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
py -3 git-clang-format %*

0 comments on commit 7d7e4d2

Please sign in to comment.