gtest_discover_tests fails with targets containing colons (':') on Windows
Targets which are found from CMake package files often have a namespace, e.g. MyNamespace::my_test
. gtest_discover_tests
writes an include file of tests for CTest, but this doesn't work on Windows as filenames cannot contain colons.
I found this while looking for a workaround for #24427
CMake Error at C:/Program Files/CMake/share/cmake-3.23/Modules/GoogleTest.cmake:552 (file):
file failed to open for writing (Invalid argument):
blah/CodexHDEDevel::codexhdetest[1]_include.cmake
Call Stack (most recent call first):
blah/testing.cmake:17 (gtest_discover_tests)
CMakeLists.txt:47 (include)
Edited by Harry Mallon