GoogleTest: Avoid POST_BUILD race condition for gtest_discover_tests()

Fix commit 6680df042e (GoogleTest: Avoid POST_BUILD race condition for
gtest_discover_tests(), 2025-10-26, v4.2.0-rc2~15^2) to actually hash
the target name instead of an empty string.

Fixes: #27319
This commit is contained in:
Brad King 2025-11-06 14:22:47 -05:00
parent 38095c2da5
commit 72ce711899

View File

@ -282,6 +282,7 @@ function(gtest_discover_tests_impl)
set(oneValueArgs
NO_PRETTY_TYPES # These two take a value, unlike gtest_discover_tests()
NO_PRETTY_VALUES #
TEST_TARGET
TEST_EXECUTABLE
TEST_WORKING_DIR
TEST_PREFIX
@ -420,6 +421,7 @@ if(CMAKE_SCRIPT_MODE_FILE)
gtest_discover_tests_impl(
NO_PRETTY_TYPES ${NO_PRETTY_TYPES}
NO_PRETTY_VALUES ${NO_PRETTY_VALUES}
TEST_TARGET ${TEST_TARGET}
TEST_EXECUTABLE ${TEST_EXECUTABLE}
TEST_EXECUTOR "${TEST_EXECUTOR}"
TEST_WORKING_DIR ${TEST_WORKING_DIR}