#!/bin/bash
# Make sure that the piping of the compiler messages doesn't eat a non-zero exit code from the compiler.
set -o pipefail
# The path to the source is supplied as first argument.
SOURCEPATH=$1
# Eat the first argument so that we can use the compiler call generated by cmake to parse its output through our scripts.
shift 1
$@ 2>&1 | perl ${SOURCEPATH}/util/removeTemplates.pl | perl ${SOURCEPATH}/util/compileTimeAssertHandling.pl | perl ${SOURCEPATH}/util/colorize.pl
