Enable ctest command
No idea how to add "tests" the CMake way. After reading some docs, I've added this to /CMakeLists.txt file:
enable_testing()
add_test(NAME unittest COMMAND test_sdptransform WORKING_DIRECTORY build)
but it does nothing...
We're using Catch for testing in our project at sony/nmos-cpp, and I created the catch_discover_tests function for CMake to provide dynamic discovery of Catch test cases from the test suite executable.
It then probably boils down to just:
enable_testing()
include(Catch)
catch_discover_tests(test_sdptransform EXTRA_ARGS -r compact)
See our CMakeLists.txt and the couple of CMake files that are required in our third_party/cmake directory.
Thanks! will check when I get some time :)
Hi, I've tried to understand how you have integrated Catch into your CMakeLists.txt but it's beyond my knowledge and I'm completely lost... :(
Couldn't be just easier in my scenario? I don't need tests autodiscovery...