[OpenMP][CMake] Fix an issue when there is space in the argument LIBOMPTARGET_LIT_ARGS
authorShilei Tian <tianshilei1992@gmail.com>
Mon, 19 Jul 2021 01:54:05 +0000 (21:54 -0400)
committerShilei Tian <tianshilei1992@gmail.com>
Mon, 19 Jul 2021 01:54:14 +0000 (21:54 -0400)
commit4504e1134c9118f3c322685f8a90129e09bab92c
tree184cf96b79b8e543ba4039d36d1d3630d831b137
parent0ce9acf61d0c6e7a785225975638a9941a009a0d
[OpenMP][CMake] Fix an issue when there is space in the argument LIBOMPTARGET_LIT_ARGS

D106236 added a new CMake argument for `libomptarget` test, but when user's
input contains white spaces, CMake will add escape char to the final lit command,
which leads to an error. This patch converts the user's input `LIBOMPTARGET_LIT_ARGS`
into a local array, and then passes the array to the function.

Reviewed By: JonChesterfield

Differential Revision: https://reviews.llvm.org/D106247
openmp/libomptarget/test/CMakeLists.txt