This is an automated email from the ASF dual-hosted git repository.
kou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/main by this push:
new b3936b9f0d GH-37299: [C++] Fix clang-format version mismatch error
with Homebrew's clang-format (#37300)
b3936b9f0d is described below
commit b3936b9f0d0a899480741f2026c0349bf876c210
Author: Francis <[email protected]>
AuthorDate: Wed Aug 23 04:36:24 2023 +0800
GH-37299: [C++] Fix clang-format version mismatch error with Homebrew's
clang-format (#37300)
### Rationale for this change
On my mac system, the clang-format version information is:
```
➜ ~ clang-format -version
Homebrew clang-format version 16.0.4
```
This isn't matched by the current clang-format regex in the CMake setup:
```cmake
find_clang_tool(clang-format CLANG_FORMAT_BIN
"^clang-format version
${ARROW_CLANG_TOOLS_VERSION_ESCAPED}")
```
### What changes are included in this PR?
Make regex more lenient to accomodate the Homebrew clang-format version
string.
### Are these changes tested?
no
### Are there any user-facing changes?
no
* Closes: #37299
Authored-by: light-city <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
---
cpp/cmake_modules/FindClangTools.cmake | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cpp/cmake_modules/FindClangTools.cmake
b/cpp/cmake_modules/FindClangTools.cmake
index a00ff2c939..90df60bf54 100644
--- a/cpp/cmake_modules/FindClangTools.cmake
+++ b/cpp/cmake_modules/FindClangTools.cmake
@@ -108,7 +108,7 @@ else()
endif()
find_clang_tool(clang-format CLANG_FORMAT_BIN
- "^clang-format version ${ARROW_CLANG_TOOLS_VERSION_ESCAPED}")
+ "clang-format version ${ARROW_CLANG_TOOLS_VERSION_ESCAPED}")
if(CLANG_FORMAT_BIN)
set(CLANG_FORMAT_FOUND 1)
message(STATUS "clang-format found at ${CLANG_FORMAT_BIN}")