blob: 33d1ddb018c2cff6142d30aa706869769c60c422 [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 -Werror -Weverything -Wno-c++98-compat -Wno-c++11-compat"
mkdir -p out/dbg
cd out/dbg
cmake -G Ninja ../.. \
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_BUILD_TYPE=Debug \
-DDEV_TOOLS=ON \
-DCMAKE_CXX_FLAGS="$WARNINGS -fsanitize=address,integer,undefined -fno-sanitize-recover=all"
cd -
mkdir -p out/dev
cd out/dev
cmake -G Ninja ../.. \
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_BUILD_TYPE=Debug \
-DDEV_TOOLS=ON \
-DCMAKE_CXX_FLAGS="$WARNINGS -Os -momit-leaf-frame-pointer"
cd -