From 6fb64408b6f9850f9bf9ec140ee89631c712b6eb Mon Sep 17 00:00:00 2001 From: Guilherme Amadio Date: Mon, 28 Oct 2024 16:12:09 +0100 Subject: [PATCH] [CMake] Disable warnings with Nvidia's nvc++ compiler XRootD may be built as part of ROOT as a "builtin", so try to be nice by suppressing nvc++ warnings to avoid polluting ROOT's own build log. Issue: #2361 --- cmake/XRootDOSDefs.cmake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmake/XRootDOSDefs.cmake b/cmake/XRootDOSDefs.cmake index 15d881af12d..e5f35fcf051 100644 --- a/cmake/XRootDOSDefs.cmake +++ b/cmake/XRootDOSDefs.cmake @@ -43,6 +43,12 @@ if( CMAKE_COMPILER_IS_GNUCXX ) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-parameter" ) endif() +# Disable warnings with nvc++ (for when we are built as ROOT built-in dependency) + +if(CMAKE_CXX_COMPILER_ID MATCHES "NVHPC") + add_compile_options(-w) +endif() + #------------------------------------------------------------------------------- # Linux #-------------------------------------------------------------------------------