-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
119 lines (91 loc) · 2.95 KB
/
justfile
File metadata and controls
119 lines (91 loc) · 2.95 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
set dotenv-load
# hx, vim, cursor, etc.
export EDITOR := 'code'
export BUILD_DIR := 'build'
# Set to any non-empty string for extra output
verbose := ''
# The build type for your own code
build_type := 'Debug'
# The build type for your dependencies, as specified in the conan profiles
conan_build_type := 'Release'
# We're using a multi-configuration generator so there's only one configure preset
cmake_configure_preset := 'conan-default'
cmake_build_preset := 'conan-' + shell('echo ' + build_type + ' | tr "[:upper:]" "[:lower:]"')
cmake_test_preset := cmake_build_preset
conan_build_profile := 'build'
conan_host_profile := 'conan/profiles/host'
# Command that will be invoked to open the `index.html` from the documentation.
# If running locally, you can use `xdg-open` to automatically select your system's default browser
browser := EDITOR
# Fedora already has the required packages
initialize-host:
sudo apt -y update
sudo apt -y install podman
venv:
uv venv
py-deps reinstall="0":
uv pip install --upgrade -e . \
{{ if reinstall == '1' { '--reinstall' } else { '' } }}
list-conan-profiles:
conan profile list
create-conan-profile name force='':
conan profile detect --name {{ name }} \
{{ if force != '' { '--force' } else { '' } }}
copy-conan-profile name:
cp conan/profiles/{{ name }} $(conan config home)/profiles/
edit-conan-profile profile:
{{ EDITOR }} $(conan config home)/profiles/{{ profile }}
# build_type=XXX means "use this build type for my dependencies"
# &:build_type=XXX means "use this build type for my code"
conan-install:
conan \
install \
-b missing \
-pr:b {{ conan_build_profile }} \
-pr:h {{ conan_host_profile }} \
-s build_type={{ conan_build_type }} \
-s '&':build_type={{ build_type }} \
conan
config:
cmake \
-S . \
-B {{ BUILD_DIR }} \
--preset {{ cmake_configure_preset }}
build target='all':
cmake \
--build {{ BUILD_DIR }} \
--preset {{ cmake_build_preset }} \
{{ if target != '' { '-t ' + target } else { '' } }} \
{{ if verbose != '' { '-v' } else { '' } }}
docs:
{{ browser }} $(realpath {{ BUILD_DIR }})/docs/html/index.html
test *args:
ctest \
--preset {{ cmake_test_preset }} \
{{ if verbose != '' { '--extra-verbose' } else { '' } }} \
{{ args }}
pre-commit:
prek run --all-files
pre-commit-install:
prek install
pre-commit-update:
prek autoupdate
clean:
rm -rf \
{{ BUILD_DIR }} \
*conan*.sh \
CMakeUserPresets.json
clean-python:
rm -rf \
uv.lock \
.venv
clean-all:
just clean clean-python
# Cleans cached conan packages
clean-conan pattern='*' force='':
conan remove '{{ pattern }}' \
{{ if force != '' { '--confirm' } else { '' } }}
init-submodules:
git submodule update --init --recursive
update-submodules:
git submodule foreach git pull origin main