From 78e7d9592d7c3b500ae2bae097d8cd7cd9369671 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Thu, 24 Oct 2024 18:34:29 -0700 Subject: [PATCH] [clang-format][NFC] Use CLANG_SOURCE_DIR in CMakeLists --- clang/lib/Format/CMakeLists.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/clang/lib/Format/CMakeLists.txt b/clang/lib/Format/CMakeLists.txt index b787b11ac7b744..ff987cc608fb88 100644 --- a/clang/lib/Format/CMakeLists.txt +++ b/clang/lib/Format/CMakeLists.txt @@ -33,10 +33,10 @@ add_clang_library(clangFormat file(GLOB_RECURSE files *.cpp *.h - ../../include/clang/Format/*.h - ../../tools/clang-format/*.cpp - ../../unittests/Format/*.cpp - ../../unittests/Format/*.h + ${CLANG_SOURCE_DIR}/include/clang/Format/*.h + ${CLANG_SOURCE_DIR}/tools/clang-format/*.cpp + ${CLANG_SOURCE_DIR}/unittests/Format/*.cpp + ${CLANG_SOURCE_DIR}/unittests/Format/*.h ) set(check_format_depends) @@ -46,8 +46,8 @@ foreach (file IN LISTS files) COMMAND clang-format ${file} | diff -u ${file} - VERBATIM COMMENT "Checking format of ${file}..." - ) - list(APPEND check_format_depends "clang-format-check-format${i}") + ) + list(APPEND check_format_depends clang-format-check-format${i}) math(EXPR i ${i}+1) endforeach ()