-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtaskfile.yml
44 lines (36 loc) · 864 Bytes
/
taskfile.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
version: "3"
env:
GCC: /usr/bin/g++
CLANG: /usr/bin/clang++
DEBUG: -DCMAKE_BUILD_TYPE=Debug
RELEASE: -DCMAKE_BUILD_TYPE=Release
FLAGS: -O3 # -Wall -Wextra -Wpedantic
EXEC_PATH: build/ray-tracer
tasks:
default:
- task: clean-all
- task: build
- task: run
- feh output/img*.ppm
build:
cmds:
- task: clean-build
- cmake -S . -B build -DCMAKE_CXX_COMPILER=${CLANG} ${RELEASE} -DCMAKE_CXX_FLAGS=${FLAGS}
- cmake --build build
run:
cmds:
- mkdir -p output
- bash -c "${EXEC_PATH} > output/img-$(date +%Y-%m-%d_%H-%M-%S).ppm"
valgrind:
cmds:
- valgrind --leak-check=full --show-leak-kinds=all ${EXEC_PATH}
gdb:
cmds:
- gdb ${EXEC_PATH}
clean-build:
cmds:
- rm -r build || true
clean-all:
cmds:
- task: clean-build
- rm -r output || true