Remove FMT_NVCOMPILER_VERSION

This commit is contained in:
Victor Zverovich 2022-05-29 13:47:06 -07:00
parent 661b192545
commit 08be4abb30
2 changed files with 9 additions and 16 deletions

View File

@ -49,13 +49,6 @@
# define FMT_ICC_VERSION 0
#endif
#ifdef __NVCOMPILER
# define FMT_NVCOMPILER_VERSION \
(__NVCOMPILER_MAJOR__ * 100 + __NVCOMPILER_MINOR__)
#else
# define FMT_NVCOMPILER_VERSION 0
#endif
#ifdef __NVCC__
# define FMT_NVCC __NVCC__
#else
@ -70,6 +63,12 @@
# define FMT_MSC_WARNING(...)
#endif
#ifdef _MSVC_LANG
# define FMT_CPLUSPLUS _MSVC_LANG
#else
# define FMT_CPLUSPLUS __cplusplus
#endif
#ifdef __has_feature
# define FMT_HAS_FEATURE(x) __has_feature(x)
#else
@ -90,12 +89,6 @@
# define FMT_HAS_CPP_ATTRIBUTE(x) 0
#endif
#ifdef _MSVC_LANG
# define FMT_CPLUSPLUS _MSVC_LANG
#else
# define FMT_CPLUSPLUS __cplusplus
#endif
#define FMT_HAS_CPP14_ATTRIBUTE(attribute) \
(FMT_CPLUSPLUS >= 201402L && FMT_HAS_CPP_ATTRIBUTE(attribute))
@ -287,7 +280,7 @@
// Enable minimal optimizations for more compact code in debug mode.
FMT_GCC_PRAGMA("GCC push_options")
#if !defined(__OPTIMIZE__) && !FMT_NVCOMPILER_VERSION
#if !defined(__OPTIMIZE__) && !defined(__NVCOMPILER)
FMT_GCC_PRAGMA("GCC optimize(\"Og\")")
#endif

View File

@ -166,11 +166,11 @@ FMT_END_NAMESPACE
// https://github.com/fmtlib/fmt/issues/2510.
#ifndef __ICL
# if FMT_HAS_BUILTIN(__builtin_ctz) || FMT_GCC_VERSION || FMT_ICC_VERSION || \
FMT_NVCOMPILER_VERSION
defined(__NVCOMPILER)
# define FMT_BUILTIN_CTZ(n) __builtin_ctz(n)
# endif
# if FMT_HAS_BUILTIN(__builtin_ctzll) || FMT_GCC_VERSION || \
FMT_ICC_VERSION || FMT_NVCOMPILER_VERSION
FMT_ICC_VERSION || defined(__NVCOMPILER)
# define FMT_BUILTIN_CTZLL(n) __builtin_ctzll(n)
# endif
#endif