Skip to content
Snippets Groups Projects
Commit 2c7bc14c authored by Simon Spannagel's avatar Simon Spannagel
Browse files

CMake: no need for hardcoded CLANG_FORMAT version

parent 99d6117a
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,11 @@
##################################################################
# SETTINGS
CLANG_FORMAT_VERSION=10
# set file containing the clang-format version number:
VERSIONFILE="CMakeLists.txt"
# retrieve the version number from the VERSIONFILE
CLANG_FORMAT_VERSION=$(git cat-file blob master:"$VERSIONFILE" | grep -m 1 'CLANG_FORMAT_VERSION' | sed 's/^[^"]*"//;s/"[^"]*$//')
# set path to clang-format binary
for bin in "clang-format-$CLANG_FORMAT_VERSION" "clang-format";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment