1. 10 Sep, 2018 1 commit
  2. 25 Jul, 2018 1 commit
    • Craig Scott's avatar
      GoogleTest: Ensure policy settings allow use of IN_LIST · 7ddc2a11
      Craig Scott authored
      If policy settings at the time the GoogleTest module is included are
      such that CMP0057 is unset or set to OLD, the use of IN_LIST with
      if() will lead to an error. Therefore, explicitly specify the policy
      settings for the whole file to ensure the function implementations
      have access to the required CMake features.
      
      Fixes: #18198
      7ddc2a11
  3. 15 Mar, 2018 1 commit
    • Craig Scott's avatar
      GoogleTest: Rename TIMEOUT parameter to avoid clash · 96fdde26
      Craig Scott authored
      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
      96fdde26
  4. 06 Dec, 2017 1 commit
    • Matthew Woehlke's avatar
      GoogleTest: Add timeout to discovery · 29731d89
      Matthew Woehlke authored
      Add a TIMEOUT option to gtest_discover_tests. This provides a
      work-around in case a test goes out to lunch, rather than causing the
      build to simply hang. (Although this is still a problem with the user's
      project, hanging the build is not cool, especially in the case of
      automatically running CI builds. It is much preferred that the build
      should actively fail in this case, and it is trivially easy for us to
      implement that.)
      29731d89
  5. 21 Nov, 2017 1 commit
    • Matthew Woehlke's avatar
      GoogleTest: Fix multiple discovery on same target · 70f9f62d
      Matthew Woehlke authored
      According to the documentation, tests can be discovered for a target
      multiple times by using a different prefix and/or suffix to ensure name
      uniqueness. However, while this worked for gtest_add_tests, it did not
      work with gtest_discover_tests because the generated file that sets up
      the tests was named based only on the target name, and so subsequent
      discovery from the same target would clobber earlier discovery.
      
      Fix this by introducing a counter that records how many times discovery
      has been used on a target, and use this to generate unique names of the
      generated test list files.
      70f9f62d
  6. 27 Jul, 2017 1 commit
    • Matthew Woehlke's avatar
      Add dynamic test discovery for for Google Test · bfcda401
      Matthew Woehlke authored
      Add a new gtest_discover_tests function to GoogleTest.cmake,
      implementing dynamic test discovery (i.e. tests are discovered by
      actually running the test executable and asking for the list of
      available tests, which is used to dynamically declare the tests) rather
      than the source-parsing approach used by gtest_add_tests. Compared to
      the source-parsing approach, this has the advantage of being robust
      against users declaring tests in unusual ways, and much better support
      for advanced features such as parameterized tests.
      
      A unit test, modeled after the TEST_INCLUDE_DIR[S] test, is also
      included. Note that the unit test does not actually require that Google
      Test is available. The new functionality does not actually depend on
      Google Test as such; it only requires that the test executable lists
      tests in the expected format when invoked with --gtest_list_tests, which
      the unit test can fake readily.
      bfcda401
  7. 05 Jun, 2017 1 commit
  8. 15 May, 2017 1 commit
    • Craig Scott's avatar
      GoogleTest: Expand capabilities of gtest_add_tests() · 6edd1806
      Craig Scott authored
      Now has keyword-based arguments (old syntax form is still supported).
      Discovered tests can have a prefix and/or suffix added to the test names
      and the list of discovered tests is available to the caller. The working
      dir can also be set and the dependency on the source files is now
      optional instead of mandatory.
      6edd1806
  9. 07 Feb, 2017 1 commit
    • Bradley Lowekamp's avatar
      GoogleTest: Add module to contain gtest_add_tests independently · 9837ed96
      Bradley Lowekamp authored
      Extract the `gtest_add_tests` macro from `FindGTest` into a separate
      module. GTest or GoogleTest can be used by a project in a several
      different ways, including installed libraries in the system, from an
      ExternalProject, or adding the GTest source directory as a sub directory
      of the project. As not all of these uses are supported by the FindGTest
      module the useful `gtest_add_tests` macro is separated to easily enable
      reuse.
      
      Issue: #14151
      9837ed96