mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-25 15:21:54 +00:00
Simplify NVCC checks
This commit is contained in:
parent
8e9bffa986
commit
7aa58c30bf
@ -49,6 +49,12 @@
|
|||||||
# define FMT_HAS_GXX_CXX11 0
|
# define FMT_HAS_GXX_CXX11 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __NVCC__
|
||||||
|
# define FMT_NVCC __NVCC__
|
||||||
|
#else
|
||||||
|
# define FMT_NVCC 0
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
# define FMT_MSC_VER _MSC_VER
|
# define FMT_MSC_VER _MSC_VER
|
||||||
#else
|
#else
|
||||||
@ -58,11 +64,10 @@
|
|||||||
// Check if relaxed C++14 constexpr is supported.
|
// Check if relaxed C++14 constexpr is supported.
|
||||||
// GCC doesn't allow throw in constexpr until version 6 (bug 67371).
|
// GCC doesn't allow throw in constexpr until version 6 (bug 67371).
|
||||||
#ifndef FMT_USE_CONSTEXPR
|
#ifndef FMT_USE_CONSTEXPR
|
||||||
#if !defined(__NVCC__)
|
|
||||||
# define FMT_USE_CONSTEXPR \
|
# define FMT_USE_CONSTEXPR \
|
||||||
(FMT_HAS_FEATURE(cxx_relaxed_constexpr) || FMT_MSC_VER >= 1910 || \
|
(FMT_HAS_FEATURE(cxx_relaxed_constexpr) || FMT_MSC_VER >= 1910 || \
|
||||||
(FMT_GCC_VERSION >= 600 && __cplusplus >= 201402L))
|
(FMT_GCC_VERSION >= 600 && __cplusplus >= 201402L)) && \
|
||||||
#endif
|
!FMT_NVCC
|
||||||
#endif
|
#endif
|
||||||
#if FMT_USE_CONSTEXPR
|
#if FMT_USE_CONSTEXPR
|
||||||
# define FMT_CONSTEXPR constexpr
|
# define FMT_CONSTEXPR constexpr
|
||||||
@ -136,7 +141,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Workaround broken [[deprecated]] in the Intel compiler and NVCC.
|
// Workaround broken [[deprecated]] in the Intel compiler and NVCC.
|
||||||
#if defined(__INTEL_COMPILER) || defined(__NVCC__) || defined(__CUDACC__)
|
#if defined(__INTEL_COMPILER) || FMT_NVCC
|
||||||
# define FMT_DEPRECATED_ALIAS
|
# define FMT_DEPRECATED_ALIAS
|
||||||
#else
|
#else
|
||||||
# define FMT_DEPRECATED_ALIAS FMT_DEPRECATED
|
# define FMT_DEPRECATED_ALIAS FMT_DEPRECATED
|
||||||
|
Loading…
Reference in New Issue
Block a user