[CMake] CTest + Catch Framework

Robert Dailey rcdailey.lists at gmail.com
Mon Jan 26 00:30:49 EST 2015


Hi,

I'm using Catch as my unit test framework:
https://github.com/philsquared/Catch

Is it possible for CTest to report each TEST_CASE block as an
individual test? My understanding is that CTest will only treat each
executable as a test. However, my test structure is as follows:

1 library
1 test project

Each test project has 1 test CPP file per each class in the library.
This way I implement tests for classes in a corresponding CPP file.

Each CPP file contains multiple test cases (defined by TEST_CASE macro).

The resulting output of `ctest -T Test` shows only 1 test, even though
that may be around 50 test cases. I'd like CMake to show the pass/fail
status of each one. Is this possible?


More information about the CMake mailing list