diff options
Diffstat (limited to 'tools/check')
| -rwxr-xr-x | tools/check | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/tools/check b/tools/check index 717746d..eee6490 100755 --- a/tools/check +++ b/tools/check @@ -2,7 +2,7 @@ set -e -types="Debug Release Coverage" +types="debug release coverage" mkdir -p build cd build @@ -10,7 +10,27 @@ cd build for type in $types do rm -rf $type - cmake .. -G Ninja -B $type -DCMAKE_BUILD_TYPE=$type + mkdir -p $type + cd $type + case $type in + debug) + CFLAGS="-O0 -g3 -fsanitize=address,undefined" + ;; + coverage) + CFLAGS="-O0 -g3 --coverage -fcondition-coverage" + ;; + release) + CFLAGS="-O3" + ;; + *) + echo "Unsupported type" + exit 1 + ;; + esac + ../../configure --enable-build-mode=$type CFLAGS="$CFLAGS -Wall -Wextra -Werror -std=c89 -pedantic" + make check + ../../configure --enable-build-mode=$type CFLAGS="$CFLAGS" + cd .. done cd .. |