blob: f1082dfb90bfc288582b258e2e06aa7e10976fac [file] [log] [blame]
#!/bin/bash
set -e
#set -x
if [[ "$OSTYPE" == "darwin"* ]]; then
echo 'brew "cmake"
brew "ninja"
brew "sdl2"' | brew bundle --file=-
fi
git submodule init
git submodule update
WARNINGS="-fcolor-diagnostics -Weverything -Wno-c++98-compat -Wno-c++11-compat"
rm -rf out
mkdir -p out/slow
cd out/slow
cmake -G Ninja ../.. \
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_BUILD_TYPE=Debug \
-DDEV_TOOLS=ON \
-DRUN_TESTS=ON \
-DCMAKE_CXX_CLANG_TIDY="clang-tidy" \
-DCMAKE_CXX_FLAGS="$WARNINGS -Werror -fsanitize=address,integer,undefined -fno-sanitize-recover=all"
time ninja
cd - >/dev/null
mkdir -p out/fast
cd out/fast
cmake -G Ninja ../.. \
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_BUILD_TYPE=Debug \
-DDEV_TOOLS=ON \
-DRUN_BENCH=ON \
-DRUN_TESTS=ON \
-DDUMP_SIZE=ON \
-DCMAKE_CXX_FLAGS="$WARNINGS -Os -momit-leaf-frame-pointer"
time ninja
cd - >/dev/null