Definitely no need to write new C++ code in this case! As noted here I view this mostly as a modernization of the existing FindXCTest
so I think FindXCTest
(or FindSwiftXCTest
if my code can’t be made to work with Objective-C on macOS—I haven’t tried that) would be appropriate.
The one complication I see is that support for non-macOS platforms involves building and running a code generator written in Swift. I don’t know if there’s any precedent for including something like that in CMake… but ideally the whole thing belongs there.