forked from fmtlib/fmt
Cleanup pragma detection
This commit is contained in:
@ -215,25 +215,20 @@
|
|||||||
# define FMT_VISIBILITY(value)
|
# define FMT_VISIBILITY(value)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Detect pragmas.
|
||||||
#define FMT_PRAGMA_IMPL(x) _Pragma(#x)
|
#define FMT_PRAGMA_IMPL(x) _Pragma(#x)
|
||||||
#ifdef FMT_PRAGMA_GCC
|
#if FMT_GCC_VERSION >= 504 && !defined(__NVCOMPILER)
|
||||||
// Use the provided definition.
|
|
||||||
#elif FMT_GCC_VERSION >= 504 && !defined(__NVCOMPILER)
|
|
||||||
// Workaround a _Pragma bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59884
|
// Workaround a _Pragma bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59884
|
||||||
// and an nvhpc warning: https://github.com/fmtlib/fmt/pull/2582.
|
// and an nvhpc warning: https://github.com/fmtlib/fmt/pull/2582.
|
||||||
# define FMT_PRAGMA_GCC(x) FMT_PRAGMA_IMPL(GCC x)
|
# define FMT_PRAGMA_GCC(x) FMT_PRAGMA_IMPL(GCC x)
|
||||||
#else
|
#else
|
||||||
# define FMT_PRAGMA_GCC(x)
|
# define FMT_PRAGMA_GCC(x)
|
||||||
#endif
|
#endif
|
||||||
|
#if FMT_CLANG_VERSION
|
||||||
#ifdef FMT_PRAGMA_CLANG
|
|
||||||
// Use the provided definition.
|
|
||||||
#elif FMT_CLANG_VERSION
|
|
||||||
# define FMT_PRAGMA_CLANG(x) FMT_PRAGMA_IMPL(clang x)
|
# define FMT_PRAGMA_CLANG(x) FMT_PRAGMA_IMPL(clang x)
|
||||||
#else
|
#else
|
||||||
# define FMT_PRAGMA_CLANG(x)
|
# define FMT_PRAGMA_CLANG(x)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if FMT_MSC_VERSION
|
#if FMT_MSC_VERSION
|
||||||
# define FMT_MSC_WARNING(...) __pragma(warning(__VA_ARGS__))
|
# define FMT_MSC_WARNING(...) __pragma(warning(__VA_ARGS__))
|
||||||
#else
|
#else
|
||||||
|
Reference in New Issue
Block a user