-
-
Notifications
You must be signed in to change notification settings - Fork 186
/
justfile
44 lines (33 loc) · 1.58 KB
/
justfile
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
[private]
default:
@cd {{ invocation_directory() }}; just --choose
_mk-dir name:
rm -rf {{ name }}
mkdir {{ name }}
build-valgrind-path := "build-valgrind-" + os() + "-" + arch()
# Create a build directory for a Debug build without ASAN, so that valgrind can work
mk-build-valgrind: (_mk-dir build-valgrind-path)
cd {{ build-valgrind-path }} ; cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Debug -Dimmer_BUILD_TESTS=ON -Dimmer_BUILD_PERSIST_TESTS=ON -Dimmer_BUILD_EXAMPLES=OFF -DCXX_STANDARD=17
[linux]
run-valgrind:
cd {{ build-valgrind-path }} ; ninja tests && ctest -D ExperimentalMemCheck
[linux]
run-valgrind-persist:
cd {{ build-valgrind-path }} ; ninja persist-tests && valgrind --quiet --error-exitcode=99 --leak-check=full --errors-for-leak-kinds=all \
--suppressions=../test/extra/persist/valgrind.supp \
./test/extra/persist/persist-tests
build-asan-path := "build-asan-" + os() + "-" + arch()
# Create a build directory for a Debug build with ASAN enabled
mk-build-asan: (_mk-dir build-asan-path)
cd {{ build-asan-path }} ; cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Debug -DENABLE_ASAN=ON -Dimmer_BUILD_TESTS=ON -Dimmer_BUILD_PERSIST_TESTS=ON -Dimmer_BUILD_EXAMPLES=OFF -DCXX_STANDARD=17
run-tests-asan:
cd {{ build-asan-path }} ; ninja tests && ninja test
build-docs-path := "build-docs-" + os() + "-" + arch()
[linux]
mk-build-docs: (_mk-dir build-docs-path)
rm -rf doc/_build
rm -rf doc/_doxygen
cmake -B {{ build-docs-path }} -G Ninja -Dimmer_BUILD_TESTS=off
[linux]
build-docs:
cmake --build {{ build-docs-path }} --target docs