summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-06-26 13:31:14 +0000
committerKitware Robot <kwrobot@kitware.com>2020-06-26 09:31:19 -0400
commit4f5503866ef32fbce7f0f136b062181037ee06ac (patch)
treeeb730cfb49e114f88eb097c6fa256ee54a3f937c
parent42d9b3dc6af8a70f1238fce5f5db2e5910452f0b (diff)
parent1458b4c048c4c68318f479569b91aeb9993439b8 (diff)
downloadcmake-4f5503866ef32fbce7f0f136b062181037ee06ac.tar.gz
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.rst4
-rw-r--r--Modules/GoogleTest.cmake2
-rw-r--r--Tests/RunCMake/GoogleTest/GoogleTest.cmake3
-rw-r--r--Tests/RunCMake/GoogleTest/GoogleTestDiscoveryMultiConfig.cmake3
-rw-r--r--Tests/RunCMake/GoogleTest/GoogleTestDiscoveryTimeout.cmake3
-rw-r--r--Tests/RunCMake/GoogleTest/GoogleTestXML.cmake3
6 files changed, 8 insertions, 10 deletions
diff --git a/Help/release/3.18.rst b/Help/release/3.18.rst
index c98b12a650..ef4fa305d1 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 f75d6ad372..b210a77153 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 fca292a1a6..6aa265876a 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 1919dc1d4c..df784feeb5 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 7398fafb03..20e9d657ad 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 c86de63f90..29bd05e6e2 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()