tidyfox/Justfile

32 lines
726 B
Makefile
Raw Permalink Normal View History

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
2023-10-27 11:19:45 +00:00
clang-tidy src/**.cpp --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