mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 19:02:59 +00:00
22 lines
560 B
Bash
Executable file
22 lines
560 B
Bash
Executable file
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
cwd="$(realpath $(dirname $0))"
|
|
|
|
echo "$cwd"
|
|
|
|
rm -rf "$cwd/../debug"
|
|
mkdir -p "$cwd/../debug"
|
|
cd "$cwd/../debug"
|
|
|
|
export CC=clang CXX=clang++
|
|
export LSAN_OPTIONS=suppressions="$cwd/../scripts/lsan.supp"
|
|
# undefined,float-cast-overflow,thread,memory,address
|
|
sanitizers="address"
|
|
export CXXFLAGS="$CXXFLAGS -Wall -fsanitize=$sanitizers -fno-omit-frame-pointer -fno-optimize-sibling-calls"
|
|
export LDFLAGS="$LDFLAGS -Wall -fsanitize=$sanitizers"
|
|
|
|
cmake ../ -DCMAKE_BUILD_TYPE=Debug \
|
|
-DCMAKE_INSTALL_PREFIX=/usr $@
|
|
make -j$(nproc || echo 1)
|