diff options
author | Brad King <brad.king@kitware.com> | 2024-10-02 12:11:37 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2024-10-02 12:11:57 (GMT) |
commit | 823e0a3a6187f02c06b86c32d6966eff25b9abc8 (patch) | |
tree | 8215f0d010f3bcc7fb50bef49c29a937b80f4884 /Help | |
parent | d8bdc9f3af34173c240e7209f2a0c0303f832e8e (diff) | |
parent | fc7aa3cd69eee1cdb001e6a28f36ddd01cefe720 (diff) | |
download | CMake-823e0a3a6187f02c06b86c32d6966eff25b9abc8.zip CMake-823e0a3a6187f02c06b86c32d6966eff25b9abc8.tar.gz CMake-823e0a3a6187f02c06b86c32d6966eff25b9abc8.tar.bz2 |
Merge topic 'preserve-empty-args-test-command-lines'
fc7aa3cd69 tests: Preserve empty arguments in test command lines
9f1703530b Help: Add pre-test to prose for gtest_discover_tests()
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9575
Diffstat (limited to 'Help')
-rw-r--r-- | Help/manual/cmake-policies.7.rst | 1 | ||||
-rw-r--r-- | Help/policy/CMP0178.rst | 37 | ||||
-rw-r--r-- | Help/release/dev/preserve-empty-args-test-command-lines.rst | 19 |
3 files changed, 57 insertions, 0 deletions
diff --git a/Help/manual/cmake-policies.7.rst b/Help/manual/cmake-policies.7.rst index 3b97848..796ce8b 100644 --- a/Help/manual/cmake-policies.7.rst +++ b/Help/manual/cmake-policies.7.rst @@ -57,6 +57,7 @@ Policies Introduced by CMake 3.31 .. toctree:: :maxdepth: 1 + CMP0178: Test command lines preserve empty arguments. </policy/CMP0178> CMP0177: install() DESTINATION paths are normalized. </policy/CMP0177> CMP0176: execute_process() ENCODING is UTF-8 by default. </policy/CMP0176> CMP0175: add_custom_command() rejects invalid arguments. </policy/CMP0175> diff --git a/Help/policy/CMP0178.rst b/Help/policy/CMP0178.rst new file mode 100644 index 0000000..f6152eb --- /dev/null +++ b/Help/policy/CMP0178.rst @@ -0,0 +1,37 @@ +CMP0178 +------- + +.. versionadded:: 3.31 + +Test command lines preserve empty arguments. + +Empty values in the :prop_tgt:`TEST_LAUNCHER` and +:prop_tgt:`CROSSCOMPILING_EMULATOR` target properties are now preserved +for tests added by the following: + +* The :command:`add_test` command. +* The :command:`ExternalData_Add_Test` command from the :module:`ExternalData` + module. +* The :command:`gtest_add_tests` or :command:`gtest_discover_tests` commands + from the :module:`GoogleTest` module. + +For the :command:`gtest_add_tests` and :command:`gtest_discover_tests` +commands, empty elements in the values passed after the ``EXTRA_ARGS`` +keyword are also now preserved. + +The ``OLD`` behavior of this policy silently discards empty list items +from the :prop_tgt:`TEST_LAUNCHER` and :prop_tgt:`CROSSCOMPILING_EMULATOR` +target properties in the above-mentioned cases. It also silently discards +empty items from the values given after ``EXTRA_ARGS`` for the +:command:`gtest_add_tests` and :command:`gtest_discover_tests` commands. + +The ``NEW`` behavior of this policy preserves empty list items in the +:prop_tgt:`TEST_LAUNCHER` and :prop_tgt:`CROSSCOMPILING_EMULATOR` target +properties, and in values given after ``EXTRA_ARGS`` for +:command:`gtest_add_tests` and :command:`gtest_discover_tests`. + +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.31 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt + +.. include:: DEPRECATED.txt diff --git a/Help/release/dev/preserve-empty-args-test-command-lines.rst b/Help/release/dev/preserve-empty-args-test-command-lines.rst new file mode 100644 index 0000000..a533ac8 --- /dev/null +++ b/Help/release/dev/preserve-empty-args-test-command-lines.rst @@ -0,0 +1,19 @@ +preserve-empty-args-test-command-lines +-------------------------------------- + +* Empty list elements in the :prop_tgt:`TEST_LAUNCHER` and + :prop_tgt:`CROSSCOMPILING_EMULATOR` target properties are now preserved + when the executable for a command given to :command:`add_test` is a CMake + target. See policy :policy:`CMP0178`. + +* Empty list elements in the :prop_tgt:`TEST_LAUNCHER` and + :prop_tgt:`CROSSCOMPILING_EMULATOR` target properties are now preserved + for the test created by :command:`ExternalData_Add_Test` from the + :module:`ExternalData` module. See policy :policy:`CMP0178`. + +* Empty list elements in the :prop_tgt:`TEST_LAUNCHER` and + :prop_tgt:`CROSSCOMPILING_EMULATOR` target properties are now preserved + for tests created by :command:`gtest_add_tests` and + :command:`gtest_discover_tests` from the :module:`GoogleTest` module. + Empty list elements after the ``EXTRA_ARGS`` keyword of these two commands + are also now preserved. See policy :policy:`CMP0178`. |