BUG: Capture cout and cerr from internal ctest
When CTest detects that a test is running its own executable it optimizes the test by using an internal instance of cmCTest instead of creating a new process. However, the internal instance was using cout and cerr directly. This redirects the output to a string stream to avoid direct display of the internal test's output.
Showing with 42 additions and 18 deletions