summaryrefslogtreecommitdiffstats
path: root/Help/command/add_test.rst
diff options
context:
space:
mode:
authorSergey Bobrenok <bobrofon@gmail.com>2019-05-15 15:10:39 (GMT)
committerBrad King <brad.king@kitware.com>2019-06-07 17:14:29 (GMT)
commite791ffac61912f6540742aabaf4cb78a4d475a16 (patch)
treeb8aa85f7406bfc599ce113ecf32f5f0312d2db65 /Help/command/add_test.rst
parente2414ee13d1fad8b6775581d01975109c9867854 (diff)
downloadCMake-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 'Help/command/add_test.rst')
-rw-r--r--Help/command/add_test.rst8
1 files changed, 7 insertions, 1 deletions
diff --git a/Help/command/add_test.rst b/Help/command/add_test.rst
index 46b9b63..884b2ee 100644
--- a/Help/command/add_test.rst
+++ b/Help/command/add_test.rst
@@ -7,7 +7,8 @@ Add a test to the project to be run by :manual:`ctest(1)`.
add_test(NAME <name> COMMAND <command> [<arg>...]
[CONFIGURATIONS <config>...]
- [WORKING_DIRECTORY <dir>])
+ [WORKING_DIRECTORY <dir>]
+ [COMMAND_EXPAND_LISTS])
Adds a test called ``<name>``. The test name may not contain spaces,
quotes, or other characters special in CMake syntax. The options are:
@@ -28,6 +29,11 @@ quotes, or other characters special in CMake syntax. The options are:
directory set to the build directory corresponding to the
current source directory.
+``COMMAND_EXPAND_LISTS``
+ Lists in ``COMMAND`` arguments will be expanded, including those
+ created with
+ :manual:`generator expressions <cmake-generator-expressions(7)>`.
+
The given test command is expected to exit with code ``0`` to pass and
non-zero to fail, or vice-versa if the :prop_test:`WILL_FAIL` test
property is set. Any output written to stdout or stderr will be