Skip to content

Remove ignored build warnings for pybind on Mac #6165

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 18, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions cmake/onnxruntime_python.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,6 @@ if (onnxruntime_ENABLE_TRAINING)
target_include_directories(onnxruntime_pybind11_state PRIVATE ${ORTTRAINING_ROOT})
endif()

# Disable certain pybind11 warnings while building using AppleClang 12 on macOS
# TODO, remove this after switch to pybind11 2.6.0+
if(APPLE AND ${CMAKE_CXX_COMPILER_ID} STREQUAL "AppleClang" AND ${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER_EQUAL 12.0)
# https://github.com/pybind/pybind11/pull/2522
target_compile_options(onnxruntime_pybind11_state PRIVATE "-Wno-range-loop-analysis")
# https://github.com/pybind/pybind11/pull/2294
target_compile_options(onnxruntime_pybind11_state PRIVATE "-Wno-unused-value")
endif()

if(APPLE)
set(ONNXRUNTIME_SO_LINK_FLAG "-Xlinker -exported_symbols_list ${ONNXRUNTIME_ROOT}/python/exported_symbols.lst")
elseif(UNIX)
Expand Down