Skip to content

Commit f3b7e18

Browse files
committed
add static library for analysis
1 parent d0c65bf commit f3b7e18

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

cmake/inference_lib.cmake

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -128,16 +128,13 @@ set(src_dir "${PADDLE_SOURCE_DIR}/paddle/fluid")
128128
set(dst_dir "${FLUID_INSTALL_DIR}/paddle/fluid")
129129
set(module "framework")
130130
if (NOT WIN32)
131-
copy(framework_lib DEPS framework_py_proto
132-
SRCS ${src_dir}/${module}/*.h ${src_dir}/${module}/details/*.h ${PADDLE_BINARY_DIR}/paddle/fluid/framework/framework.pb.h
133-
DSTS ${dst_dir}/${module} ${dst_dir}/${module}/details ${dst_dir}/${module}
134-
)
135-
else()
136-
copy(framework_lib
131+
set(framework_lib_deps framework_py_proto)
132+
endif(NOT WIN32)
133+
copy(framework_lib DEPS ${framework_lib_deps}
137134
SRCS ${src_dir}/${module}/*.h ${src_dir}/${module}/details/*.h ${PADDLE_BINARY_DIR}/paddle/fluid/framework/framework.pb.h
138-
DSTS ${dst_dir}/${module} ${dst_dir}/${module}/details ${dst_dir}/${module}
135+
${src_dir}/${module}/ir/*.h
136+
DSTS ${dst_dir}/${module} ${dst_dir}/${module}/details ${dst_dir}/${module} ${dst_dir}/${module}/ir
139137
)
140-
endif(NOT WIN32)
141138

142139
set(module "memory")
143140
copy(memory_lib

paddle/fluid/inference/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ if(NOT APPLE)
2222
endif()
2323

2424
# Create static library
25-
cc_library(paddle_fluid DEPS ${fluid_modules} paddle_fluid_api paddle_inference_api)
25+
cc_library(paddle_fluid DEPS ${fluid_modules} paddle_fluid_api paddle_inference_api analysis_predictor)
2626
if(NOT APPLE)
2727
# TODO(liuyiqu: Temporarily disable the link flag because it is not support on Mac.
2828
set(LINK_FLAGS "-Wl,--retain-symbols-file ${CMAKE_CURRENT_SOURCE_DIR}/paddle_fluid.sym")

0 commit comments

Comments
 (0)