diff options
author | Brad King <brad.king@kitware.com> | 2015-05-05 13:35:20 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-05-05 13:35:20 (GMT) |
commit | 01c67f524e143a7f4287da4176dd94cec9d0ea71 (patch) | |
tree | be7f80b4895e8e6cfeb8d36a4be6492c5b8d8031 | |
parent | 9e3181a1128e7d4f830f56da397f0aaa04cb558d (diff) | |
parent | 0f927b440adbe3ecca1b8987ed8c5e442a324ff0 (diff) | |
download | CMake-01c67f524e143a7f4287da4176dd94cec9d0ea71.zip CMake-01c67f524e143a7f4287da4176dd94cec9d0ea71.tar.gz CMake-01c67f524e143a7f4287da4176dd94cec9d0ea71.tar.bz2 |
Merge topic 'FindGTest-fix-test-space-parsing'
0f927b44 FindGTest: Fix parsing of test macro calls with spaces (#15553)
-rw-r--r-- | Modules/FindGTest.cmake | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/FindGTest.cmake b/Modules/FindGTest.cmake index e6b5b0a..fccf877 100644 --- a/Modules/FindGTest.cmake +++ b/Modules/FindGTest.cmake @@ -115,11 +115,11 @@ function(GTEST_ADD_TESTS executable extra_args) # obtain sources used for building that executable get_property(ARGN TARGET ${executable} PROPERTY SOURCES) endif() - set(gtest_case_name_regex ".*\\( *([A-Za-z_0-9]+), *([A-Za-z_0-9]+) *\\).*") + set(gtest_case_name_regex ".*\\( *([A-Za-z_0-9]+) *, *([A-Za-z_0-9]+) *\\).*") set(gtest_test_type_regex "(TYPED_TEST|TEST_?[FP]?)") foreach(source ${ARGN}) file(READ "${source}" contents) - string(REGEX MATCHALL "${gtest_test_type_regex}\\(([A-Za-z_0-9 ,]+)\\)" found_tests ${contents}) + string(REGEX MATCHALL "${gtest_test_type_regex} *\\(([A-Za-z_0-9 ,]+)\\)" found_tests ${contents}) foreach(hit ${found_tests}) string(REGEX MATCH "${gtest_test_type_regex}" test_type ${hit}) |