You can execute 'ctest -VV' from the command line, and if all the tests were created using add_test, everything will be executed.
If you want the custom build target to do the same, you can use this code:
add_custom_target(run_tests COMMAND "ctest -VV" )
I have a LOT of cmake code for code coverage and unit testing to show, but there is no point in copying / pasting, as it seems like you are just starting.
jerrylogansquare
source share