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
Suppress empty-variadic macros warning under GCC
- Commit
e601a5dc4f5ad6b1cc83ffd619af8d7efa970044- Author
- Martin Hořeňovský ·
- Parents
e9caeb7d0be3
Changes
src/catch2/catch_preprocessor.hpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/catch2/catch_preprocessor.hpp b/src/catch2/catch_preprocessor.hpp index f1bd0905..d0e9c235 100644 --- a/src/catch2/catch_preprocessor.hpp +++ b/src/catch2/catch_preprocessor.hpp @@ -9,6 +9,13 @@ #ifndef TWOBLUECUBES_CATCH_PREPROCESSOR_HPP_INCLUDED #define TWOBLUECUBES_CATCH_PREPROCESSOR_HPP_INCLUDED + +#if defined(__GNUC__) +// We need to silence "empty __VA_ARGS__ warning", and using just _Pragma does not work +#pragma GCC system_header +#endif + + #define CATCH_RECURSION_LEVEL0(...) __VA_ARGS__ #define CATCH_RECURSION_LEVEL1(...) CATCH_RECURSION_LEVEL0(CATCH_RECURSION_LEVEL0(CATCH_RECURSION_LEVEL0(__VA_ARGS__))) #define CATCH_RECURSION_LEVEL2(...) CATCH_RECURSION_LEVEL1(CATCH_RECURSION_LEVEL1(CATCH_RECURSION_LEVEL1(__VA_ARGS__)))