[Cmake-commits] CMake branch, master, updated. v3.12.2-601-g344eb9c
Kitware Robot
kwrobot at kitware.com
Tue Sep 11 09:45:02 EDT 2018
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, master has been updated
via 344eb9c8dc3b16a524729cb66ad25fc1c127a02c (commit)
via 31c82143bfdb1d9bc5e6282f3341fc09a0ab2234 (commit)
via d6b06d8d876a1cd240f347cdebe527354cb6fd2a (commit)
from 528d7625b89e0343bbf541edd256971493a6e455 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=344eb9c8dc3b16a524729cb66ad25fc1c127a02c
commit 344eb9c8dc3b16a524729cb66ad25fc1c127a02c
Merge: 528d762 31c8214
Author: Craig Scott <craig.scott at crascit.com>
AuthorDate: Tue Sep 11 13:42:24 2018 +0000
Commit: Kitware Robot <kwrobot at kitware.com>
CommitDate: Tue Sep 11 09:42:31 2018 -0400
Merge topic 'gtest_add_tests-empty-file'
31c82143bf GoogleTest: gtest_add_tests() fails if any source file is empty
d6b06d8d87 GoogleTest: Modify test to verify that empty files can be scanned
Acked-by: Kitware Robot <kwrobot at kitware.com>
Merge-request: !2342
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=31c82143bfdb1d9bc5e6282f3341fc09a0ab2234
commit 31c82143bfdb1d9bc5e6282f3341fc09a0ab2234
Author: Alessandro <alessandro.pezzato at gmail.com>
AuthorDate: Mon Sep 3 09:53:43 2018 -0400
Commit: Craig Scott <craig.scott at crascit.com>
CommitDate: Mon Sep 10 16:21:48 2018 +0800
GoogleTest: gtest_add_tests() fails if any source file is empty
Fixes #18321
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})
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d6b06d8d876a1cd240f347cdebe527354cb6fd2a
commit d6b06d8d876a1cd240f347cdebe527354cb6fd2a
Author: Craig Scott <craig.scott at crascit.com>
AuthorDate: Mon Sep 10 16:20:40 2018 +0800
Commit: Craig Scott <craig.scott at crascit.com>
CommitDate: Mon Sep 10 16:21:48 2018 +0800
GoogleTest: Modify test to verify that empty files can be scanned
The modified test confirms the bug described in issue #18321.
diff --git a/Tests/GoogleTest/Test/CMakeLists.txt b/Tests/GoogleTest/Test/CMakeLists.txt
index f798d31..baf00d5 100644
--- a/Tests/GoogleTest/Test/CMakeLists.txt
+++ b/Tests/GoogleTest/Test/CMakeLists.txt
@@ -44,12 +44,13 @@ endif()
set_tests_properties(set2.GoogleTest.ConditionalFail.foo PROPERTIES WILL_FAIL YES)
-# Search specific sources to get the test list
-add_executable(test_gtest2 main2.cxx)
+# Search specific sources to get the test list. Include an empty file
+# to ensure they are handled correctly too.
+add_executable(test_gtest2 main2.cxx empty.cxx)
target_link_libraries(test_gtest2 GTest::Main)
gtest_add_tests(TARGET test_gtest2
TEST_LIST testList
- SOURCES main2.h
+ SOURCES main2.h empty.cxx
)
set(expectedTests
GoogleTest.SomethingElse
diff --git a/Tests/GoogleTest/Test/empty.cxx b/Tests/GoogleTest/Test/empty.cxx
new file mode 100644
index 0000000..e69de29
-----------------------------------------------------------------------
Summary of changes:
Modules/GoogleTest.cmake | 2 +-
Tests/GoogleTest/Test/CMakeLists.txt | 7 ++++---
Tests/{Wrapping/vtkIncluded.cxx => GoogleTest/Test/empty.cxx} | 0
3 files changed, 5 insertions(+), 4 deletions(-)
copy Tests/{Wrapping/vtkIncluded.cxx => GoogleTest/Test/empty.cxx} (100%)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list