From 6ac5e6ab64f5d04a32535070f11af2cfba8e0f71 Mon Sep 17 00:00:00 2001 From: Jeremy Rifkin <51220084+jeremy-rifkin@users.noreply.github.com> Date: Sat, 18 Jan 2025 11:12:08 -0600 Subject: [PATCH] Handle -Wglobal-constructors too --- src/catch2/internal/catch_global_lock.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/catch2/internal/catch_global_lock.cpp b/src/catch2/internal/catch_global_lock.cpp index 3011be65..1ec9eab5 100644 --- a/src/catch2/internal/catch_global_lock.cpp +++ b/src/catch2/internal/catch_global_lock.cpp @@ -6,11 +6,10 @@ // SPDX-License-Identifier: BSL-1.0 #include +#include -#if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wexit-time-destructors" -#endif +CATCH_INTERNAL_START_WARNINGS_SUPPRESSION +CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS namespace Catch { @@ -18,6 +17,4 @@ namespace Catch { } // namespace Catch -#if defined(__clang__) -# pragma clang diagnostic pop -#endif +CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION