Extend configure_external_projects_for_test to pretty print dependency tree

Then for future reference, the generated text can then be copied into
the CMakeLists implementing the test.