modernize scripts for running cmake and clang-format (#2503)

Co-authored-by: Aviral Goel <aviral.goel@amd.com>
This commit is contained in:
Max Podkorytov
2025-08-06 10:15:44 -07:00
committed by GitHub
parent 4750b293fe
commit 1824d65758
3 changed files with 11 additions and 0 deletions

View File

@@ -1,2 +1,7 @@
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
find . -name deps -prune -o -name build -prune -o -iname '*.h' -o -iname '*.hpp' -o -iname '*.cpp' -o -iname '*.h.in' -o -iname '*.hpp.in' -o -iname '*.cpp.in' -o -iname '*.cl' -o -iname '*.cuh' -o -iname '*.cu' -o -iname '*.inc' | xargs -n 1 -P 16 -I{} -t sh -c 'clang-format-18 -i -style=file {}'
git status --porcelain | awk '$1 != "D" && (match($2, "\\.cpp|.hpp|.inc")) {print $2}' | xargs -n 1 -P 16 -I{} -t sh -c 'clang-format-18 -i -style=file {}'

View File

@@ -1,4 +1,7 @@
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
rm -f CMakeCache.txt
rm -f *.cmake
rm -rf CMakeFiles

View File

@@ -1,4 +1,7 @@
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
rm -f CMakeCache.txt
rm -f *.cmake
rm -rf CMakeFiles