[clang] [clang-format][NFC] Clean up clang/lib/Format/CMakeLists.txt (PR #206314)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Jun 28 00:10:21 PDT 2026
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/206314.diff
1 Files Affected:
- (modified) clang/lib/Format/CMakeLists.txt (+3-6)
``````````diff
diff --git a/clang/lib/Format/CMakeLists.txt b/clang/lib/Format/CMakeLists.txt
index df73212983ab1..fcaae71530370 100644
--- a/clang/lib/Format/CMakeLists.txt
+++ b/clang/lib/Format/CMakeLists.txt
@@ -41,9 +41,9 @@ file(GLOB_RECURSE files
${CLANG_SOURCE_DIR}/unittests/Format/*.h
)
+set(check_format_depends clang-format)
find_program(DIFF_EXE diff)
if(DIFF_EXE)
- set(check_format_depends)
set(i 0)
foreach(file IN LISTS files)
add_custom_command(OUTPUT check_format_depend_${i}
@@ -55,13 +55,10 @@ if(DIFF_EXE)
${file}
)
list(APPEND check_format_depends check_format_depend_${i})
- math(EXPR i ${i}+1)
+ math(EXPR i "${i} + 1")
endforeach()
- add_custom_target(clang-format-check-format DEPENDS ${check_format_depends})
-else()
- add_custom_target(clang-format-check-format DEPENDS clang-format)
endif()
-
+add_custom_target(clang-format-check-format DEPENDS ${check_format_depends})
set(docs_tools_dir ${CLANG_SOURCE_DIR}/docs/tools)
``````````
</details>
https://github.com/llvm/llvm-project/pull/206314
More information about the cfe-commits
mailing list