From: Matthias Maier Date: Mon, 21 Aug 2023 18:50:43 +0000 (-0500) Subject: clang-format: update indent and compile script to version 16.0.6 X-Git-Tag: relicensing~558^2~3 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=278b840ce53ea1de36c0fa26db88606a599ebf85;p=dealii.git clang-format: update indent and compile script to version 16.0.6 --- diff --git a/contrib/utilities/compile_clang_format b/contrib/utilities/compile_clang_format index 1619c589a4..dddf1ca425 100755 --- a/contrib/utilities/compile_clang_format +++ b/contrib/utilities/compile_clang_format @@ -29,9 +29,9 @@ set -u PRG="$(cd "$(dirname "$0")" && pwd)/programs" -VERSION="11" -RELEASE_DATE="2021-02-03" -LLVM_COMMIT="1fdec59bffc11ae37eb51a1b9869f0696bfd5312" +VERSION="16" +RELEASE_DATE="2023-06-10" +LLVM_COMMIT="7cbf1a2591520c2491aa35339f227775f4d3adf6" CLANG_PATH="${PRG}/clang-${VERSION}" RELEASE_BRANCH="release/${VERSION}.x" diff --git a/contrib/utilities/download_clang_format b/contrib/utilities/download_clang_format index ef1851fe53..55f8412f54 100755 --- a/contrib/utilities/download_clang_format +++ b/contrib/utilities/download_clang_format @@ -24,18 +24,18 @@ # This can be done with the compile_clang_format script. # -VERSION=11 +VERSION=16 PRG="$(cd "$(dirname "$0")" && pwd)/programs" CLANG_PATH="${PRG}/clang-${VERSION}" -URL="https://github.com/dealii/dealii/releases/download/v9.3.0" +URL="https://github.com/dealii/dealii/releases/download/v9.5.1" # Find out which kind of OS we are running and set the appropriate settings case "${OSTYPE}" in linux*) FILENAME="clang-format-${VERSION}-linux.tar.gz" CHECKSUM_CMD="sha256sum" - CHECKSUM="9420c4ed80268500ef357eb42b2e77dc55e807e559d6d9851f4808a9939fa47b $FILENAME" + CHECKSUM="e6d92ab1b385f5e4392466a3cf651a9e403a5c212f4c1c3737ee173bc6d79d93 $FILENAME" ;; darwin*) FILENAME="clang-format-${VERSION}-darwin-intel.tar.gz" diff --git a/contrib/utilities/indent b/contrib/utilities/indent index 798d32a8dd..51deef2d08 100755 --- a/contrib/utilities/indent +++ b/contrib/utilities/indent @@ -27,9 +27,9 @@ # # The script can be invoked with DEAL_II_CLANG_FORMAT to change # the default version of clang-format. For example: -# DEAL_II_CLANG_FORMAT=clang-format-11.0 ./contrib/utilities/indent +# DEAL_II_CLANG_FORMAT=clang-format-16.0 ./contrib/utilities/indent # or, -# make DEAL_II_CLANG_FORMAT="clang-format-11.0" indent +# make DEAL_II_CLANG_FORMAT="clang-format-16.0" indent # # Note: If the script is invoked with REPORT_ONLY=true set, # REPORT_ONLY=true ./contrib/utilities/indent diff --git a/contrib/utilities/indent-all b/contrib/utilities/indent-all index 7cf1dae07c..1c8d8cfaaa 100755 --- a/contrib/utilities/indent-all +++ b/contrib/utilities/indent-all @@ -31,9 +31,9 @@ # # The script can be invoked with DEAL_II_CLANG_FORMAT to change # the default version of clang-format. For example: -# DEAL_II_CLANG_FORMAT=clang-format-11.0 ./contrib/utilities/indent-all +# DEAL_II_CLANG_FORMAT=clang-format-16.0 ./contrib/utilities/indent-all # or, -# make DEAL_II_CLANG_FORMAT="clang-format-11.0" indent-all +# make DEAL_II_CLANG_FORMAT="clang-format-16.0" indent-all # # Note: If the script is invoked with REPORT_ONLY=true set, # REPORT_ONLY=true ./contrib/utilities/indent-all diff --git a/contrib/utilities/indent.py b/contrib/utilities/indent.py index 4a445203fb..9c61637b02 100644 --- a/contrib/utilities/indent.py +++ b/contrib/utilities/indent.py @@ -92,7 +92,7 @@ def parse_arguments(): "in a list of directories " "that satisfy a given regex." "This program requires " - "clang-format version 11.1.") + "clang-format version 16.0.") parser.add_argument("-b", "--clang-format-binary", metavar="PATH", default=distutils.spawn.find_executable("clang-format")) @@ -289,11 +289,11 @@ if __name__ == "__main__": # # If clang-format-binary is not found, search again in - # contrib/utlitlies/programs/clang-11/bin + # contrib/utlitlies/programs/clang-16/bin # if not PARSED_ARGUMENTS.clang_format_binary: os.environ["PATH"] += ':' + \ - os.getcwd() + "/contrib/utilities/programs/clang-11/bin" + os.getcwd() + "/contrib/utilities/programs/clang-16/bin" PARSED_ARGUMENTS.clang_format_binary = distutils.spawn.find_executable( "clang-format") diff --git a/contrib/utilities/indent_common.sh b/contrib/utilities/indent_common.sh index cca63659d3..6c3055e148 100644 --- a/contrib/utilities/indent_common.sh +++ b/contrib/utilities/indent_common.sh @@ -39,7 +39,7 @@ checks() { # Add the location 'download_clang_format' or 'compile_clang_format' # installs clang-format to the local PATH. - CLANG_FORMAT_PATH="$(cd "$(dirname "$0")" && pwd)/programs/clang-11/bin" + CLANG_FORMAT_PATH="$(cd "$(dirname "$0")" && pwd)/programs/clang-16/bin" export PATH="${CLANG_FORMAT_PATH}:${PATH}" if ! [ -x "$(command -v "${DEAL_II_CLANG_FORMAT}")" ]; then @@ -56,8 +56,8 @@ checks() { CLANG_FORMAT_MAJOR_VERSION=$(echo "${CLANG_FORMAT_VERSION}" | sed 's/^[^0-9]*\([0-9]*\).*$/\1/g') CLANG_FORMAT_MINOR_VERSION=$(echo "${CLANG_FORMAT_VERSION}" | sed 's/^[^0-9]*[0-9]*\.\([0-9]*\).*$/\1/g') - if [ "${CLANG_FORMAT_MAJOR_VERSION}" -ne 11 ] || [ "${CLANG_FORMAT_MINOR_VERSION}" -ne 1 ]; then - echo "*** This indent script requires clang-format version 11.1," + if [ "${CLANG_FORMAT_MAJOR_VERSION}" -ne 16 ] || [ "${CLANG_FORMAT_MINOR_VERSION}" -ne 0 ]; then + echo "*** This indent script requires clang-format version 16.0," echo "*** but version ${CLANG_FORMAT_MAJOR_VERSION}.${CLANG_FORMAT_MINOR_VERSION} was found instead." echo "***" echo "*** You can run the './contrib/utilities/download_clang_format'"