Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Serving
提交
98ab4b0d
S
Serving
项目概览
PaddlePaddle
/
Serving
大约 1 年 前同步成功
通知
186
Star
833
Fork
253
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
105
列表
看板
标记
里程碑
合并请求
10
Wiki
2
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Serving
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
105
Issue
105
列表
看板
标记
里程碑
合并请求
10
合并请求
10
Pages
分析
分析
仓库分析
DevOps
Wiki
2
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
98ab4b0d
编写于
3月 11, 2021
作者:
Z
zhangjun
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
proto gen cmake fix
上级
e6b2f877
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
87 addition
and
113 deletion
+87
-113
core/configure/CMakeLists.txt
core/configure/CMakeLists.txt
+87
-113
未找到文件。
core/configure/CMakeLists.txt
浏览文件 @
98ab4b0d
if
(
SERVER OR CLIENT
)
if
(
SERVER OR CLIENT
)
LIST
(
APPEND protofiles
LIST
(
APPEND protofiles
${
CMAKE_CURRENT_LIST_DIR
}
/proto/server_configure.proto
${
CMAKE_CURRENT_LIST_DIR
}
/proto/server_configure.proto
${
CMAKE_CURRENT_LIST_DIR
}
/proto/sdk_configure.proto
${
CMAKE_CURRENT_LIST_DIR
}
/proto/sdk_configure.proto
${
CMAKE_CURRENT_LIST_DIR
}
/proto/inferencer_configure.proto
${
CMAKE_CURRENT_LIST_DIR
}
/proto/inferencer_configure.proto
${
CMAKE_CURRENT_LIST_DIR
}
/proto/general_model_config.proto
${
CMAKE_CURRENT_LIST_DIR
}
/proto/general_model_config.proto
)
)
PROTOBUF_GENERATE_CPP
(
configure_proto_srcs configure_proto_hdrs
${
protofiles
}
)
PROTOBUF_GENERATE_CPP
(
configure_proto_srcs configure_proto_hdrs
${
protofiles
}
)
list
(
APPEND configure_srcs
${
configure_proto_srcs
}
)
list
(
APPEND configure_srcs
${
configure_proto_srcs
}
)
list
(
APPEND configure_srcs
${
CMAKE_CURRENT_LIST_DIR
}
/src/configure_parser.cpp
)
list
(
APPEND configure_srcs
${
CMAKE_CURRENT_LIST_DIR
}
/src/configure_parser.cpp
)
add_library
(
configure
${
configure_srcs
}
)
add_library
(
configure
${
configure_srcs
}
)
add_dependencies
(
configure brpc
)
add_dependencies
(
configure brpc
)
install
(
TARGETS configure
install
(
TARGETS configure
ARCHIVE DESTINATION
${
PADDLE_SERVING_INSTALL_DIR
}
/lib
ARCHIVE DESTINATION
${
PADDLE_SERVING_INSTALL_DIR
}
/lib
)
)
install
(
FILES
${
CMAKE_CURRENT_LIST_DIR
}
/include/configure_parser.h
install
(
FILES
${
CMAKE_CURRENT_LIST_DIR
}
/include/configure_parser.h
DESTINATION
${
PADDLE_SERVING_INSTALL_DIR
}
/include/configure/include
)
DESTINATION
${
PADDLE_SERVING_INSTALL_DIR
}
/include/configure/include
)
FILE
(
GLOB inc
${
CMAKE_CURRENT_BINARY_DIR
}
/*.pb.h
)
FILE
(
GLOB inc
${
CMAKE_CURRENT_BINARY_DIR
}
/*.pb.h
)
install
(
FILES
${
inc
}
install
(
FILES
${
inc
}
DESTINATION
${
PADDLE_SERVING_INSTALL_DIR
}
/include/configure
)
DESTINATION
${
PADDLE_SERVING_INSTALL_DIR
}
/include/configure
)
endif
()
endif
()
if
(
WITH_PYTHON
)
if
(
WITH_PYTHON
)
py_proto_compile
(
general_model_config_py_proto SRCS proto/general_model_config.proto
)
py_proto_compile
(
general_model_config_py_proto SRCS proto/general_model_config.proto
)
add_custom_target
(
general_model_config_py_proto_init ALL COMMAND
${
CMAKE_COMMAND
}
-E touch __init__.py
)
add_custom_target
(
general_model_config_py_proto_init ALL COMMAND
${
CMAKE_COMMAND
}
-E touch __init__.py
)
add_dependencies
(
general_model_config_py_proto general_model_config_py_proto_init
)
add_dependencies
(
general_model_config_py_proto general_model_config_py_proto_init
)
py_grpc_proto_compile
(
multi_lang_general_model_service_py_proto SRCS proto/multi_lang_general_model_service.proto
)
py_grpc_proto_compile
(
multi_lang_general_model_service_py_proto SRCS proto/multi_lang_general_model_service.proto
)
add_custom_target
(
multi_lang_general_model_service_py_proto_init ALL COMMAND
${
CMAKE_COMMAND
}
-E touch __init__.py
)
add_custom_target
(
multi_lang_general_model_service_py_proto_init ALL COMMAND
${
CMAKE_COMMAND
}
-E touch __init__.py
)
add_dependencies
(
multi_lang_general_model_service_py_proto multi_lang_general_model_service_py_proto_init
)
add_dependencies
(
multi_lang_general_model_service_py_proto multi_lang_general_model_service_py_proto_init
)
if
(
CLIENT
)
if
(
CLIENT
)
py_proto_compile
(
sdk_configure_py_proto SRCS proto/sdk_configure.proto
)
py_proto_compile
(
sdk_configure_py_proto SRCS proto/sdk_configure.proto
)
add_custom_target
(
sdk_configure_py_proto_init ALL COMMAND
${
CMAKE_COMMAND
}
-E touch __init__.py
)
add_custom_target
(
sdk_configure_py_proto_init ALL COMMAND
${
CMAKE_COMMAND
}
-E touch __init__.py
)
add_dependencies
(
sdk_configure_py_proto sdk_configure_py_proto_init
)
add_dependencies
(
sdk_configure_py_proto sdk_configure_py_proto_init
)
add_custom_command
(
TARGET sdk_configure_py_proto POST_BUILD
add_custom_command
(
TARGET sdk_configure_py_proto POST_BUILD
COMMAND
${
CMAKE_COMMAND
}
-E make_directory
${
PADDLE_SERVING_BINARY_DIR
}
/python/paddle_serving_client/proto
COMMAND
${
CMAKE_COMMAND
}
-E make_directory
${
PADDLE_SERVING_BINARY_DIR
}
/python/paddle_serving_client/proto
COMMAND cp -f *.py
${
PADDLE_SERVING_BINARY_DIR
}
/python/paddle_serving_client/proto
COMMAND cp -f *.py
${
PADDLE_SERVING_BINARY_DIR
}
/python/paddle_serving_client/proto
COMMENT
"Copy generated python proto into directory paddle_serving_client/proto."
COMMENT
"Copy generated python proto into directory paddle_serving_client/proto."
WORKING_DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
)
WORKING_DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
)
add_custom_command
(
TARGET general_model_config_py_proto POST_BUILD
add_custom_command
(
TARGET general_model_config_py_proto POST_BUILD
COMMAND
${
CMAKE_COMMAND
}
-E make_directory
${
PADDLE_SERVING_BINARY_DIR
}
/python/paddle_serving_client/proto
COMMAND
${
CMAKE_COMMAND
}
-E make_directory
${
PADDLE_SERVING_BINARY_DIR
}
/python/paddle_serving_client/proto
COMMAND cp -f *.py
${
PADDLE_SERVING_BINARY_DIR
}
/python/paddle_serving_client/proto
COMMAND cp -f *.py
${
PADDLE_SERVING_BINARY_DIR
}
/python/paddle_serving_client/proto
COMMENT
"Copy generated general_model_config proto file into directory paddle_serving_client/proto."
COMMENT
"Copy generated general_model_config proto file into directory paddle_serving_client/proto."
WORKING_DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
)
WORKING_DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
)
add_custom_command
(
TARGET multi_lang_general_model_service_py_proto POST_BUILD
add_custom_command
(
TARGET multi_lang_general_model_service_py_proto POST_BUILD
COMMAND
${
CMAKE_COMMAND
}
-E make_directory
${
PADDLE_SERVING_BINARY_DIR
}
/python/paddle_serving_client/proto
COMMAND
${
CMAKE_COMMAND
}
-E make_directory
${
PADDLE_SERVING_BINARY_DIR
}
/python/paddle_serving_client/proto
COMMAND cp -f *.py
${
PADDLE_SERVING_BINARY_DIR
}
/python/paddle_serving_client/proto
COMMAND cp -f *.py
${
PADDLE_SERVING_BINARY_DIR
}
/python/paddle_serving_client/proto
COMMENT
"Copy generated multi_lang_general_model_service proto file into directory paddle_serving_client/proto."
COMMENT
"Copy generated multi_lang_general_model_service proto file into directory paddle_serving_client/proto."
WORKING_DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
)
WORKING_DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
)
endif
()
endif
()
if
(
APP
)
if
(
APP
)
add_custom_command
(
TARGET general_model_config_py_proto POST_BUILD
add_custom_command
(
TARGET general_model_config_py_proto POST_BUILD
COMMAND
${
CMAKE_COMMAND
}
-E make_directory
${
PADDLE_SERVING_BINARY_DIR
}
/python/paddle_serving_app/proto
COMMAND
${
CMAKE_COMMAND
}
-E make_directory
${
PADDLE_SERVING_BINARY_DIR
}
/python/paddle_serving_app/proto
COMMAND cp -f *.py
${
PADDLE_SERVING_BINARY_DIR
}
/python/paddle_serving_app/proto
COMMAND cp -f *.py
${
PADDLE_SERVING_BINARY_DIR
}
/python/paddle_serving_app/proto
COMMENT
"Copy generated general_model_config proto file into directory paddle_serving_app/proto."
COMMENT
"Copy generated general_model_config proto file into directory paddle_serving_app/proto."
WORKING_DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
)
WORKING_DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
)
endif
()
endif
()
if
(
SERVER
)
if
(
SERVER
)
py_proto_compile
(
server_config_py_proto SRCS proto/server_configure.proto
)
py_proto_compile
(
server_config_py_proto SRCS proto/server_configure.proto
)
add_custom_target
(
server_config_py_proto_init ALL COMMAND
${
CMAKE_COMMAND
}
-E touch __init__.py
)
add_custom_target
(
server_config_py_proto_init ALL COMMAND
${
CMAKE_COMMAND
}
-E touch __init__.py
)
add_dependencies
(
server_config_py_proto server_config_py_proto_init
)
add_dependencies
(
server_config_py_proto server_config_py_proto_init
)
if
(
NOT WITH_GPU AND NOT WITH_LITE
)
add_custom_command
(
TARGET server_config_py_proto POST_BUILD
add_custom_command
(
TARGET server_config_py_proto POST_BUILD
COMMAND
${
CMAKE_COMMAND
}
-E make_directory
${
PADDLE_SERVING_BINARY_DIR
}
/python/paddle_serving_server/proto
COMMAND
${
CMAKE_COMMAND
}
-E make_directory
${
PADDLE_SERVING_BINARY_DIR
}
/python/paddle_serving_server/proto
COMMAND cp -f *.py
${
PADDLE_SERVING_BINARY_DIR
}
/python/paddle_serving_server/proto
COMMAND cp -f *.py
${
PADDLE_SERVING_BINARY_DIR
}
/python/paddle_serving_server/proto
COMMENT
"Copy generated python proto into directory paddle_serving_server/proto."
COMMENT
"Copy generated python proto into directory paddle_serving_server/proto."
WORKING_DIRECTORY
${
CMAKE_CURRENT_BINRARY_DIR
}
)
WORKING_DIRECTORY
${
CMAKE_CURRENT_BINRARY_DIR
}
)
add_custom_command
(
TARGET general_model_config_py_proto POST_BUILD
add_custom_command
(
TARGET general_model_config_py_proto POST_BUILD
COMMAND
${
CMAKE_COMMAND
}
-E make_directory
${
PADDLE_SERVING_BINARY_DIR
}
/python/paddle_serving_server/proto
COMMAND
${
CMAKE_COMMAND
}
-E make_directory
${
PADDLE_SERVING_BINARY_DIR
}
/python/paddle_serving_server/proto
COMMAND cp -f *.py
${
PADDLE_SERVING_BINARY_DIR
}
/python/paddle_serving_server/proto
COMMAND cp -f *.py
${
PADDLE_SERVING_BINARY_DIR
}
/python/paddle_serving_server/proto
COMMENT
"Copy generated general_model_config proto file into directory paddle_serving_server/proto."
COMMENT
"Copy generated general_model_config proto file into directory paddle_serving_server/proto."
WORKING_DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
)
WORKING_DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
)
add_custom_command
(
TARGET multi_lang_general_model_service_py_proto POST_BUILD
add_custom_command
(
TARGET multi_lang_general_model_service_py_proto POST_BUILD
COMMAND
${
CMAKE_COMMAND
}
-E make_directory
${
PADDLE_SERVING_BINARY_DIR
}
/python/paddle_serving_server/proto
COMMAND
${
CMAKE_COMMAND
}
-E make_directory
${
PADDLE_SERVING_BINARY_DIR
}
/python/paddle_serving_server/proto
COMMAND cp -f *.py
${
PADDLE_SERVING_BINARY_DIR
}
/python/paddle_serving_server/proto
COMMAND cp -f *.py
${
PADDLE_SERVING_BINARY_DIR
}
/python/paddle_serving_server/proto
COMMENT
"Copy generated multi_lang_general_model_service proto file into directory paddle_serving_server/proto."
COMMENT
"Copy generated multi_lang_general_model_service proto file into directory paddle_serving_server/proto."
WORKING_DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
)
WORKING_DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
)
endif
()
else
()
add_custom_command
(
TARGET server_config_py_proto POST_BUILD
COMMAND
${
CMAKE_COMMAND
}
-E make_directory
${
PADDLE_SERVING_BINARY_DIR
}
/python/paddle_serving_server_gpu/proto
COMMAND cp -f *.py
${
PADDLE_SERVING_BINARY_DIR
}
/python/paddle_serving_server_gpu/proto
COMMENT
"Copy generated python proto into directory
paddle_serving_server_gpu/proto."
WORKING_DIRECTORY
${
CMAKE_CURRENT_BINRARY_DIR
}
)
add_custom_command
(
TARGET general_model_config_py_proto POST_BUILD
COMMAND
${
CMAKE_COMMAND
}
-E make_directory
${
PADDLE_SERVING_BINARY_DIR
}
/python/paddle_serving_server_gpu/proto
COMMAND cp -f *.py
${
PADDLE_SERVING_BINARY_DIR
}
/python/paddle_serving_server_gpu/proto
COMMENT
"Copy generated general_model_config proto file into directory
paddle_serving_server_gpu/proto."
WORKING_DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
)
add_custom_command
(
TARGET multi_lang_general_model_service_py_proto POST_BUILD
COMMAND
${
CMAKE_COMMAND
}
-E make_directory
${
PADDLE_SERVING_BINARY_DIR
}
/python/paddle_serving_server_gpu/proto
COMMAND cp -f *.py
${
PADDLE_SERVING_BINARY_DIR
}
/python/paddle_serving_server_gpu/proto
COMMENT
"Copy generated multi_lang_general_model_service proto file into directory paddle_serving_server_gpu/proto."
WORKING_DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
)
endif
()
endif
()
endif
()
endif
()
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录