Disable __builtin_constant_p when compiling with nvcc

This commit is contained in:
Will Pazner 2020-09-17 09:45:43 -07:00 committed by Martin Hořeňovský
parent 9e172c707e
commit a4dfcf9042
No known key found for this signature in database
GPG Key ID: DE48307B8B0D381A

View File

@ -41,7 +41,7 @@
// We have to avoid both ICC and Clang, because they try to mask themselves // We have to avoid both ICC and Clang, because they try to mask themselves
// as gcc, and we want only GCC in this block // as gcc, and we want only GCC in this block
#if defined(__GNUC__) && !defined(__clang__) && !defined(__ICC) #if defined(__GNUC__) && !defined(__clang__) && !defined(__ICC) && !defined(__CUDACC__)
# define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION _Pragma( "GCC diagnostic push" ) # define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION _Pragma( "GCC diagnostic push" )
# define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION _Pragma( "GCC diagnostic pop" ) # define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION _Pragma( "GCC diagnostic pop" )
@ -73,7 +73,7 @@
// ``` // ```
// //
// Therefore, `CATCH_INTERNAL_IGNORE_BUT_WARN` is not implemented. // Therefore, `CATCH_INTERNAL_IGNORE_BUT_WARN` is not implemented.
# if !defined(__ibmxl__) # if !defined(__ibmxl__) && !defined(__CUDACC__)
# define CATCH_INTERNAL_IGNORE_BUT_WARN(...) (void)__builtin_constant_p(__VA_ARGS__) /* NOLINT(cppcoreguidelines-pro-type-vararg, hicpp-vararg) */ # define CATCH_INTERNAL_IGNORE_BUT_WARN(...) (void)__builtin_constant_p(__VA_ARGS__) /* NOLINT(cppcoreguidelines-pro-type-vararg, hicpp-vararg) */
# endif # endif