-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcommands.sh
More file actions
executable file
·54 lines (42 loc) · 919 Bytes
/
Copy pathcommands.sh
File metadata and controls
executable file
·54 lines (42 loc) · 919 Bytes
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
#!/bin/bash
all() {
set -e
BUILD_TYPES=("Debug" "Release" "RelWithDebInfo")
ROOT_DIR="build"
mkdir -p "$ROOT_DIR"
for TYPE in "${BUILD_TYPES[@]}"; do
DIR="$ROOT_DIR/$TYPE"
echo "==> Configuring $TYPE in $DIR"
cmake -G "Ninja" -B "$DIR" -DCMAKE_BUILD_TYPE=$TYPE .
done
cd build
ln -s Debug/compile_commands.json compile_commands.json
cd ..
}
debug() {
cmake --build build/Debug
}
release() {
cmake --build build/Release
}
reldeb() {
cmake --build build/RelWithDebInfo
}
connect() {
ssh -i /home/bigmat18/Utils/hpc/hpc-machine mgiuntoni@131.114.51.113
}
clean() {
rm -rf build/ out/
}
help() {
echo "Usage: $0 {all|debug|release|reldeb|connect|clean}"
}
case "$1" in
all) all ;;
debug) debug ;;
release) release ;;
reldeb) reldeb ;;
connect) connect ;;
clean) clean ;;
*) help ;;
esac