forked from kaby76/Campy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
kens-campy-link-9-1.sh
59 lines (53 loc) · 1 KB
/
kens-campy-link-9-1.sh
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
#!/bin/bash
export PATH="/usr/local/cuda-9.1/bin${PATH:+:${PATH}}"
export LD_LIBRARY_PATH="/usr/local/cuda-9.1/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}"
nvccargs=""
POSITIONAL=()
while [[ $# -gt 0 ]]
do
key="$1"
shift
case $key in
-c) # specifies compile only
nvccargs="$nvccargs -c "
;;
-x) # specifies the language
nvccargs="$nvccargs -x cu "
shift
;;
-I)
nvccargs="$nvccargs -I'$1' "
shift
;;
-W*)
# nvccargs="$nvccargs --compiler-options '$key' "
;;
-o)
file=$1
nvccargs="$nvccargs -o $1 "
shift
;;
-g1)
# nvccargs="$nvccargs --compiler-options -g1 "
;;
-O3)
# nvccargs="$nvccargs --compiler-options -O3 "
;;
-D*)
nvccargs="$nvccargs $key "
;;
-f*)
nvccargs="$nvccargs --compiler-options $key "
;;
-std*)
# nvccargs="$nvccargs --compiler-options $key "
;;
-g*)
;;
*)
nvccargs="$nvccargs $key "
;;
esac
done
nvcc -dlink $nvccargs
exit 0