Skip to content

Commit 002a85c

Browse files
authored
Merge pull request NVIDIA#1437 from allisonvacanti/update_depr_messages
Update deprecation messages for CTK 11.4.
2 parents fa54f2c + 4380744 commit 002a85c

1 file changed

Lines changed: 30 additions & 14 deletions

File tree

thrust/detail/config/cpp_dialect.h

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -97,27 +97,43 @@
9797
# define THRUST_COMP_DEPR_IMPL1 /* intentionally blank */
9898
#endif
9999

100-
#define THRUST_COMPILER_DEPRECATION(REQ, FIX) \
101-
THRUST_COMP_DEPR_IMPL(Thrust requires at least REQ. Please FIX. Define THRUST_IGNORE_DEPRECATED_CPP_DIALECT to suppress this message.)
100+
#define THRUST_COMPILER_DEPRECATION(REQ) \
101+
THRUST_COMP_DEPR_IMPL(Thrust requires at least REQ. Define THRUST_IGNORE_DEPRECATED_CPP_DIALECT to suppress this message.)
102+
103+
#define THRUST_COMPILER_DEPRECATION_SOFT(REQ, CUR) \
104+
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.)
102105

103-
// Minimum required compiler checks:
104106
#ifndef THRUST_IGNORE_DEPRECATED_COMPILER
107+
108+
// Compiler checks:
105109
# if THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_GCC && THRUST_GCC_VERSION < 50000
106-
THRUST_COMPILER_DEPRECATION(GCC 5.0, upgrade your compiler);
110+
THRUST_COMPILER_DEPRECATION(GCC 5.0);
111+
# elif THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_CLANG && THRUST_CLANG_VERSION < 70000
112+
THRUST_COMPILER_DEPRECATION(Clang 7.0);
113+
# elif THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_MSVC && THRUST_MSVC_VERSION < 1910
114+
// <2017. Hard upgrade message:
115+
THRUST_COMPILER_DEPRECATION(MSVC 2019 (19.20/16.0/14.20));
116+
# elif THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_MSVC && THRUST_MSVC_VERSION < 1920
117+
// >=2017, <2019. Soft deprecation message:
118+
THRUST_COMPILER_DEPRECATION_SOFT(MSVC 2019 (19.20/16.0/14.20), MSVC 2017);
107119
# endif
108-
# if THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_CLANG && THRUST_CLANG_VERSION < 70000
109-
THRUST_COMPILER_DEPRECATION(Clang 7.0, upgrade your compiler);
110-
# endif
111-
# if THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_MSVC && THRUST_MSVC_VERSION < 1920
112-
THRUST_COMPILER_DEPRECATION(MSVC 2019 (19.20/16.0/14.20), upgrade your compiler);
120+
121+
#endif // THRUST_IGNORE_DEPRECATED_COMPILER
122+
123+
#ifndef THRUST_IGNORE_DEPRECATED_DIALECT
124+
125+
// Dialect checks:
126+
# if THRUST_CPP_DIALECT < 2011
127+
// <C++11. Hard upgrade message:
128+
THRUST_COMPILER_DEPRECATION(C++14);
129+
# elif THRUST_CPP_DIALECT == 2011 && !defined(THRUST_IGNORE_DEPRECATED_CPP_11)
130+
// =C++11. Soft upgrade message:
131+
THRUST_COMPILER_DEPRECATION_SOFT(C++14, C++11);
113132
# endif
114-
#endif
115133

116-
#if !defined(THRUST_IGNORE_DEPRECATED_CPP_DIALECT) && THRUST_CPP_DIALECT < 2014 && \
117-
(THRUST_CPP_DIALECT != 2011 || !defined(THRUST_IGNORE_DEPRECATED_CPP_11))
118-
THRUST_COMPILER_DEPRECATION(C++14, pass -std=c++14 to your compiler);
119-
#endif
134+
#endif // THRUST_IGNORE_DEPRECATED_DIALECT
120135

136+
#undef THRUST_COMPILER_DEPRECATION_SOFT
121137
#undef THRUST_COMPILER_DEPRECATION
122138
#undef THRUST_COMP_DEPR_IMPL
123139
#undef THRUST_COMP_DEPR_IMPL0

0 commit comments

Comments
 (0)