summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-11-19 14:10:27 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-11-19 14:10:27 (GMT)
commitdb952a58178daebfcd821b7a7d9a7f3ee1279bc8 (patch)
treea5aad0c60f3a6e48aa0906ee98b5d7feeb2a0dc3
parent65b9d1f228efb1d028c3682ec5637f431cbc3fc5 (diff)
parentb5e7b22defa353894ad999df83b90ae45f163d61 (diff)
downloadCMake-db952a58178daebfcd821b7a7d9a7f3ee1279bc8.zip
CMake-db952a58178daebfcd821b7a7d9a7f3ee1279bc8.tar.gz
CMake-db952a58178daebfcd821b7a7d9a7f3ee1279bc8.tar.bz2
Merge topic 'FindGTest-avoid-CMP0064'
b5e7b22d FindGTest: Refactor test type checks to avoid cases triggering CMP0064
-rw-r--r--Modules/FindGTest.cmake6
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/FindGTest.cmake b/Modules/FindGTest.cmake
index fccf877..eb7abfd 100644
--- a/Modules/FindGTest.cmake
+++ b/Modules/FindGTest.cmake
@@ -124,11 +124,11 @@ function(GTEST_ADD_TESTS executable extra_args)
string(REGEX MATCH "${gtest_test_type_regex}" test_type ${hit})
# Parameterized tests have a different signature for the filter
- if(${test_type} STREQUAL "TEST_P")
+ if("x${test_type}" STREQUAL "xTEST_P")
string(REGEX REPLACE ${gtest_case_name_regex} "*/\\1.\\2/*" test_name ${hit})
- elseif(${test_type} STREQUAL "TEST_F" OR ${test_type} STREQUAL "TEST")
+ elseif("x${test_type}" STREQUAL "xTEST_F" OR "x${test_type}" STREQUAL "xTEST")
string(REGEX REPLACE ${gtest_case_name_regex} "\\1.\\2" test_name ${hit})
- elseif(${test_type} STREQUAL "TYPED_TEST")
+ elseif("x${test_type}" STREQUAL "xTYPED_TEST")
string(REGEX REPLACE ${gtest_case_name_regex} "\\1/*.\\2" test_name ${hit})
else()
message(WARNING "Could not parse GTest ${hit} for adding to CTest.")