File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -205,7 +205,11 @@ function(pyamrex_set_compile_warnings tgt)
205205 elseif ("${CMAKE_CXX_COMPILER_ID} " STREQUAL "AppleClang" )
206206 target_compile_options (${tgt} PRIVATE -Wall -Wextra -Wpedantic -Wshadow -Woverloaded-virtual -Wextra-semi -Wunreachable-code)
207207 elseif ("${CMAKE_CXX_COMPILER_ID} " STREQUAL "GNU" )
208- target_compile_options (${tgt} PRIVATE -Wall -Wextra -Wpedantic -Wshadow -Woverloaded-virtual -Wunreachable-code -Wno-array-bounds)
208+ target_compile_options (${tgt} PRIVATE -Wall -Wextra -Wshadow -Woverloaded-virtual -Wunreachable-code -Wno-array-bounds)
209+ if (NOT AMReX_GPU_BACKEND STREQUAL CUDA)
210+ # In older NVCC, -Wpedantic causes "warning: style of line directive is a GCC extension"
211+ target_compile_options (${tgt} PRIVATE -Wpedantic)
212+ endif ()
209213 elseif ("${CMAKE_CXX_COMPILER_ID} " STREQUAL "MSVC" )
210214 # Warning C4503: "decorated name length exceeded, name was truncated"
211215 # Symbols longer than 4096 chars are truncated (and hashed instead)
You can’t perform that action at this time.
0 commit comments