mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-16 20:57:36 +08:00
Multithreaded mode for cppcheck
This commit is contained in:
@@ -4,7 +4,14 @@
|
||||
# For Debian based: apt-get install cppcheck
|
||||
#
|
||||
|
||||
num_cores=$(grep -c ^processor /proc/cpuinfo)
|
||||
if [ -z "$num_cores" ]; then
|
||||
echo "Hey, it looks like we're not on Linux. Please fix this script to add support for this OS."
|
||||
num_cores=4
|
||||
fi
|
||||
echo "Number of threads for cppcheck: $num_cores"
|
||||
|
||||
# TODO: with future versions of cppcheck, add --library=glibc
|
||||
cppcheck . --error-exitcode=1 --quiet --enable=all --platform=unix64 --std=c99 --std=c++11 \
|
||||
--inline-suppr --force --template=gcc \
|
||||
--inline-suppr --force --template=gcc -j$num_cores \
|
||||
-Iinclude $@
|
||||
|
||||
Reference in New Issue
Block a user