3
3
set -x
4
4
5
5
n_procs=" $( getconf _NPROCESSORS_ONLN) "
6
+ use_procs=$(( n_procs/ 2 ))
6
7
7
8
function check_with_gcc() {
8
9
# previous runs may have cached configuration based on a different CC
@@ -11,7 +12,7 @@ function check_with_gcc() {
11
12
# here --config-cache enables lots of checks in subdir libntech to re-use checks made in core
12
13
./configure --config-cache --enable-debug CC=gcc
13
14
local gcc_exceptions=" -Wno-sign-compare -Wno-enum-int-mismatch"
14
- make -j -l${n_procs } --keep-going CFLAGS=" -Werror -Wall -Wextra $gcc_exceptions "
15
+ make -j -l${use_procs } --keep-going CFLAGS=" -Werror -Wall -Wextra $gcc_exceptions "
15
16
}
16
17
17
18
function check_with_clang() {
@@ -20,7 +21,7 @@ function check_with_clang() {
20
21
make clean
21
22
# here --config-cache enables lots of checks in subdir libntech to re-use checks made in core
22
23
./configure --config-cache --enable-debug CC=clang
23
- make -j -l${n_procs } --keep-going CFLAGS=" -Werror -Wall -Wextra -Wno-sign-compare"
24
+ make -j -l${use_procs } --keep-going CFLAGS=" -Werror -Wall -Wextra -Wno-sign-compare"
24
25
}
25
26
26
27
function check_with_cppcheck() {
@@ -39,7 +40,7 @@ function check_with_cppcheck() {
39
40
# -i -- ignored files/folders
40
41
# --include=<file> -- force including a file, e.g. config.h
41
42
# Identified issues are printed to stderr
42
- cppcheck --quiet -j${n_procs } --error-exitcode=1 ./ \
43
+ cppcheck --quiet -j${use_procs } --error-exitcode=1 ./ \
43
44
--suppressions-list=tests/static-check/cppcheck_suppressions.txt \
44
45
--check-level=exhaustive \
45
46
--include=config.h \
0 commit comments