Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To obtain detailed output from CTest using CMake, you can use the following command line options:

  • --verbose: Shows more detailed output, including the status of each test and its output.
  • --output-on-failure: Prints the output of a test if it fails.
  • --timeout <seconds>: Specifies the maximum time a test can run before timing out.
  • --continue-on-failure: Continues running tests even if a test fails, and reports all failures at the end.
  • --build-and-test: Runs the build step and then runs the tests, reporting the results of both.

To use these options, you can run CTest from the build directory with the desired options, like this:

cd build/
ctest --verbose --output-on-failure

This will run all the tests in the build directory and show detailed output, including the output of failed tests.