Skip to content
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

Remove ignored build warnings for pybind on Mac #6165

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
Remove ignored build warnings for pybind on Mac
  • Loading branch information
guoyu-wang committed Dec 17, 2020
commit c422854c6e8562d609f6979ce84384342e9728d5
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