From: Thanh Ha Date: Sat, 28 Jul 2018 22:09:08 +0000 (-0400) Subject: Use eval so that $cmake_opts is properly parsed X-Git-Tag: v0.23.0~1 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F28%2F12028%2F1;p=releng%2Fglobal-jjb.git Use eval so that $cmake_opts is properly parsed 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 --- diff --git a/shell/cmake-build.sh b/shell/cmake-build.sh index a6a41e4c..2466c173 100644 --- a/shell/cmake-build.sh +++ b/shell/cmake-build.sh @@ -27,7 +27,7 @@ mkdir -p "$build_dir" 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