Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

Disable reporter/listener registration with CATCH_CONFIG_DISABLE

Commit
05b6f03f3e8e1e3a51814e61f8b4d1edc12e4cf9
Author
Martin Hořeňovský ·
Parents
053c29a2b844

Files · Download .tar.gz

Changes

 include/internal/catch_reporter_registrars.hpp | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/include/internal/catch_reporter_registrars.hpp b/include/internal/catch_reporter_registrars.hpp
index e0db392b..6d30a833 100644
--- a/include/internal/catch_reporter_registrars.hpp
+++ b/include/internal/catch_reporter_registrars.hpp
@@ -55,10 +55,19 @@ namespace Catch {
     };
 }
 
+#if !defined(CATCH_CONFIG_DISABLE)
+
 #define CATCH_REGISTER_REPORTER( name, reporterType ) \
     namespace{ Catch::ReporterRegistrar<reporterType> catch_internal_RegistrarFor##reporterType( name ); }
 
 #define CATCH_REGISTER_LISTENER( listenerType ) \
     namespace{ Catch::ListenerRegistrar<listenerType> catch_internal_RegistrarFor##listenerType; }
 
+#else // CATCH_CONFIG_DISABLE
+
+#define CATCH_REGISTER_REPORTER(name, reporterType)
+#define CATCH_REGISTER_LISTENER(listenerType)
+
+#endif // CATCH_CONFIG_DISABLE
+
 #endif // TWOBLUECUBES_CATCH_REPORTER_REGISTRARS_HPP_INCLUDED