Author: Chris B Date: 2023-10-21T08:14:29-05:00 New Revision: 7d7e4d20b077c1f64b0db88ab844ccb9214bd38c
URL: https://github.com/llvm/llvm-project/commit/7d7e4d20b077c1f64b0db88ab844ccb9214bd38c DIFF: https://github.com/llvm/llvm-project/commit/7d7e4d20b077c1f64b0db88ab844ccb9214bd38c.diff LOG: [Windows] Add git-clang-format wrapper bat file (#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 #69643 Added: clang/tools/clang-format/git-clang-format.bat Modified: clang/tools/clang-format/CMakeLists.txt Removed: ################################################################################ diff --git a/clang/tools/clang-format/CMakeLists.txt b/clang/tools/clang-format/CMakeLists.txt index 30c93f8667c8359..1c61a3c8fb80368 100644 --- a/clang/tools/clang-format/CMakeLists.txt +++ b/clang/tools/clang-format/CMakeLists.txt @@ -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() diff --git a/clang/tools/clang-format/git-clang-format.bat b/clang/tools/clang-format/git-clang-format.bat new file mode 100644 index 000000000000000..d4bc5172989cb09 --- /dev/null +++ b/clang/tools/clang-format/git-clang-format.bat @@ -0,0 +1 @@ +py -3 git-clang-format %* _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits