Follow up to #32970
#32970#r2213730157
Does
cmake -S ...
still need to be wrapped inbash -c "..."
?
#32970#r2213741192
It is not trivial to replace. Maybe the
eval
hack from below can be used:0 # parses TEST_RUNNER_EXTRA as an array which allows for multiple arguments such as TEST_RUNNER_EXTRA='--exclude "rpc_bind.py --ipv6"' 1 2 eval "TEST_RUNNER_EXTRA=($TEST_RUNNER_EXTRA)"
however, I haven’t tried this yet.
#32970#r2213801696
Yeah, the eval hack should work:
0$ export T="-DREDUCE_EXPORTS=ON -DCMAKE_CXX_FLAGS='-Wno-psabi -Wno-error=maybe-uninitialized'"; eval "T=($T)"; for i in "${T[@]}"; do echo "_${i}_" ; done 1_-DREDUCE_EXPORTS=ON_ 2_-DCMAKE_CXX_FLAGS=-Wno-psabi -Wno-error=maybe-uninitialized_
(can be done in a follow-up)
This replaces the bash -c
wrapper with an eval-based array parsing to preserve spaces in flag values (e.g., in CMAKE_CXX_FLAGS), allowing ShellCheck to lint the cmake command