inital nodes and props

This commit is contained in:
chrisbell committed 2026-11-02 19:42:48 -06:00
1 parent 98f798ad45
commit 5dad34f2e3
12 files changed
+1107 -9

No files matched your search

+58
View File
@@ -0,0 +1,58 @@
#!/usr/bin/env bash
set -euo pipefail
cd "$(dirname "$0")/.."
usage() {
cat <<EOF
usage: scripts/build.sh <command>
commands:
debug configure, build, and test into build/
release configure, build, and test into build-release/
asan configure, build, and test with ASan and UBSan into build-asan/
wasm configure, build, and test with Emscripten into build-wasm/
all debug, asan, then wasm
clean remove all build directories
EOF
}
build() {
local dir=$1 launcher=$2
shift 2
$launcher cmake -S . -B "$dir" -G Ninja "$@"
cmake --build "$dir"
ctest --test-dir "$dir" --output-on-failure
}
link_compile_commands() {
ln -sf build/compile_commands.json compile_commands.json
}
case "${1:-}" in
debug)
build build "" -DCMAKE_BUILD_TYPE=Debug
link_compile_commands
;;
release)
build build-release "" -DCMAKE_BUILD_TYPE=Release
;;
asan)
build build-asan "" -DCMAKE_BUILD_TYPE=Debug -DREGOLITH_SANITIZE=ON
;;
wasm)
build build-wasm emcmake -DCMAKE_BUILD_TYPE=Debug
;;
all)
"$0" debug
"$0" asan
"$0" wasm
;;
clean)
rm -rf build build-release build-asan build-wasm compile_commands.json
;;
*)
usage
exit 1
;;
esac