In a software project that builds a native C++ application (currently using Gradle 4.6), I would like to integrate unit tests written using Catch2 into the build. So far, I haven’t found out the proper way to do this. The guide to building native software and other resources only mention integration of Google Test and CUnit via the respective plugins, which do some stuff behind the scenes.
I suspect there is a generic way to integrate test suites using frameworks other than Google Test and CUnit, and that I probably merely need to know how the
testSuites {
...
}
block should look like, but I couldn’t find any hints helping with that.
I guess something like this has been done before, and I would be grateful for a recipe for how to do this properly, or a pointer to a part in the documentation explaining this, in case I missed it.
(Note that I also asked this on Stackoverflow, but the question has been downvoted there for some unexplained reason.)