Using CMake, how do I get verbose output from CTest?

You can use the ctest --output-on-failure option, or set the environment variable CTEST_OUTPUT_ON_FAILURE, which will show you any output from the test program whenever the test fails. One way to do this when using Makefiles and the command line would be as follows:

env CTEST_OUTPUT_ON_FAILURE=1 make check

This Stack Overflow question and answer shows how to set environment variables in Visual Studio.

Leave a Comment