-
Notifications
You must be signed in to change notification settings - Fork 28
/
configure
executable file
·59 lines (47 loc) · 1.17 KB
/
configure
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
#!/bin/bash
##
usage() {
cat <<USAGE >&2
Usage: $0 [<options>] [<additional cmake arguments>]
Available options:
--prefix <prefix> Installation prefix (-DCMAKE_INSTALL_PREFIX)
--{en|dis}able-corba Enable/Disable CORBA transport plugin (-DENABLE_CORBA)
--omniorb Select CORBA implementation OmniORB
--tao Select CORBA implementation TAO
USAGE
exit 1
}
## Parse command line arguments
CMAKE_ARGS=()
while (( "$#" )); do
case "$1" in
--help|-h)
usage ;;
--prefix=*)
# set as two separate options
prefix=${1#--prefix=}
shift
set -- --prefix "${prefix}" "$@"
;;
--prefix)
CMAKE_ARGS+=("-DCMAKE_INSTALL_PREFIX=$2")
shift 2 ;;
--enable-corba)
CMAKE_ARGS+=("-DENABLE_CORBA=ON")
shift ;;
--disable-corba)
CMAKE_ARGS+=("-DENABLE_CORBA=OFF")
shift ;;
--omniorb)
CMAKE_ARGS+=("-DCORBA_IMPLEMENTATION=OMNIORB")
shift ;;
--tao)
CMAKE_ARGS+=("-DCORBA_IMPLEMENTATION=TAO")
shift ;;
*)
CMAKE_ARGS+=("$1")
shift ;;
esac
done
## Invoke cmake
mkdir -p build && cd build && cmake .. "${CMAKE_ARGS[@]}"