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

build: find Protobuf using config mode search #2900

Merged
merged 1 commit into from
Feb 12, 2024
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
12 changes: 1 addition & 11 deletions projects/onnx_c_importer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,7 @@ message(STATUS "Enabling onnx_c_importer...")

include(FetchContent)

find_package(Protobuf)
if(NOT Protobuf_FOUND)
message(FATAL_ERROR
"In order to build C ONNX support, the Protobuf package must be installed "
"on the system. Without this ONNX will attempt to build it in the project "
"and the dependent ABSEIL build system is incompatible. "
"On Ubuntu, install with: "
"apt install libprotobuf-dev protobuf-compiler\n\n"
"(or this entire component can be disabled with "
"-DTORCH_MLIR_ENABLE_ONNX_C_IMPORTER=OFF)")
endif()
find_package(Protobuf REQUIRED CONFIG)

option(ONNX_DISABLE_EXCEPTIONS "For compatibility with LLVM build" ON)

Expand Down
Loading