Merge branch 'FindGTest-avoid-CMP0064' into release

This commit is contained in:
Brad King 2015-11-18 10:43:56 -05:00
commit ce7da2dec4
1 changed files with 3 additions and 3 deletions

View File

@ -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.")