From 93c32c6f4d5af708bd5770d71c0fb38985420970 Mon Sep 17 00:00:00 2001 From: Daniel <d.hornung@indiscale.com> Date: Tue, 24 Aug 2021 16:45:01 +0200 Subject: [PATCH] ENH: Choosing clang-format-11 over generic version. --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 30a7027..ec6d2ae 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -413,8 +413,9 @@ install(FILES ${PROJECT_SOURCE_DIR}/caosdbConfigVersion.cmake ####################################################### option(AUTOFORMATTING "call clang-format at configure time" ON) if(AUTOFORMATTING AND NOT SKIP_LINTING) + find_program(clang_format NAMES clang-format-11 clang-format) file(GLOB format_test_sources test/*.cpp test/*.h test/*.h.in) - execute_process(COMMAND clang-format -i --verbose ${libcaosdb_INCL} + execute_process(COMMAND $(clang-format) -i --verbose ${libcaosdb_INCL} ${libcaosdb_SRC} ${libcaosdb_TEST_SRC} ${PROJECT_SOURCE_DIR}/src/cxxcaosdbcli.cpp ${PROJECT_SOURCE_DIR}/src/ccaosdbcli.c -- GitLab