summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorAlessandro <alessandro.pezzato@gmail.com>2018-09-03 13:53:43 (GMT)
committerCraig Scott <craig.scott@crascit.com>2018-09-10 08:21:48 (GMT)
commit31c82143bfdb1d9bc5e6282f3341fc09a0ab2234 (patch)
tree3487cc4c469d39f8e65c9b6494fa22997007b0f5 /Modules
parentd6b06d8d876a1cd240f347cdebe527354cb6fd2a (diff)
downloadCMake-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.cmake2
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})