Skip to content
Snippets Groups Projects
Commit d230f216 authored by Brecht Van Lommel's avatar Brecht Van Lommel
Browse files

Increase clang-format recommended version range to 9.0.1

Ref 73747
parent 4a1328af
Branches
No related tags found
No related merge requests found
...@@ -6,7 +6,7 @@ import sys ...@@ -6,7 +6,7 @@ import sys
import subprocess import subprocess
VERSION_MIN = (6, 0, 0) VERSION_MIN = (6, 0, 0)
VERSION_MAX_RECOMMENDED = (7, 0, 0) VERSION_MAX_RECOMMENDED = (9, 0, 1)
CLANG_FORMAT_CMD = "clang-format" CLANG_FORMAT_CMD = "clang-format"
BASE_DIR = os.path.normpath(os.path.join(os.path.dirname(__file__), "..", "..", "..")) BASE_DIR = os.path.normpath(os.path.join(os.path.dirname(__file__), "..", "..", ".."))
...@@ -113,7 +113,7 @@ def clang_format_ensure_version(): ...@@ -113,7 +113,7 @@ def clang_format_ensure_version():
version = version.split("-")[0] version = version.split("-")[0]
version = tuple(int(n) for n in version.split(".")) version = tuple(int(n) for n in version.split("."))
if version is not None: if version is not None:
print("Using %s (%d.%d.%d)..." % (CLANG_FORMAT_CMD, version[0], version[1], version[2])) print("Using %s (%d.%d.%d)..." % (CLANG_FORMAT_CMD, version[0], version[1], version[2]))
return version return version
...@@ -172,7 +172,7 @@ def main(): ...@@ -172,7 +172,7 @@ def main():
if version < VERSION_MIN: if version < VERSION_MIN:
print("Version of clang-format is too old:", version, "<", VERSION_MIN) print("Version of clang-format is too old:", version, "<", VERSION_MIN)
sys.exit(1) sys.exit(1)
if version >= VERSION_MAX_RECOMMENDED: if version > VERSION_MAX_RECOMMENDED:
print("WARNING: Version of clang-format is too recent:", version, ">=", VERSION_MIN) print("WARNING: Version of clang-format is too recent:", version, ">=", VERSION_MIN)
print("You may want to install clang-format-%d.%d, or use the precompiled libs repository." % (version[0], version[1])) print("You may want to install clang-format-%d.%d, or use the precompiled libs repository." % (version[0], version[1]))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment