Quellcode durchsuchen

Merge topic 'GoogleTest-DISCOVERY_MODE-cleanups' into release-3.18

1458b4c048 Help: Add CMAKE_GTEST_DISCOVER_TESTS_DISCOVERY_MODE to release notes
642ea49115 GoogleTest: Replace SEND_ERROR with FATAL_ERROR
09c38e8de6 Tests: Don't ask for things not required for GoogleTest

Acked-by: Kitware Robot <[email protected]>
Merge-request: !4938
Brad King vor 5 Jahren
Ursprung
Commit
4f5503866e

+ 3 - 1
Help/release/3.18.rst

@@ -194,7 +194,9 @@ Modules
 
   * gained a new ``DISCOVERY_MODE`` option to control when the test
     discovery step is run.  It offers a new ``PRE_TEST`` setting to
-    run the discovery at test time instead of build time.
+    run the discovery at test time instead of build time.  A new
+    ``CMAKE_GTEST_DISCOVER_TESTS_DISCOVERY_MODE`` variable can be used
+    to change the default globally.
 
   * gained a new optional parameter ``XML_OUTPUT_DIR``. When set the
     JUnit XML test results are stored in that directory.

+ 1 - 1
Modules/GoogleTest.cmake

@@ -527,7 +527,7 @@ function(gtest_discover_tests TARGET)
     endif()
 
   else()
-    message(SEND_ERROR "Unknown DISCOVERY_MODE: ${_DISCOVERY_MODE}")
+    message(FATAL_ERROR "Unknown DISCOVERY_MODE: ${_DISCOVERY_MODE}")
   endif()
 
   # Add discovered tests to directory TEST_INCLUDE_FILES

+ 1 - 2
Tests/RunCMake/GoogleTest/GoogleTest.cmake

@@ -1,5 +1,4 @@
-project(test_include_dirs)
-include(CTest)
+project(test_include_dirs LANGUAGES CXX)
 include(GoogleTest)
 
 enable_testing()

+ 1 - 2
Tests/RunCMake/GoogleTest/GoogleTestDiscoveryMultiConfig.cmake

@@ -1,5 +1,4 @@
-project(test_include_dirs)
-include(CTest)
+project(test_include_dirs LANGUAGES CXX)
 include(GoogleTest)
 
 enable_testing()

+ 1 - 2
Tests/RunCMake/GoogleTest/GoogleTestDiscoveryTimeout.cmake

@@ -1,5 +1,4 @@
-project(test_include_dirs)
-include(CTest)
+project(test_include_dirs LANGUAGES CXX)
 include(GoogleTest)
 
 enable_testing()

+ 1 - 2
Tests/RunCMake/GoogleTest/GoogleTestXML.cmake

@@ -1,5 +1,4 @@
-project(test_include_dirs)
-include(CTest)
+project(test_include_dirs LANGUAGES CXX)
 include(GoogleTest)
 
 enable_testing()