diff options
author | Brad King <brad.king@kitware.com> | 2020-06-26 13:31:14 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-06-26 13:31:19 (GMT) |
commit | 4f5503866ef32fbce7f0f136b062181037ee06ac (patch) | |
tree | eb730cfb49e114f88eb097c6fa256ee54a3f937c | |
parent | 42d9b3dc6af8a70f1238fce5f5db2e5910452f0b (diff) | |
parent | 1458b4c048c4c68318f479569b91aeb9993439b8 (diff) | |
download | CMake-4f5503866ef32fbce7f0f136b062181037ee06ac.zip CMake-4f5503866ef32fbce7f0f136b062181037ee06ac.tar.gz CMake-4f5503866ef32fbce7f0f136b062181037ee06ac.tar.bz2 |
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 <kwrobot@kitware.com>
Merge-request: !4938
-rw-r--r-- | Help/release/3.18.rst | 4 | ||||
-rw-r--r-- | Modules/GoogleTest.cmake | 2 | ||||
-rw-r--r-- | Tests/RunCMake/GoogleTest/GoogleTest.cmake | 3 | ||||
-rw-r--r-- | Tests/RunCMake/GoogleTest/GoogleTestDiscoveryMultiConfig.cmake | 3 | ||||
-rw-r--r-- | Tests/RunCMake/GoogleTest/GoogleTestDiscoveryTimeout.cmake | 3 | ||||
-rw-r--r-- | Tests/RunCMake/GoogleTest/GoogleTestXML.cmake | 3 |
6 files changed, 8 insertions, 10 deletions
diff --git a/Help/release/3.18.rst b/Help/release/3.18.rst index c98b12a..ef4fa30 100644 --- a/Help/release/3.18.rst +++ b/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. diff --git a/Modules/GoogleTest.cmake b/Modules/GoogleTest.cmake index f75d6ad..b210a77 100644 --- a/Modules/GoogleTest.cmake +++ b/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 diff --git a/Tests/RunCMake/GoogleTest/GoogleTest.cmake b/Tests/RunCMake/GoogleTest/GoogleTest.cmake index fca292a..6aa2658 100644 --- a/Tests/RunCMake/GoogleTest/GoogleTest.cmake +++ b/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() diff --git a/Tests/RunCMake/GoogleTest/GoogleTestDiscoveryMultiConfig.cmake b/Tests/RunCMake/GoogleTest/GoogleTestDiscoveryMultiConfig.cmake index 1919dc1..df784fe 100644 --- a/Tests/RunCMake/GoogleTest/GoogleTestDiscoveryMultiConfig.cmake +++ b/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() diff --git a/Tests/RunCMake/GoogleTest/GoogleTestDiscoveryTimeout.cmake b/Tests/RunCMake/GoogleTest/GoogleTestDiscoveryTimeout.cmake index 7398faf..20e9d65 100644 --- a/Tests/RunCMake/GoogleTest/GoogleTestDiscoveryTimeout.cmake +++ b/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() diff --git a/Tests/RunCMake/GoogleTest/GoogleTestXML.cmake b/Tests/RunCMake/GoogleTest/GoogleTestXML.cmake index c86de63..29bd05e 100644 --- a/Tests/RunCMake/GoogleTest/GoogleTestXML.cmake +++ b/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() |