diff options
author | Craig Scott <craig.scott@crascit.com> | 2021-11-14 06:22:28 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-11-16 14:45:26 (GMT) |
commit | 1bf6d5979d7fceae8b8a32129b5816bae459fb96 (patch) | |
tree | bd3aa76e7bf71173f7f5ccbd06fbf7788f2055e3 /Modules/GoogleTest.cmake | |
parent | 715af43124cbd99656c085cef4c37be1ea0cc7b0 (diff) | |
download | CMake-1bf6d5979d7fceae8b8a32129b5816bae459fb96.zip CMake-1bf6d5979d7fceae8b8a32129b5816bae459fb96.tar.gz CMake-1bf6d5979d7fceae8b8a32129b5816bae459fb96.tar.bz2 |
gtest_discover_tests: Re-run PRE_TEST discovery on any arg change
Fixes: #22912
Diffstat (limited to 'Modules/GoogleTest.cmake')
-rw-r--r-- | Modules/GoogleTest.cmake | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/GoogleTest.cmake b/Modules/GoogleTest.cmake index a483c03..fd14453 100644 --- a/Modules/GoogleTest.cmake +++ b/Modules/GoogleTest.cmake @@ -513,7 +513,8 @@ function(gtest_discover_tests TARGET) string(CONCAT ctest_include_content "if(EXISTS \"$<TARGET_FILE:${TARGET}>\")" "\n" " if(NOT EXISTS \"${ctest_tests_file}\" OR" "\n" - " NOT \"${ctest_tests_file}\" IS_NEWER_THAN \"$<TARGET_FILE:${TARGET}>\")" "\n" + " NOT \"${ctest_tests_file}\" IS_NEWER_THAN \"$<TARGET_FILE:${TARGET}>\" OR\n" + " NOT \"${ctest_tests_file}\" IS_NEWER_THAN \"\${CMAKE_CURRENT_LIST_FILE}\")\n" " include(\"${_GOOGLETEST_DISCOVER_TESTS_SCRIPT}\")" "\n" " gtest_discover_tests_impl(" "\n" " TEST_EXECUTABLE" " [==[" "$<TARGET_FILE:${TARGET}>" "]==]" "\n" |