From c21dc20c388f40a70addaf5fc1d6d4be168c454f Mon Sep 17 00:00:00 2001 From: Theodore Tsirpanis Date: Wed, 4 Oct 2023 14:30:07 +0300 Subject: [PATCH] Update clang-format to 16. --- cmake/Modules/FindClangTools.cmake | 2 ++ cmake/TileDB-Superbuild.cmake | 2 +- scripts/ci/check_formatting_linux.sh | 4 ++-- scripts/install-clangformat.sh | 4 ++-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/cmake/Modules/FindClangTools.cmake b/cmake/Modules/FindClangTools.cmake index 6b47c96210d..4d821b703d1 100644 --- a/cmake/Modules/FindClangTools.cmake +++ b/cmake/Modules/FindClangTools.cmake @@ -52,6 +52,8 @@ endif() find_program(CLANG_FORMAT_BIN NAMES + clang-format-16 + clang-format-15 clang-format-14 clang-format-13 clang-format-12 diff --git a/cmake/TileDB-Superbuild.cmake b/cmake/TileDB-Superbuild.cmake index 04c6bc5abe5..ee7f05bed68 100644 --- a/cmake/TileDB-Superbuild.cmake +++ b/cmake/TileDB-Superbuild.cmake @@ -208,7 +208,7 @@ set(SCRIPTS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/scripts") find_package(ClangTools) if (NOT ${CLANG_FORMAT_FOUND}) - find_program(CLANG_FORMAT_BIN NAMES clang-format-14 clang-format-13 clang-format-12 clang-format-11 clang-format-10 clang-format-9 clang-format-8 clang-format-7 clang-format-6.0 clang-format-5.0 clang-format-4.0) + find_program(CLANG_FORMAT_BIN NAMES clang-format-16 clang-format-15 clang-format-14 clang-format-13 clang-format-12 clang-format-11 clang-format-10 clang-format-9 clang-format-8 clang-format-7 clang-format-6.0 clang-format-5.0 clang-format-4.0) if(CLANG_FORMAT_BIN) set(CLANG_FORMAT_FOUND TRUE) endif() diff --git a/scripts/ci/check_formatting_linux.sh b/scripts/ci/check_formatting_linux.sh index a144c146ca1..9eb4563a6b5 100644 --- a/scripts/ci/check_formatting_linux.sh +++ b/scripts/ci/check_formatting_linux.sh @@ -28,11 +28,11 @@ set -e pipefail -# Install clang-format (v9) +# Install clang-format ls -la sudo ./scripts/install-clangformat.sh src=$GITHUB_WORKSPACE cd $src -$src/scripts/run-clang-format.sh $src clang-format-14 0 +$src/scripts/run-clang-format.sh $src clang-format-16 0 diff --git a/scripts/install-clangformat.sh b/scripts/install-clangformat.sh index 0222cefb4f9..3bb230b8a5f 100755 --- a/scripts/install-clangformat.sh +++ b/scripts/install-clangformat.sh @@ -30,8 +30,8 @@ die() { install_apt_pkg() { wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - - add-apt-repository 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-14 main' && - apt-get update -qq && apt-get install -qq -y clang-format-14 + add-apt-repository 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-16 main' && + apt-get update -qq && apt-get install -qq -y clang-format-16 } install_brew_pkg() {