From 87d05252acc4ed94d24150eabb2dd1a1f700f46f Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Wed, 1 Sep 2021 17:08:48 +0200 Subject: CMakeLists: allow to pass clang-format options in CLANG_FORMAT This supersedes passing clang-format options in a separate CLANG_FORMAT_ARGS CMake variable. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5e5c1932..22951faa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -198,7 +198,7 @@ if (API_GENERATION_ENABLED) if (NOT CLANG_FORMAT) set(CLANG_FORMAT clang-format) endif() - get_filename_component(ABS_CLANG_FORMAT "${CLANG_FORMAT}" PROGRAM) + get_filename_component(ABS_CLANG_FORMAT "${CLANG_FORMAT}" PROGRAM PROGRAM_ARGS CLANG_FORMAT_ARGS) if (ABS_CLANG_FORMAT) set(API_FORMATTING_ENABLED 1) message( STATUS "clang-format is at ${ABS_CLANG_FORMAT}") -- cgit v1.2.3