mirror of
https://github.com/reactos/CMake.git
synced 2024-11-25 12:40:06 +00:00
Merge topic 'FindGTest-fix-test-space-parsing'
0f927b44
FindGTest: Fix parsing of test macro calls with spaces (#15553)
This commit is contained in:
commit
01c67f524e
@ -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})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user