mirror of
https://github.com/catchorg/Catch2.git
synced 2024-12-23 11:43:29 +01:00
Allow specifying default reporter at compile time
This commit is contained in:
parent
11295a2663
commit
5da76bb7be
@ -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<Config> 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 )
|
||||
|
Loading…
Reference in New Issue
Block a user