onnxruntime/cmake/patches/gsl/1064.patch
Changming Sun efcbdac58e
Remove the cmake option: onnxruntime_DEV_MODE (#13573)
1. Remove the cmake option onnxruntime_DEV_MODE and replace it with
"--compile-no-warning-as-error"
2. Suppress some GSL warnings because now we treat nvcc diag warnings as
errors
2022-11-07 09:06:28 -08:00

26 lines
868 B
Diff

diff --git a/include/gsl/assert b/include/gsl/assert
index a6012048..a5c216f8 100644
--- a/include/gsl/assert
+++ b/include/gsl/assert
@@ -48,7 +48,7 @@
#if defined(__clang__)
#define GSL_SUPPRESS(x) [[gsl::suppress("x")]]
#else
-#if defined(_MSC_VER) && !defined(__INTEL_COMPILER)
+#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) && !defined(__NVCC__)
#define GSL_SUPPRESS(x) [[gsl::suppress(x)]]
#else
#define GSL_SUPPRESS(x)
diff --git a/include/gsl/byte b/include/gsl/byte
index 9231340b..f92a91c9 100644
--- a/include/gsl/byte
+++ b/include/gsl/byte
@@ -24,7 +24,7 @@
#if defined(__clang__)
#define GSL_SUPPRESS(x) [[gsl::suppress("x")]]
#else
-#if defined(_MSC_VER) && !defined(__INTEL_COMPILER)
+#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) && !defined(__NVCC__)
#define GSL_SUPPRESS(x) [[gsl::suppress(x)]]
#else
#define GSL_SUPPRESS(x)