From ad0270ac8c6f55f756ad3d3e70047178f6f1ec55 Mon Sep 17 00:00:00 2001 From: Fabian Joswig Date: Thu, 12 Jan 2023 12:36:30 +0000 Subject: [PATCH] fix: diagnostic pragma warnings fixed for CUDA 12+ --- Grid/DisableWarnings.h | 2 +- Grid/Grid_Eigen_Dense.h | 2 +- Grid/pugixml/pugixml.cc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Grid/DisableWarnings.h b/Grid/DisableWarnings.h index 64e4faf4..015e19d1 100644 --- a/Grid/DisableWarnings.h +++ b/Grid/DisableWarnings.h @@ -45,7 +45,7 @@ directory //disables nvcc specific warning in json.hpp #pragma clang diagnostic ignored "-Wdeprecated-register" -#if (__CUDACC_VER_MAJOR__ >= 11) && (__CUDACC_VER_MINOR__ >= 5) +#ifdef __NVCC_DIAG_PRAGMA_SUPPORT__ //disables nvcc specific warning in json.hpp #pragma nv_diag_suppress unsigned_compare_with_zero #pragma nv_diag_suppress cast_to_qualified_type diff --git a/Grid/Grid_Eigen_Dense.h b/Grid/Grid_Eigen_Dense.h index 5aee81de..bdd39a65 100644 --- a/Grid/Grid_Eigen_Dense.h +++ b/Grid/Grid_Eigen_Dense.h @@ -14,7 +14,7 @@ /* NVCC save and restore compile environment*/ #ifdef __NVCC__ #pragma push -#if (__CUDACC_VER_MAJOR__ >= 11) && (__CUDACC_VER_MINOR__ >= 5) +#ifdef __NVCC_DIAG_PRAGMA_SUPPORT__ #pragma nv_diag_suppress code_is_unreachable #else #pragma diag_suppress code_is_unreachable diff --git a/Grid/pugixml/pugixml.cc b/Grid/pugixml/pugixml.cc index 81973964..b2ba698b 100644 --- a/Grid/pugixml/pugixml.cc +++ b/Grid/pugixml/pugixml.cc @@ -16,7 +16,7 @@ #ifdef __NVCC__ #pragma push -#if (__CUDACC_VER_MAJOR__ >= 11) && (__CUDACC_VER_MINOR__ >= 5) +#ifdef __NVCC_DIAG_PRAGMA_SUPPORT__ #pragma nv_diag_suppress declared_but_not_referenced // suppress "function was declared but never referenced warning" #else #pragma diag_suppress declared_but_not_referenced // suppress "function was declared but never referenced warning"