2024-01-25 12:33:02 +00:00
|
|
|
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
|
2024-01-25 12:33:02 +00:00
|
|
|
|
|
|
|
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") }}
|
2024-01-25 12:33:02 +00:00
|
|
|
|
|
|
|
configure target='debug' *FLAGS='':
|
2024-02-26 11:35:07 +00:00
|
|
|
cmake -GNinja -B {{builddir}} \
|
2024-03-07 14:00:46 +00:00
|
|
|
-DCMAKE_BUILD_TYPE={{ if target == "debug" { "Debug" } else { "RelWithDebInfo" } }} \
|
2024-01-25 12:33:02 +00:00
|
|
|
-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}}
|
|
|
|
|
2024-03-07 14:00:46 +00:00
|
|
|
release: (configure "release") build
|
|
|
|
|
2024-01-25 12:33:02 +00:00
|
|
|
clean:
|
|
|
|
rm -f compile_commands.json
|
|
|
|
rm -rf {{builddir}}
|
|
|
|
|
|
|
|
run *ARGS='': build
|
2024-03-12 01:34:38 +00:00
|
|
|
{{builddir}}/src/quickshell {{ARGS}}
|
2024-03-02 13:05:45 +00:00
|
|
|
|
|
|
|
test *ARGS='': build
|
2024-03-04 13:04:29 +00:00
|
|
|
ctest --test-dir {{builddir}} --output-on-failure {{ARGS}}
|
|
|
|
|
2024-03-07 14:00:46 +00:00
|
|
|
install *ARGS='':
|
2024-03-04 13:04:29 +00:00
|
|
|
cmake --install {{builddir}} {{ARGS}}
|