2014-10-03 22:46:42 +02:00
|
|
|
#!/bin/bash
|
|
|
|
FILECHECK=$1
|
|
|
|
CXX=$2
|
|
|
|
PREFIX=$3
|
2015-09-28 22:09:04 +02:00
|
|
|
shift 3
|
|
|
|
SOURCE=$(echo "$@" | grep -oP '\S+\.cpp\b')
|
|
|
|
OBJ=$(echo "$@" | grep -oP '\S+\.o\b')
|
2016-02-03 02:13:03 +01:00
|
|
|
$CXX "$@" -Wno-error 2>&1 | $FILECHECK -check-prefix=$PREFIX $SOURCE
|
2014-10-03 22:46:42 +02:00
|
|
|
if [ "$?" -eq 0 ]; then
|
|
|
|
touch $OBJ
|
|
|
|
else
|
|
|
|
exit 1
|
|
|
|
fi
|