diff --git a/CMakeLists.txt b/CMakeLists.txt index 150211e79e7a9ede7bfaa6d7f5a129616617b810..c4ecc664cab118bd388a196db1e1ff1c9d5187a5 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -696,6 +696,9 @@ if(ON_INFER) STATUS "On inference mode, will take place some specific optimization.") include(inference_lib) add_definitions(-DPADDLE_ON_INFERENCE) + set(WITH_SHARED_IR + OFF + CACHE STRING "Only paddle_inference.so is allowed in inference." FORCE) else() #TODO(luotao), combine this warning with `make inference_lib_dist` command. message(