From 4380744bc0ba4ce04abb3f335810cfd20d70e78b Mon Sep 17 00:00:00 2001 From: Allison Vacanti Date: Tue, 11 May 2021 16:00:33 -0400 Subject: [PATCH] Update deprecation messages for CTK 11.4. Bug 3308316 --- thrust/detail/config/cpp_dialect.h | 44 ++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 14 deletions(-) diff --git a/thrust/detail/config/cpp_dialect.h b/thrust/detail/config/cpp_dialect.h index 6b236d75e..46b0caec7 100644 --- a/thrust/detail/config/cpp_dialect.h +++ b/thrust/detail/config/cpp_dialect.h @@ -97,27 +97,43 @@ # define THRUST_COMP_DEPR_IMPL1 /* intentionally blank */ #endif -#define THRUST_COMPILER_DEPRECATION(REQ, FIX) \ - THRUST_COMP_DEPR_IMPL(Thrust requires at least REQ. Please FIX. Define THRUST_IGNORE_DEPRECATED_CPP_DIALECT to suppress this message.) +#define THRUST_COMPILER_DEPRECATION(REQ) \ + THRUST_COMP_DEPR_IMPL(Thrust requires at least REQ. Define THRUST_IGNORE_DEPRECATED_CPP_DIALECT to suppress this message.) + +#define THRUST_COMPILER_DEPRECATION_SOFT(REQ, CUR) \ + THRUST_COMP_DEPR_IMPL(Thrust requires at least REQ. CUR is deprecated but still supported. CUR support will be removed in a future release. Define THRUST_IGNORE_DEPRECATED_CPP_DIALECT to suppress this message.) -// Minimum required compiler checks: #ifndef THRUST_IGNORE_DEPRECATED_COMPILER + +// Compiler checks: # if THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_GCC && THRUST_GCC_VERSION < 50000 - THRUST_COMPILER_DEPRECATION(GCC 5.0, upgrade your compiler); + THRUST_COMPILER_DEPRECATION(GCC 5.0); +# elif THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_CLANG && THRUST_CLANG_VERSION < 70000 + THRUST_COMPILER_DEPRECATION(Clang 7.0); +# elif THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_MSVC && THRUST_MSVC_VERSION < 1910 + // <2017. Hard upgrade message: + THRUST_COMPILER_DEPRECATION(MSVC 2019 (19.20/16.0/14.20)); +# elif THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_MSVC && THRUST_MSVC_VERSION < 1920 + // >=2017, <2019. Soft deprecation message: + THRUST_COMPILER_DEPRECATION_SOFT(MSVC 2019 (19.20/16.0/14.20), MSVC 2017); # endif -# if THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_CLANG && THRUST_CLANG_VERSION < 70000 - THRUST_COMPILER_DEPRECATION(Clang 7.0, upgrade your compiler); -# endif -# if THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_MSVC && THRUST_MSVC_VERSION < 1920 - THRUST_COMPILER_DEPRECATION(MSVC 2019 (19.20/16.0/14.20), upgrade your compiler); + +#endif // THRUST_IGNORE_DEPRECATED_COMPILER + +#ifndef THRUST_IGNORE_DEPRECATED_DIALECT + +// Dialect checks: +# if THRUST_CPP_DIALECT < 2011 + //