Skip to content

Commit

Permalink
Clang 13+ check for newer warning
Browse files Browse the repository at this point in the history
  • Loading branch information
ptheywood committed Jan 5, 2024
1 parent 86c5e89 commit fb5d0ee
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cmake/warnings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,11 @@ if(NOT COMMAND flamegpu_suppress_some_compiler_warnings)
# Suppress unused-private-field warnings on Clang, which are falsely emitted in some cases where a private member is used in device code (i.e. ArrayMessage)
target_compile_options(${SSCW_TARGET} PRIVATE "$<$<COMPILE_LANGUAGE:CUDA>:SHELL:-Xcompiler -Wno-unused-private-field>")
target_compile_options(${SSCW_TARGET} PRIVATE "$<$<COMPILE_LANGUAGE:C,CXX>:-Wno-unused-private-field>")
# Suppress unused-but-set-variable which triggers on some device code.
target_compile_options(${SSCW_TARGET} PRIVATE "$<$<COMPILE_LANGUAGE:CUDA>:SHELL:-Xcompiler -Wno-unused-but-set-variable>")
target_compile_options(${SSCW_TARGET} PRIVATE "$<$<COMPILE_LANGUAGE:C,CXX>:-Wno-unused-but-set-variable>")
# Suppress unused-but-set-variable which triggers on some device code, clang 13+
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 13.0)
target_compile_options(${SSCW_TARGET} PRIVATE "$<$<COMPILE_LANGUAGE:CUDA>:SHELL:-Xcompiler -Wno-unused-but-set-variable>")
target_compile_options(${SSCW_TARGET} PRIVATE "$<$<COMPILE_LANGUAGE:C,CXX>:-Wno-unused-but-set-variable>")
endif()
endif()
# Generic OS/host compiler warning suppressions
# Ensure NVCC outputs warning numbers
Expand Down

0 comments on commit fb5d0ee

Please sign in to comment.