aboutsummaryrefslogtreecommitdiff
path: root/PxShared/buildtools/steps/build_all_linux.sh
blob: 167912f815d3e9b04ae67f25fac9e17aaa735c14 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash +x

set -e

# get number of CPU cores
if [ -f /proc/cpuinfo ]; then
    CPUS=`grep processor /proc/cpuinfo | wc -l`
else
    CPUS=1
fi

# Stackoverflow suggests jobs count of (CPU cores + 1) as a respctively good number!
JOBS=`expr $CPUS + 1`

# run make for all configs
pushd "$(dirname "$0")/../../compiler/linux-debug-clang"
make -j$JOBS || exit 1
popd

pushd "$(dirname "$0")/../../compiler/linux-release-clang"
make -j$JOBS || exit 1
popd