|
97 | 97 | # define THRUST_COMP_DEPR_IMPL1 /* intentionally blank */ |
98 | 98 | #endif |
99 | 99 |
|
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.) |
102 | 105 |
|
103 | | -// Minimum required compiler checks: |
104 | 106 | #ifndef THRUST_IGNORE_DEPRECATED_COMPILER |
| 107 | + |
| 108 | +// Compiler checks: |
105 | 109 | # 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); |
107 | 119 | # 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); |
113 | 132 | # endif |
114 | | -#endif |
115 | 133 |
|
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 |
120 | 135 |
|
| 136 | +#undef THRUST_COMPILER_DEPRECATION_SOFT |
121 | 137 | #undef THRUST_COMPILER_DEPRECATION |
122 | 138 | #undef THRUST_COMP_DEPR_IMPL |
123 | 139 | #undef THRUST_COMP_DEPR_IMPL0 |
|
0 commit comments