From cab56d7f247d276b473f720ea6c61877be67003e Mon Sep 17 00:00:00 2001 From: wilber Date: Thu, 29 Jun 2023 16:21:01 +0800 Subject: [PATCH 1/3] Fix inference glog error. --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 795a9321f9ff2..75d3213321a5e 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -695,6 +695,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( From 11a7c935cacd5db3ff6768091dfb788a643a95bd Mon Sep 17 00:00:00 2001 From: wilber Date: Mon, 3 Jul 2023 21:23:03 +0800 Subject: [PATCH 2/3] fix compiler error in windows. --- paddle/ir/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddle/ir/CMakeLists.txt b/paddle/ir/CMakeLists.txt index 35c2fb0ded068..4190a893b1a81 100644 --- a/paddle/ir/CMakeLists.txt +++ b/paddle/ir/CMakeLists.txt @@ -37,7 +37,7 @@ if(WITH_SHARED_IR) add_definitions(-DIR_DLL_EXPORT) else() if(WIN32) - add_definitions(-DIR_API) + add_definitions(-DIR_API=) endif() endif() From c40b3a5bc8dbbff126bc353a6b8efea0bd8e1938 Mon Sep 17 00:00:00 2001 From: wilber Date: Tue, 4 Jul 2023 13:30:08 +0800 Subject: [PATCH 3/3] update --- paddle/ir/CMakeLists.txt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/paddle/ir/CMakeLists.txt b/paddle/ir/CMakeLists.txt index 4190a893b1a81..6536a2fe0183f 100644 --- a/paddle/ir/CMakeLists.txt +++ b/paddle/ir/CMakeLists.txt @@ -35,10 +35,6 @@ endfunction() if(WITH_SHARED_IR) add_definitions(-DIR_DLL_EXPORT) -else() - if(WIN32) - add_definitions(-DIR_API=) - endif() endif() add_subdirectory(core)