quickshell/Justfile

31 lines
821 B
Makefile
Raw Normal View History

builddir := 'build'
fmt:
2024-02-26 11:22:26 +00:00
find src -type f \( -name "*.cpp" -o -name "*.hpp" \) -print0 | xargs -0 clang-format -i
lint:
2024-02-26 11:22:26 +00:00
find src -type f -name "*.cpp" -print0 | parallel -q0 --eta clang-tidy --load={{ env_var("TIDYFOX") }}
configure target='debug' *FLAGS='':
2024-02-26 11:35:07 +00:00
cmake -GNinja -B {{builddir}} \
-DCMAKE_BUILD_TYPE={{ if target == "debug" { "Debug" } else { "Release" } }} \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON {{FLAGS}}
ln -sf {{builddir}}/compile_commands.json compile_commands.json
_configure_if_clean:
@if ! [ -d {{builddir}} ]; then just configure; fi
build: _configure_if_clean
cmake --build {{builddir}}
clean:
rm -f compile_commands.json
rm -rf {{builddir}}
run *ARGS='': build
{{builddir}}/src/core/quickshell {{ARGS}}
2024-03-02 13:05:45 +00:00
test *ARGS='': build
ctest --test-dir build --output-on-failure {{ARGS}}