From f78e19564b992cb06e141658f68a12f3e19e42e3 Mon Sep 17 00:00:00 2001 From: Peter Heywood Date: Thu, 11 Jan 2024 17:30:54 +0000 Subject: [PATCH] attemtpt to add diagnostic error numbers to nvc++ warnings so they can be added to suppressions --- cmake/warnings.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmake/warnings.cmake b/cmake/warnings.cmake index e72345f84..924f39a9f 100644 --- a/cmake/warnings.cmake +++ b/cmake/warnings.cmake @@ -69,6 +69,11 @@ if(NOT COMMAND flamegpu_set_high_warning_level) # Disabled, as cpplint occasionally disagrees with gcc concerning override # target_compile_options(${SHWL_TARGET} PRIVATE "$<$:SHELL:-Xcompiler -Wsuggest-override>") # target_compile_options(${SHWL_TARGET} PRIVATE "$<$:-Wsuggest-override>") + + # if nvhpc, add display error numbers to the host com + if(CMAKE_CXX_COMPILER_ID STREQUAL "NVHPC") + target_compile_options(${SHWL_TARGET} PRIVATE "$<$:SHELL:--display_error_number>") + endif() endif() # Generic options regardless of platform/host compiler: # Ensure NVCC outputs warning numbers