![]() |
TCM 1.1.0
A CMake module to reduce boilerplate
|
TCM provides a single function for testing using Catch2.
If no NAME
is provided, then sources files are added to default target ${PROJECT_NAME}_Tests
. Otherwise, a target with provided name is created.
Every target is linked with Catch2::Catch2WithMain
, so no need to provide a main
function. Multiple calls with the same target will just add sources files to the target.
Benchmark target can also be linked with LIBRARIES
targets
If you wish to override Catch2, do the following once before calling ${PROJECT_NAME}_Tests
: