From 8b55596dfefd22793d65ccfecf4cef2d5f1772aa Mon Sep 17 00:00:00 2001 From: Scott McKay Date: Tue, 22 Jan 2019 17:42:33 +1000 Subject: [PATCH] The CUDA compiler doesn't support gsl::suppress so disable when __NVCC__ is defined. (#358) --- include/onnxruntime/core/common/common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/onnxruntime/core/common/common.h b/include/onnxruntime/core/common/common.h index e4c9ad658d..f6356f4d87 100644 --- a/include/onnxruntime/core/common/common.h +++ b/include/onnxruntime/core/common/common.h @@ -150,8 +150,8 @@ std::vector GetStackTrace(); } \ } while (0) -// C++ Core Guideline check suppression -#ifdef _MSC_VER +// C++ Core Guideline check suppression. +#if defined(_MSC_VER) && !defined(__NVCC__) #define GSL_SUPPRESS(tag) [[gsl::suppress(tag)]] #else #define GSL_SUPPRESS(tag)