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')
|
|
|
|
$CXX "$@" 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
|