initial setup
Buildscripts, nix shell, skeleton project
This commit is contained in:
commit
f5c43c4fb4
11 changed files with 284 additions and 0 deletions
31
Justfile
Normal file
31
Justfile
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue