Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorMartin Hořeňovský2017-08-10 16:45:38 +0200
committerMartin Hořeňovský2017-08-10 16:45:38 +0200
commitb435e0d7c79f9b6cc263dfd978bf0e4478f0e8f3 (patch)
treef742150f20138c28992d703cd23e12a3425dd750 /include
parentba0a09fd9eda8288dae1fca2f93ad2cc7a29f7db (diff)
downloadcatch3-b435e0d7c79f9b6cc263dfd978bf0e4478f0e8f3.tar.gz
Make default reporter configurable at compile time
Closes #978
Diffstat (limited to 'include')
-rw-r--r--include/catch_session.hpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/catch_session.hpp b/include/catch_session.hpp
index a24c0c2c..002f67a2 100644
--- a/include/catch_session.hpp
+++ b/include/catch_session.hpp
@@ -31,10 +31,14 @@ namespace Catch {
return reporter;
}
+#if !defined(CATCH_CONFIG_DEFAULT_REPORTER)
+#define CATCH_CONFIG_DEFAULT_REPORTER "console"
+#endif
+
Ptr<IStreamingReporter> makeReporter( Ptr<Config> const& config ) {
std::vector<std::string> reporters = config->getReporterNames();
if( reporters.empty() )
- reporters.push_back( "console" );
+ reporters.push_back( CATCH_CONFIG_DEFAULT_REPORTER );
Ptr<IStreamingReporter> reporter;
for( std::vector<std::string>::const_iterator it = reporters.begin(), itEnd = reporters.end();