-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
49 lines (37 loc) · 1.61 KB
/
justfile
File metadata and controls
49 lines (37 loc) · 1.61 KB
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
45
46
47
48
49
set windows-shell := ["powershell.exe", "-Command"]
set shell := ["sh", "-c"]
set dotenv-load := true
###########################
# Linux specific commands #
###########################
# allow to run clang-format on all files
[unix]
format:
- find . -type f -name "*.cpp" -o -name "*.h" | xargs clang-format -i
# run clang-tidy on all files
[unix]
tidy:
- run-clang-tidy -p="./build" -header-filter="^(?!.*third_party).*"
# build the project as release
[unix]
build:
- mkdir -p ./build && rm -rf ./build/* && cd build && cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release && ninja && cd ..
# build the project as debug
[unix]
build-debug:
- mkdir -p ./build && rm -rf ./build/* && cd build && cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug && ninja && cd ..
#############################
# Windows specific commands #
#############################
# install dependencies with vcpkg
[windows]
install:
- powershell.exe -Command "{{ env_var("VCPKG_BIN") }} install glfw3 glm glew assimp"
# build the project as release
[windows]
build:
- powershell.exe -Command "if (-Not (Test-Path ./build)) { New-Item -ItemType Directory -Path ./build }; Remove-Item -Recurse -Force ./build/*; cd build; cmake .. -A x64 -DCMAKE_TOOLCHAIN_FILE='{{ env_var("VCPKG_TOOLCHAIN") }}'; cmake --build . --config Release; cd .."
# build the project as debug
[windows]
build-debug:
- powershell.exe -Command "if (-Not (Test-Path ./build)) { New-Item -ItemType Directory -Path ./build }; Remove-Item -Recurse -Force ./build/*; cd build; cmake .. -A x64 -DCMAKE_TOOLCHAIN_FILE='{{ env_var("VCPKG_TOOLCHAIN") }}'; cmake --build . --config Debug; cd .."