Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorWill Pazner2020-09-17 09:45:43 -0700
committerMartin Hořeňovský2020-10-08 11:34:57 +0200
commita4dfcf9042ffa066739b67a44c4b15e6fb45affd (patch)
tree6bd37f3b6f71b5bc48d09d9b5e641ae7756f2f5d /src
parent9e172c707e6596cfd3854bdccceeee2bf4ce86ba (diff)
downloadcatch3-a4dfcf9042ffa066739b67a44c4b15e6fb45affd.tar.gz
Disable __builtin_constant_p when compiling with nvcc
Diffstat (limited to 'src')
-rw-r--r--src/catch2/internal/catch_compiler_capabilities.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/catch2/internal/catch_compiler_capabilities.hpp b/src/catch2/internal/catch_compiler_capabilities.hpp
index cb5c243b..61679a57 100644
--- a/src/catch2/internal/catch_compiler_capabilities.hpp
+++ b/src/catch2/internal/catch_compiler_capabilities.hpp
@@ -41,7 +41,7 @@
// We have to avoid both ICC and Clang, because they try to mask themselves
// 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_STOP_WARNINGS_SUPPRESSION _Pragma( "GCC diagnostic pop" )
@@ -73,7 +73,7 @@
// ```
//
// 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) */
# endif