diff --git a/CI/check_format b/CI/check_format
index facb27cdb228ab3f38357227a74d80d394b4471d..ea60eee823a4d5f95ff8a29fe9460cd17a5723a3 100755
--- a/CI/check_format
+++ b/CI/check_format
@@ -7,6 +7,7 @@
 
 set -e # abort on error
 
+
 if [ $# -ne 1 ]; then
     echo "wrong number of arguments"
     echo ""
@@ -14,13 +15,15 @@ if [ $# -ne 1 ]; then
     exit 1
 fi
 
-clang-format --version
+_binary=${CLANG_FORMAT_BINARY:-clang-format}
+
+$_binary --version
 
 cd $1
 find . \( -iname '*.cpp' -or -iname '*.hpp' -or -iname '*.ipp' \) \
        -and -not -path "./*build*/*" \
        -and -not -path "./thirdparty/*" \
-  | xargs clang-format -i -style=file
+  | xargs $_binary -i -style=file
 
 
 if ! [ -z $CI ]; then