diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index a7488e0f2f..77ec4dc75d 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -690,9 +690,9 @@ if(Protobuf_FOUND OR Protobuf_FOUND) #We have a check here but most of the cmake users don't know the Protobuf_USE_STATIC_LIBS # variable exists and may leave it in a wrong state. if(NOT Protobuf_USE_STATIC_LIBS) - #Indeed here should be a warning, not a fatal error. ONNX Runtime itself can work in such a - #setting but it may cause compatibility issue when ONNX Runtime is integrated with the other ONNX ecosystem softwares. - message(FATAL_ERROR "Please enable Protobuf_USE_STATIC_LIBS") + # ONNX Runtime itself can work in such a setting but it may cause compatibility issues + # when ONNX Runtime is integrated with the other ONNX ecosystem softwares. + message(WARNING "Use Protobuf_USE_STATIC_LIBS to ensure compatibility with other ONNX ecosystem components.") endif() else() set(PROTOBUF_LIB protobuf::libprotobuf-lite)