diff options
author | Sergey Bobrenok <bobrofon@gmail.com> | 2019-05-15 15:10:39 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-06-07 17:14:29 (GMT) |
commit | e791ffac61912f6540742aabaf4cb78a4d475a16 (patch) | |
tree | b8aa85f7406bfc599ce113ecf32f5f0312d2db65 /Tests/RunCMake/CTestCommandExpandLists/expandEmptyCommand.cmake | |
parent | e2414ee13d1fad8b6775581d01975109c9867854 (diff) | |
download | CMake-e791ffac61912f6540742aabaf4cb78a4d475a16.zip CMake-e791ffac61912f6540742aabaf4cb78a4d475a16.tar.gz CMake-e791ffac61912f6540742aabaf4cb78a4d475a16.tar.bz2 |
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
Diffstat (limited to 'Tests/RunCMake/CTestCommandExpandLists/expandEmptyCommand.cmake')
-rw-r--r-- | Tests/RunCMake/CTestCommandExpandLists/expandEmptyCommand.cmake | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Tests/RunCMake/CTestCommandExpandLists/expandEmptyCommand.cmake b/Tests/RunCMake/CTestCommandExpandLists/expandEmptyCommand.cmake new file mode 100644 index 0000000..b75828e --- /dev/null +++ b/Tests/RunCMake/CTestCommandExpandLists/expandEmptyCommand.cmake @@ -0,0 +1,10 @@ +include(CTest) + +set(argv /bin/true) +list(POP_BACK argv) + +add_test( + NAME CommandExpandEmptyList + COMMAND "$<JOIN:${argv},;>" + COMMAND_EXPAND_LISTS +) |