diff options
author | Alessandro <alessandro.pezzato@gmail.com> | 2018-09-03 13:53:43 (GMT) |
---|---|---|
committer | Craig Scott <craig.scott@crascit.com> | 2018-09-10 08:21:48 (GMT) |
commit | 31c82143bfdb1d9bc5e6282f3341fc09a0ab2234 (patch) | |
tree | 3487cc4c469d39f8e65c9b6494fa22997007b0f5 /Modules | |
parent | d6b06d8d876a1cd240f347cdebe527354cb6fd2a (diff) | |
download | CMake-31c82143bfdb1d9bc5e6282f3341fc09a0ab2234.zip CMake-31c82143bfdb1d9bc5e6282f3341fc09a0ab2234.tar.gz CMake-31c82143bfdb1d9bc5e6282f3341fc09a0ab2234.tar.bz2 |
GoogleTest: gtest_add_tests() fails if any source file is empty
Fixes #18321
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/GoogleTest.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/GoogleTest.cmake b/Modules/GoogleTest.cmake index 2c9ee11..a5bb863 100644 --- a/Modules/GoogleTest.cmake +++ b/Modules/GoogleTest.cmake @@ -308,7 +308,7 @@ function(gtest_add_tests) set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${source}) endif() 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}) |