Skip to content

Commit 3e47ee8

Browse files
authored
Try and make nvrtc on windows possible (#3623)
* Ensure that nvrtc only pulls in `__builtin_isfinite` when not on windows * Try and make the deprecation warnings work with nvrtc on windows
1 parent 2255303 commit 3e47ee8

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

cub/cub/util_cpp_dialect.cuh

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
# define CUB_CPP_DIALECT _CCCL_STD_VER
5252

5353
// Define CUB_COMPILER_DEPRECATION macro:
54-
# if _CCCL_COMPILER(MSVC)
54+
# if _CCCL_COMPILER(MSVC) && !_CCCL_COMPILER(NVRTC)
5555
# define CUB_COMP_DEPR_IMPL(msg) _CCCL_PRAGMA(message(__FILE__ ":" _CCCL_TO_STRING(__LINE__) ": warning: " #msg))
5656
# else // clang / gcc:
5757
# define CUB_COMP_DEPR_IMPL(msg) _CCCL_PRAGMA(GCC warning #msg)

libcudacxx/include/cuda/std/__cccl/builtin.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@
299299
# undef _CCCL_BUILTIN_IS_CONSTANT_EVALUATED
300300
#endif // _CCCL_STD_VER < 2014 && _CCCL_CUDA_COMPILER(NVCC)
301301

302-
#if _CCCL_CHECK_BUILTIN(builtin_isfinite) || _CCCL_COMPILER(GCC) || _CCCL_COMPILER(NVRTC)
302+
#if _CCCL_CHECK_BUILTIN(builtin_isfinite) || _CCCL_COMPILER(GCC) || (_CCCL_COMPILER(NVRTC) && !_CCCL_COMPILER_MSVC)
303303
# define _CCCL_BUILTIN_ISFINITE(...) __builtin_isfinite(__VA_ARGS__)
304304
#endif // _CCCL_CHECK_BUILTIN(isfinite)
305305

libcudacxx/include/cuda/std/__internal/cpp_dialect.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#endif // no system header
2222

2323
// Define LIBCUDACXX_COMPILER_DEPRECATION macro:
24-
#if _CCCL_COMPILER(MSVC)
24+
#if _CCCL_COMPILER(MSVC) && !_CCCL_COMPILER(NVRTC)
2525
# define LIBCUDACXX_COMP_DEPR_IMPL(msg) \
2626
_CCCL_PRAGMA(message(__FILE__ ":" _CCCL_TO_STRING(__LINE__) ": warning: " #msg))
2727
#else // ^^^ _CCCL_COMPILER(MSVC) ^^^ / vvv !_CCCL_COMPILER(MSVC) vvv

thrust/thrust/detail/config/cpp_dialect.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
#define THRUST_CPP_DIALECT _CCCL_STD_VER
4242

4343
// Define THRUST_COMPILER_DEPRECATION macro:
44-
#if _CCCL_COMPILER(MSVC)
44+
#if _CCCL_COMPILER(MSVC) && !_CCCL_COMPILER(NVRTC)
4545
# define THRUST_COMP_DEPR_IMPL(msg) _CCCL_PRAGMA(message(__FILE__ ":" _CCCL_TO_STRING(__LINE__) ": warning: " #msg))
4646
#else // clang / gcc:
4747
# define THRUST_COMP_DEPR_IMPL(msg) _CCCL_PRAGMA(GCC warning #msg)

0 commit comments

Comments
 (0)