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

summaryrefslogtreecommitdiffhomepage
path: root/src/catch2
diff options
context:
space:
mode:
authorTommy Carozzani2023-01-17 08:01:09 +0100
committerMartin Hořeňovský2023-01-18 11:57:00 +0100
commitaa8da505ec3ce0ef08728c4bb3c104bfd23506eb (patch)
tree19ce3a6b2a8c1b02d38fe7c2e208d794dd9c7167 /src/catch2
parente27bb7198d351d5b3db21d3c9dd81b5002545682 (diff)
downloadcatch3-aa8da505ec3ce0ef08728c4bb3c104bfd23506eb.tar.gz
Fix compatibility with previous CUDA versions
Diffstat (limited to 'src/catch2')
-rw-r--r--src/catch2/internal/catch_compiler_capabilities.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/catch2/internal/catch_compiler_capabilities.hpp b/src/catch2/internal/catch_compiler_capabilities.hpp
index 0c41c93e..76c5696b 100644
--- a/src/catch2/internal/catch_compiler_capabilities.hpp
+++ b/src/catch2/internal/catch_compiler_capabilities.hpp
@@ -61,9 +61,14 @@
#endif
#if defined(__CUDACC__) && !defined(__clang__)
+# ifdef __NVCC_DIAG_PRAGMA_SUPPORT__
+// New pragmas introduced in CUDA 11.5+
# define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION _Pragma( "nv_diagnostic push" )
# define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION _Pragma( "nv_diagnostic pop" )
# define CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS _Pragma( "nv_diag_suppress 177" )
+# else
+# define CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS _Pragma( "diag_suppress 177" )
+# endif
#endif
// clang-cl defines _MSC_VER as well as __clang__, which could cause the