GoogleTest: Rename TIMEOUT parameter to avoid clash

In gtest_discover_tests(), the TIMEOUT keyword was making it
impossible to set the TIMEOUT test property via the PROPERTIES
keyword. This would be a frequent case, but it doesn't complain
and instead silently does something different to what would
normally be expected. The TIMEOUT keyword has been renamed
to DISCOVERY_TIMEOUT, thereby removing the clash.

This is a breaking change. 3.10.1 and 3.10.2 were the only versions
that supported the TIMEOUT keyword and uses of it were likely
not working as intended.

Fixes: #17801
This commit is contained in:
Craig Scott
2018-03-15 00:16:36 +11:00
committed by Brad King
parent c1e087a9d3
commit 96fdde26bb
15 changed files with 146 additions and 17 deletions

View File

@@ -139,7 +139,8 @@ Modules
This is robust against unusual ways of labeling tests, provides much better
support for advanced features such as parameterized tests, and does not
require re-running CMake to discover added or removed tests within a test
executable.
executable. Note that a breaking change was made in CMake 3.10.3 to address
an ambiguity of the ``TIMEOUT`` keyword (see :ref:`Release Notes 3.10.3`).
* The :module:`InstallRequiredSystemLibraries` module gained support
for installing Intel compiler runtimes.
@@ -267,3 +268,17 @@ Changes made since CMake 3.10.0 include the following.
* The :manual:`cmake-server(7)` ``codemodel`` response ``crossReferences``
field added by 3.10.0 has been dropped due to excessive memory usage.
Another approach will be needed to provide backtrace information.
.. _`Release Notes 3.10.3`:
3.10.3
------
* CMake 3.10.1 added a ``TIMEOUT`` option to :command:`gtest_discover_tests`
from the :module:`GoogleTest` module. That keyword clashed with the
``TIMEOUT`` test property, which is one of the common properties that
would be set with the command's ``PROPERTIES`` keyword, usually leading
to legal but unintended behavior. The keyword was changed to
``DISCOVERY_TIMEOUT`` in CMake 3.10.3 to address this problem. The
ambiguous behavior of the :command:`gtest_discover_tests` command's
``TIMEOUT`` keyword in 3.10.1 and 3.10.2 has not been preserved.