diff --git a/.github/workflows/NVHPC.yml b/.github/workflows/NVHPC.yml index 6992f59f1..d8cb2341b 100644 --- a/.github/workflows/NVHPC.yml +++ b/.github/workflows/NVHPC.yml @@ -47,6 +47,11 @@ jobs: hostcxx: nvhpc-22.9 os: ubuntu-22.04 container: nvcr.io/nvidia/nvhpc:22.9-devel-cuda11.7-ubuntu22.04 + - cuda: "11.7" + cuda_arch: "35" + hostcxx: nvhpc-22.7 + os: ubuntu-22.04 + container: nvcr.io/nvidia/nvhpc:22.7-devel-cuda11.7-ubuntu22.04 - cuda: "11.7" cuda_arch: "35" hostcxx: nvhpc-22.5 diff --git a/cmake/warnings.cmake b/cmake/warnings.cmake index 14a7ea7ac..19ada8807 100644 --- a/cmake/warnings.cmake +++ b/cmake/warnings.cmake @@ -119,9 +119,12 @@ if(NOT COMMAND flamegpu_suppress_some_compiler_warnings) # nvc++ etc do not appear to have an equivalent to -isystem. Rather than more pragma warning soup, just tone down warnings when using nvc++ as appropriate. target_compile_options(${SSCW_TARGET} PRIVATE "$<$:SHELL:-Xcudafe --diag_suppress=code_is_unreachable>") target_compile_options(${SSCW_TARGET} PRIVATE "$<$:SHELL:--diag_suppress=code_is_unreachable>") - # older nvhpc as host compiler warns for intentional declared but never referenced parameters - target_compile_options(${SSCW_TARGET} PRIVATE "$<$:SHELL:-Wno-unused-but-set-parameter>") - target_compile_options(${SSCW_TARGET} PRIVATE "$<$:SHELL:-Xcompiler -Wno-unused-but-set-parameter>") + # older nvhpc as host compiler warns for intentional declared but never referenced parameters. only supported from 22.7/9 + message(FATAL_ERROR "${CMAKE_CXX_COMPILER_VERSION}") + if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "22.7") + target_compile_options(${SSCW_TARGET} PRIVATE "$<$:SHELL:-Wno-unused-but-set-parameter>") + target_compile_options(${SSCW_TARGET} PRIVATE "$<$:SHELL:-Xcompiler -Wno-unused-but-set-parameter>") + endif() else() # Linux specific warning suppressions endif()