From 5da76bb7be3b05c83b70bbd6e9a766a14cc54e6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Thu, 10 Aug 2017 16:24:31 +0200 Subject: [PATCH] Allow specifying default reporter at compile time --- include/catch_session.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/catch_session.hpp b/include/catch_session.hpp index d31896c7..61b99049 100644 --- a/include/catch_session.hpp +++ b/include/catch_session.hpp @@ -32,10 +32,14 @@ namespace Catch { return reporter; } +#ifndef CATCH_CONFIG_DEFAULT_REPORTER +#define CATCH_CONFIG_DEFAULT_REPORTER "console" +#endif + IStreamingReporterPtr makeReporter( std::shared_ptr const& config ) { auto const& reporterNames = config->getReporterNames(); if( reporterNames.empty() ) - return createReporter( "console", config ); + return createReporter(CATCH_CONFIG_DEFAULT_REPORTER, config ); IStreamingReporterPtr reporter; for( auto const& name : reporterNames )