llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clang-format Author: owenca (owenca) <details> <summary>Changes</summary> --- Full diff: https://github.com/llvm/llvm-project/pull/205036.diff 1 Files Affected: - (modified) clang/lib/Format/CMakeLists.txt (+10-1) ``````````diff diff --git a/clang/lib/Format/CMakeLists.txt b/clang/lib/Format/CMakeLists.txt index 3e19151790440..fdd8a79969555 100644 --- a/clang/lib/Format/CMakeLists.txt +++ b/clang/lib/Format/CMakeLists.txt @@ -41,11 +41,20 @@ file(GLOB_RECURSE files ${CLANG_SOURCE_DIR}/unittests/Format/*.h ) +if(WIN32 AND DEFINED ENV{CMDCMDLINE}) + find_program(DIFF_EXE diff) + if(NOT DIFF_EXE) + set(diff_cmd "fc") + endif() +else() + set(diff_cmd "diff" "-u") +endif() + set(check_format_depends) set(i 0) foreach(file IN LISTS files) add_custom_command(OUTPUT check_format_depend_${i} - COMMAND clang-format ${file} | diff -u ${file} - && + COMMAND clang-format ${file} | ${diff_cmd} ${file} - && touch check_format_depend_${i} VERBATIM COMMENT "Checking format of ${file}" `````````` </details> https://github.com/llvm/llvm-project/pull/205036 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
