Skip to content

Commit

Permalink
Suppress a pybind11 warning on recent compilers
Browse files Browse the repository at this point in the history
  • Loading branch information
ndevenish committed Aug 16, 2024
1 parent aebb3d9 commit e644290
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions newsfragments/XXX.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Suppress a flumpy warning coming from pybind11. See https://github.com/pybind/pybind11/issues/5224.
7 changes: 7 additions & 0 deletions src/dxtbx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,13 @@ if(HAS_VISIBILITY)
target_compile_options(dxtbx_flumpy PRIVATE -fvisibility=hidden)
endif()

# pybind11 causes a bounds checking warning on recent compilers
check_cxx_compiler_flag("-Wno-array-bounds" HAS_BOUNDS_WARNING)
check_cxx_compiler_flag("-Wno-stringop-overread" HAS_OVERREAD_WARNING)
if(HAS_BOUNDS_WARNING AND HAS_OVERREAD_WARNING)
target_compile_options(dxtbx_flumpy PRIVATE -Wno-array-bounds -Wno-stringop-overread)
endif()

install(
TARGETS
dxtbx_ext
Expand Down

0 comments on commit e644290

Please sign in to comment.