Skip to content

Commit ecc7a27

Browse files
committed
Update build script
1 parent 5d42bc3 commit ecc7a27

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

tools/build.sh

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ Options:
2222
2323
--help print this help then exit
2424
--mgr build the RabbitMQ management API
25+
--boost-root path
26+
set the Boost installation prefix
2527
--bxjsontools-prefix path
2628
set the bxjsontools installation prefix (implies --mgr)
2729
@@ -34,7 +36,7 @@ install_dir=$(pwd)/_install.d
3436
build_dir=$(pwd)/_build.d
3537

3638
devel=false
37-
boost_prefix=
39+
boost_root=
3840
bxjsontools_prefix=
3941
with_tests=false
4042
with_management=false
@@ -46,9 +48,9 @@ while [ -n "$1" ]; do
4648
my_exit 0
4749
elif [ "${opt}" = "--mgr" ]; then
4850
with_management=true
49-
elif [ "${opt}" = "--boost-prefix" ]; then
51+
elif [ "${opt}" = "--boost-root" ]; then
5052
shift 1
51-
boost_prefix="$1"
53+
boost_root="$1"
5254
elif [ "${opt}" = "--with-tests" ]; then
5355
with_tests=true
5456
elif [ ${with_management} = true -a "${opt}" = "--bxjsontools-prefix" ]; then
@@ -68,7 +70,7 @@ fi
6870
# curlpp_setup
6971
# rabbitmqc_setup
7072
# bxjsontools_setup
71-
echo >&2 "[info] Boost prefix = ${boost_prefix}"
73+
echo >&2 "[info] Boost root = ${boost_root}"
7274

7375
if [ ${with_management} = true ]; then
7476
echo >&2 "[info] Checking cURLpp..."
@@ -109,13 +111,17 @@ mkdir -p ${build_dir}
109111
cd ${build_dir}
110112
echo >&2 ""
111113
echo >&2 "[info] Configuring..."
114+
boost_option=""
115+
if [ "x${boost_root}" != "x" ]; then
116+
boost_option="-DBOOST_ROOT=${boost_root}"
117+
fi
112118
with_mgr_opts=""
113119
if [ ${with_management} = true ]; then
114120
with_mgr_opts="-DBxJsontools_DIR=${bxjsontools_prefix}"
115121
fi
116122
cmake \
117123
-DCMAKE_INSTALL_PREFIX="${install_dir}" \
118-
-DBOOST_ROOT=${boost_prefix} \
124+
${boost_option} \
119125
-DBXRABBITMQ_WITH_MANAGER=${with_management} \
120126
-DBXRABBITMQ_ENABLE_TESTING=${with_tests} \
121127
${with_mgr_opts} \

0 commit comments

Comments
 (0)