Browse Source

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
Brad King 3 weeks ago
parent
commit
72ce711899
1 changed files with 2 additions and 0 deletions
  1. 2 0
      Modules/GoogleTestAddTests.cmake

+ 2 - 0
Modules/GoogleTestAddTests.cmake

@@ -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}