-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfigure
More file actions
executable file
·65 lines (52 loc) · 1.45 KB
/
configure
File metadata and controls
executable file
·65 lines (52 loc) · 1.45 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
#!/bin/bash
set -e
help() {
echo "$0 configures your Splinter build for you."
echo "Use: $0 [options], Where [optiona] are:"
echo "--with-lua"
echo "--with-wasm"
echo "--with-rust"
echo "--with-embeddings"
echo "--with-numa"
echo "--with-llama"
echo ""
echo "--dev can be passed as the only flag to just enable everything."
echo ""
echo "Once done, you can run 'make' / 'make install' / etc."
echo "To force re-compile, run 'rm -rf build'."
echo ""
echo "Valgrind is auto-detected during configuration."
}
CONFIG=""
for arg in "$@"; do
[ "${arg}" == "--help" ] && {
help
exit 0
}
[ "${arg}" == "--dev" ] && {
CONFIG="-DWITH_LUA=ON -DWITH_WASM=ON -DWITH_RUST=ON -DWITH_EMBEDDINGS=ON -DWITH_LLAMA=ON -DWITH_NUMA=ON "
break
}
[ "${arg}" == "--with-lua" ] && {
CONFIG="${CONFIG}-DWITH_LUA=ON "
}
[ "${arg}" == "--with-wasm" ] && {
CONFIG="${CONFIG}-DWITH_WASM=ON "
}
[ "${arg}" == "--with-rust" ] && {
CONFIG="${CONFIG}-DWITH_RUST=ON "
}
[ "${arg}" == "--with-embeddings" ] && {
CONFIG="${CONFIG} -DWITH_EMBEDDINGS=ON "
}
[ "${arg}" == "--with-llama" ] && {
CONFIG="${CONFIG} -DWITH_LLAMA=ON "
}
done
CONFIG="${CONFIG}.."
cmake -B build
cd build && cmake ${CONFIG}
echo ""
echo "Build configured; you can now run 'make'."
echo "To install afterwards, run 'sudo -E make install'."
echo ""