initial setup

Buildscripts, nix shell, skeleton project
This commit is contained in:
outfoxxed 2023-10-27 03:02:07 -07:00
commit f5c43c4fb4
Signed by: outfoxxed
GPG key ID: 4C88A185FB89301E
11 changed files with 284 additions and 0 deletions

31
Justfile Normal file
View file

@ -0,0 +1,31 @@
fmt:
clang-format -i src/**
check-format:
clang-format -i src/** --dry-run
# the lint ends up running over a large amount of llvm surface area and it takes considerably
# longer than the extra build time from using release mode
lint: release
clang-tidy src/** --load=build/release/libtidyfox.so
build:
cmake -GNinja -B build/debug \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
ln -sf build/debug/compile_commands.json compile_commands.json
cmake --build build/debug
release:
cmake -GNinja -B build/release \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
cmake --build build/release
clean:
rm -rf build
rm -f compile_commands.json
pre-commit: check-format lint