Build system: add single-threaded compile mode to test script

BodgeMaster-unfinished
BodgeMaster 2022-07-20 19:20:27 +02:00
parent 0dcc579bb5
commit 8bb0732cc6
1 changed files with 8 additions and 0 deletions

View File

@ -15,6 +15,13 @@
# version 3 along with this program.
# If not, see https://www.gnu.org/licenses/agpl-3.0.en.html
if [ "$(tr '[:upper:]' '[:lower:]' <<< $SINGLE)" = "yes" ]; then
echo "Building tests in single-threaded mode."
WAIT_ANYWAY="wait"
else
WAIT_ANYWAY=""
fi
if [ -z "$CXX" ]; then
CXX="c++"
fi
@ -44,6 +51,7 @@ COMPILE_COMMANDS=(
for command in ${!COMPILE_COMMANDS[@]}; do
echo "${COMPILE_COMMANDS[command]}"
${COMPILE_COMMANDS[command]} &
$WAIT_ANYWAY
done
wait