Without eval bash inserts single quotes and breaks parameters passed
if they have quotes in the parameters. For example
`-D CMAKE_CXX_FLAGS="-fPIC -std=gnu++11"`
Issue: RELENG-1075
Change-Id: I77046a7edc0516f0ae28dd2b8cd2c8994ad5079e
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
cd "$build_dir" || exit
# $cmake_opts needs to wordsplit to pass options.
# shellcheck disable=SC2086
-cmake -DCMAKE_INSTALL_PREFIX="$INSTALL_PREFIX" $cmake_opts ..
+eval cmake -DCMAKE_INSTALL_PREFIX="$INSTALL_PREFIX" $cmake_opts ..
# $make_opts needs to wordsplit to pass options.
# shellcheck disable=SC2086
make $make_opts