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-01-25 12:33:02 +00:00
|
|
|
-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
|
2024-02-24 10:06:40 +00:00
|
|
|
{{builddir}}/src/core/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}}
|
|
|
|
|
|
|
|
install *ARGS='': clean (configure "release") build
|
|
|
|
cmake --install {{builddir}} {{ARGS}}
|