From 0c5163cb8ab87c196cef25b876f95739cc0b1924 Mon Sep 17 00:00:00 2001 From: Stephen Akiki <14204+sakiki@users.noreply.github.com> Date: Fri, 1 Oct 2021 10:01:00 -0400 Subject: [PATCH] Add GCC Pragma Disable Override Add a separate #define that allows the end user to completely disable GCC pragmas in the build. Useful when building with older platforms. --- include/fmt/core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/fmt/core.h b/include/fmt/core.h index 2bac1cb3c8ca..6aefc24a7281 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -24,7 +24,7 @@ # define FMT_CLANG_VERSION 0 #endif -#if defined(__GNUC__) && !defined(__clang__) && !defined(__INTEL_COMPILER) +#if defined(__GNUC__) && !defined(__clang__) && !defined(__INTEL_COMPILER) && !defined(FMT_GCC_PRAGMA_DISABLE) # define FMT_GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__) # define FMT_GCC_PRAGMA(arg) _Pragma(arg) #else