tools/format-cpp: run `xargs` with `-P$(nproc)` (format in parallel)
[babeltrace.git] / tools / format-cpp
index 98e901aaff86b4a256dd263b5ef4308e25f71f1c..0a165a8f2b18e03953120bf81ab5ec4030ec52a1 100755 (executable)
@@ -39,7 +39,7 @@ format_cpp() {
        find "$root_dir" \( -name '*.cpp' -o -name '*.hpp' \) \
                ! -wholename '*/cpp-common/optional.hpp' \
                ! -wholename '*/cpp-common/string_view.hpp' \
-               -print0 | xargs -n1 -0 $formatter
+               -print0 | xargs -P$(nproc) -n1 -0 $formatter
 }
 
 if [[ -n "$FORMATTER" ]]; then
This page took 0.0234 seconds and 4 git commands to generate.