-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add script to run clang-tidy on all builds
tools/clang-tidy_runner.sh will run clang-tidy on all builds in parallel. Other scripts got an updated method of determining the cholla directory that works if invoked from outside the directory.
- Loading branch information
Showing
3 changed files
with
26 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Description: | ||
# Run clang-tidy on all build types in parallel. Note that this spawns 2x the | ||
# number of build types threads since each type has a thread for the CPU code | ||
# and a thread for the GPU code | ||
|
||
# If ctrl-c is sent trap it and kill all clang-tidy processes | ||
trap "kill -- -$$" EXIT | ||
|
||
# cd into the Cholla directory. Default to ${HOME}/Code/cholla | ||
cholla_root="$(dirname "$(dirname "$(readlink -fm "$0")")")" | ||
cd $cholla_root | ||
|
||
# Run all clang-tidy build types in parallel | ||
builds=( hydro gravity disk particles cosmology mhd dust) | ||
for build in "${builds[@]}" | ||
do | ||
make tidy TYPE=$build & | ||
done | ||
|
||
# Wait for clang-tidy to finish | ||
wait |