tidyfox/Justfile
outfoxxed f5c43c4fb4
initial setup
Buildscripts, nix shell, skeleton project
2023-10-27 03:03:57 -07:00

32 lines
722 B
Makefile

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