From 6f7174ecbacb42effc7d6b3fec3900bdce498b64 Mon Sep 17 00:00:00 2001 From: Alice Date: Wed, 19 Aug 2026 16:49:52 +0200 Subject: [PATCH] updated clang-format commands --- CMakeLists.txt | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 995abd97..e044b3f8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -492,9 +492,8 @@ endif() add_custom_target( check-format COMMAND - find \\ (-name "*.cpp" -o -name "*.hpp" \\) -not -path "./build/*" | xargs - -I {} -n 1 -P 10 bash -c - "clang-format -Werror -style=\"file:.clang-format\" {} | diff {} -" + bash -c + [=[ find \( -name "*.cpp" -o -name "*.hpp" \) -not -path "./build/*" | xargs -I {} -n 1 -P 10 bash -c "clang-format -Werror -style=\"file:.clang-format\" {} | diff {} -" ]=] WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMENT "Checking code formatting with clang-format" VERBATIM) @@ -502,8 +501,8 @@ add_custom_target( add_custom_target( format-files COMMAND - find \\ (-name "*.cpp" -o -name "*.hpp" \\) -not -path "./build/*" | xargs - -I {} -n 1 -P 10 bash -c "clang-format -i -style=\"file:.clang-format\" {}" + bash -c + [=[ find \( -name "*.cpp" -o -name "*.hpp" \) -not -path "./build/*" | xargs -I {} -n 1 -P 10 bash -c "clang-format -i -style=\"file:.clang-format\" {}" ]=] WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMENT "Formatting with clang-format" VERBATIM) @@ -518,18 +517,9 @@ endif() add_custom_target( clang-tidy COMMAND - find \\ (-path - "./src/*" - -a - -not - -path - "./src/python/*" - -a - \\ - (-name "*.cpp" -not -name "*.test.cpp" \\) - \\) -not -name "CircularFifo.hpp" -not -name - "ProducerConsumerQueue.hpp" -not -name "VariableSizeClusterFinder.hpp" | - xargs -I {} -n 1 -P 10 bash -c + find -path "./src/*" -not -path "./src/python/*" -not -name "*.test.cpp" + -not -name "CircularFifo.hpp" -not -name "ProducerConsumerQueue.hpp" -not + -name "VariableSizeClusterFinder.hpp" | xargs -I {} -n 1 -P 10 bash -c "${CLANG_TIDY_COMMAND} --config-file=.clang-tidy -p build {}" WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMENT "linting with clang-tidy"