There is a change on CMake master already which adds a new TEST_LAUNCHER
test property and corresponding CMAKE_TEST_LAUNCHER
variable. It will appear in CMake 3.29.0, and the release cycle for that will probably start in a couple of weeks. One could mount an argument that perhaps that property should also be used when obtaining the test list by running some-exe --gtest_list_tests
. Here’s the relevant change:
https://gitlab.kitware.com/cmake/cmake/-/merge_requests/8963
@brad.king It would be considerably simpler to decide whether this should be included in the test discovery step of gtest_discover_tests()
before the 3.29.0 release than to try to change that behavior later with a policy. If we put a change in now to make the test discovery use the launcher as well, then that means we can say from the beginning that it is the launcher’s responsibility to handle it. Thoughts?