summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-03-16 13:08:03 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2016-03-16 13:08:03 (GMT)
commit6e24546caea91493cd24c0ef60a6e54740f55f74 (patch)
tree1c110abceb3059e5a60b3629ace851e6d649ce9d /Modules
parentf5eda7069027790a73f2e7f72d81bd5c0db46eae (diff)
parenta5d3d003d0192f8d5fd87885f948338c04fc3f85 (diff)
downloadCMake-6e24546caea91493cd24c0ef60a6e54740f55f74.zip
CMake-6e24546caea91493cd24c0ef60a6e54740f55f74.tar.gz
CMake-6e24546caea91493cd24c0ef60a6e54740f55f74.tar.bz2
Merge topic 'FindGTest-depends'
a5d3d003 FindGTest: Automatically re-run cmake when tests change
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindGTest.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/FindGTest.cmake b/Modules/FindGTest.cmake
index ca49e4a..a7ffcfe 100644
--- a/Modules/FindGTest.cmake
+++ b/Modules/FindGTest.cmake
@@ -82,8 +82,7 @@
# ``AUTO`` to find them from executable target
#
# However, note that this macro will slow down your tests by running
-# an executable for each test and test fixture. You will also have to
-# re-run CMake after adding or removing tests or test fixtures.
+# an executable for each test and test fixture.
#
# Example usage::
#
@@ -119,6 +118,7 @@ function(GTEST_ADD_TESTS executable extra_args)
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})
+ set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${source})
file(READ "${source}" contents)
string(REGEX MATCHALL "${gtest_test_type_regex} *\\(([A-Za-z_0-9 ,]+)\\)" found_tests ${contents})
foreach(hit ${found_tests})