CMake/Tests/RunCMake/CTestCommandExpandLists/expandEmptyCommand.cmake
Sergey Bobrenok e791ffac61 add_test: Add COMMAND_EXPAND_LISTS option
Add a `COMMAND_EXPAND_LISTS` option to the `add_test` command to cause
`;`-separated lists produced by generator expressions to be expanded
into multiple arguments.  The `add_custom_command` command already
has such an option.

Fixes: #17284
2019-06-07 13:14:29 -04:00

11 lines
152 B
CMake

include(CTest)
set(argv /bin/true)
list(POP_BACK argv)
add_test(
NAME CommandExpandEmptyList
COMMAND "$<JOIN:${argv},;>"
COMMAND_EXPAND_LISTS
)