Skip to content

Commit 7d7e4d2

Browse files
authored
[Windows] Add git-clang-format wrapper bat file (llvm#69228)
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 llvm#69643
1 parent c2f02e3 commit 7d7e4d2

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

clang/tools/clang-format/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,9 @@ install(FILES clang-format.py
3838
install(PROGRAMS git-clang-format
3939
DESTINATION "${CMAKE_INSTALL_BINDIR}"
4040
COMPONENT clang-format)
41+
42+
if (WIN32 AND NOT CYGWIN)
43+
install(PROGRAMS git-clang-format.bat
44+
DESTINATION "${CMAKE_INSTALL_BINDIR}"
45+
COMPONENT clang-format)
46+
endif()
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
py -3 git-clang-format %*

0 commit comments

Comments
 (0)