summaryrefslogtreecommitdiffstats
path: root/Modules/GoogleTestAddTests.cmake
diff options
context:
space:
mode:
authorPaul-Antoine Arras <paarras@quarkslab.com>2021-12-17 14:31:09 (GMT)
committerPaul-Antoine Arras <paarras@quarkslab.com>2021-12-17 15:50:12 (GMT)
commit0f51987d42f5b7842d3ab95e9801bc3e4f32c951 (patch)
treee7ebe074030984160f0b79f5ef6ea633c06c329a /Modules/GoogleTestAddTests.cmake
parent3930c354f8d3669234c783505bc84dfe7ee9dcdb (diff)
downloadCMake-0f51987d42f5b7842d3ab95e9801bc3e4f32c951.zip
CMake-0f51987d42f5b7842d3ab95e9801bc3e4f32c951.tar.gz
CMake-0f51987d42f5b7842d3ab95e9801bc3e4f32c951.tar.bz2
GoogleTest: show test executor in error message
Fixes: #22920
Diffstat (limited to 'Modules/GoogleTestAddTests.cmake')
-rw-r--r--Modules/GoogleTestAddTests.cmake7
1 files changed, 6 insertions, 1 deletions
diff --git a/Modules/GoogleTestAddTests.cmake b/Modules/GoogleTestAddTests.cmake
index 6b3bf34..dffbc46 100644
--- a/Modules/GoogleTestAddTests.cmake
+++ b/Modules/GoogleTestAddTests.cmake
@@ -80,9 +80,14 @@ function(gtest_discover_tests_impl)
)
if(NOT ${result} EQUAL 0)
string(REPLACE "\n" "\n " output "${output}")
+ if(_TEST_EXECUTOR)
+ set(path "${_TEST_EXECUTOR} ${_TEST_EXECUTABLE}")
+ else()
+ set(path "${_TEST_EXECUTABLE}")
+ endif()
message(FATAL_ERROR
"Error running test executable.\n"
- " Path: '${_TEST_EXECUTABLE}'\n"
+ " Path: '${path}'\n"
" Result: ${result}\n"
" Output:\n"
" ${output}\n"