title: CMake Test show printf output
body: <p>I have a Boost test case that goes as follows: </p>
  
  <pre><code>#define BOOST_TEST_MODULE my_test
  
  #include &lt;cstdio&gt;
  #include &lt;boost/test/unit_test.hpp&gt;
  
  BOOST_AUTO_TEST_CASE(my_test_case)
  {
      printf("123");
  }
  </code></pre>
  
  <p>I tried to build this test case using <code>cmake</code>, </p>
  
  <pre><code>cmake_minimum_required(VERSION 3.5)
  project(my_test)
  
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall")
  
  enable_testing()
  
  file(GLOB TEST_SRCS main.cpp)
  
  foreach(TEST_SRC ${TEST_SRCS})
      get_filename_component(TEST_NAME ${TEST_SRC} NAME_WE)
  
      add_executable(${TEST_NAME} ${TEST_SRC})
  
      # Boost
      ADD_DEFINITIONS(-DBOOST_TEST_DYN_LINK)
      find_package(Boost COMPONENTS unit_test_framework REQUIRED)
      target_link_libraries(${TEST_NAME} PUBLIC ${Boost_LIBRARIES})
  
      add_test(NAME ${TEST_NAME} COMMAND ${TEST_NAME})
  endforeach(TEST_SRC)
  </code></pre>
  
  <p>When I simply use the command <code>make test</code>, the output goes as follows:</p>
  
  <pre><code>Running tests...
  Test project xxx
      Start 1: main
  1/1 Test #1: main .............................   Passed    0.00 sec
  
  100% tests passed, 0 tests failed out of 1
  
  Total Test time (real) =   0.00 sec
  </code></pre>
  
  <p>Nothing is shown (using <code>CTEST_OUTPUT_ON_FAILURE</code> does not help because I want to see the output even if all tests have passed). I also tried <code>ctest -V</code> but it is must more verbose that what I expect</p>
  
  <pre><code>UpdateCTestConfiguration  from :xxx
  UpdateCTestConfiguration  from :xxx
  Test project xxx
  Constructing a list of tests
  Done constructing a list of tests
  Updating test list for fixtures
  Added 0 tests to meet fixture requirements
  Checking test dependency graph...
  Checking test dependency graph end
  test 1
      Start 1: main
  
  1: Test command: xxx
  1: Test timeout computed to be: 10000000
  1: Running 1 test case...
  1: 123
  1: *** No errors detected
  1/1 Test #1: main .............................   Passed    0.00 sec
  
  100% tests passed, 0 tests failed out of 1
  
  Total Test time (real) =   0.00 sec 
  </code></pre>
  
  <p>What I really want is <strong>something more verbose than <code>make test</code>, but  cleaner compared with <code>ctest -V</code></strong>, like the output below (which I obtained by directly running the binary <code>./main</code>):</p>
  
  <pre><code>Running 1 test case...
  123
  *** No errors detected
  </code></pre>