Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Serving
提交
b470d47a
S
Serving
项目概览
PaddlePaddle
/
Serving
大约 1 年 前同步成功
通知
185
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
b470d47a
编写于
1月 13, 2020
作者:
G
guru4elephant
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refine sdk folder
上级
2511be1c
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
73 addition
and
5 deletion
+73
-5
sdk-cpp/CMakeLists.txt
sdk-cpp/CMakeLists.txt
+1
-0
sdk-cpp/include/factory.h
sdk-cpp/include/factory.h
+0
-5
sdk-cpp/proto/CMakeLists.txt
sdk-cpp/proto/CMakeLists.txt
+72
-0
未找到文件。
sdk-cpp/CMakeLists.txt
浏览文件 @
b470d47a
include
(
src/CMakeLists.txt
)
include
(
src/CMakeLists.txt
)
include
(
proto/CMakeLists.txt
)
include
(
proto/CMakeLists.txt
)
add_library
(
sdk-cpp
${
sdk_cpp_srcs
}
)
add_library
(
sdk-cpp
${
sdk_cpp_srcs
}
)
...
...
sdk-cpp/include/factory.h
浏览文件 @
b470d47a
...
@@ -98,7 +98,6 @@ namespace brpc = baidu::rpc;
...
@@ -98,7 +98,6 @@ namespace brpc = baidu::rpc;
#define REGIST_STUB_OBJECT_WITH_TAG(D, C, R, I, O, T) \
#define REGIST_STUB_OBJECT_WITH_TAG(D, C, R, I, O, T) \
__attribute__((constructor)) static void PDS_STR_CAT(GlobalRegistObject, \
__attribute__((constructor)) static void PDS_STR_CAT(GlobalRegistObject, \
__LINE__)(void) { \
__LINE__)(void) { \
RAW_LOG_INFO("REGIST_STUB_OBJECT_WITH_TAG"); \
::baidu::paddle_serving::sdk_cpp::Factory< \
::baidu::paddle_serving::sdk_cpp::Factory< \
::baidu::paddle_serving::sdk_cpp::StubImpl<D, C, R, I, O>, \
::baidu::paddle_serving::sdk_cpp::StubImpl<D, C, R, I, O>, \
::baidu::paddle_serving::sdk_cpp::Stub>* factory = \
::baidu::paddle_serving::sdk_cpp::Stub>* factory = \
...
@@ -158,10 +157,6 @@ class FactoryPool {
...
@@ -158,10 +157,6 @@ class FactoryPool {
return
-
1
;
return
-
1
;
}
}
RAW_LOG_INFO
(
"Succ insert one factory, tag: %s, base type %s"
,
tag
.
c_str
(),
typeid
(
B
).
name
());
return
0
;
return
0
;
}
}
...
...
sdk-cpp/proto/CMakeLists.txt
浏览文件 @
b470d47a
function
(
PROTOBUF_GENERATE_SERVING_CPP FOR_SERVING_SIDE SRCS HDRS
)
if
(
NOT ARGN
)
message
(
SEND_ERROR
"Error: PROTOBUF_GENERATE_SERVING_CPP() called without any proto files"
)
return
()
endif
()
if
(
PROTOBUF_GENERATE_CPP_APPEND_PATH
)
# Create an include path for each file specified
foreach
(
FIL
${
ARGN
}
)
get_filename_component
(
ABS_FIL
${
FIL
}
ABSOLUTE
)
get_filename_component
(
ABS_PATH
${
ABS_FIL
}
PATH
)
list
(
FIND _protobuf_include_path
${
ABS_PATH
}
_contains_already
)
if
(
${
_contains_already
}
EQUAL -1
)
list
(
APPEND _protobuf_include_path -I
${
ABS_PATH
}
)
endif
()
endforeach
()
else
()
set
(
_protobuf_include_path -I
${
CMAKE_CURRENT_SOURCE_DIR
}
)
endif
()
if
(
DEFINED PROTOBUF_IMPORT_DIRS
)
foreach
(
DIR
${
Protobuf_IMPORT_DIRS
}
)
get_filename_component
(
ABS_PATH
${
DIR
}
ABSOLUTE
)
list
(
FIND _protobuf_include_path
${
ABS_PATH
}
_contains_already
)
if
(
${
_contains_already
}
EQUAL -1
)
list
(
APPEND _protobuf_include_path -I
${
ABS_PATH
}
)
endif
()
endforeach
()
endif
()
set
(
${
SRCS
}
)
set
(
${
HDRS
}
)
foreach
(
FIL
${
ARGN
}
)
get_filename_component
(
ABS_FIL
${
FIL
}
ABSOLUTE
)
get_filename_component
(
FIL_WE
${
FIL
}
NAME_WE
)
list
(
APPEND
${
SRCS
}
"
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
FIL_WE
}
.pb.cc"
)
list
(
APPEND
${
HDRS
}
"
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
FIL_WE
}
.pb.h"
)
if
(
${
FOR_SERVING_SIDE
}
)
add_custom_command
(
OUTPUT
"
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
FIL_WE
}
.pb.cc"
"
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
FIL_WE
}
.pb.h"
COMMAND
${
Protobuf_PROTOC_EXECUTABLE
}
ARGS --cpp_out=
${
CMAKE_CURRENT_BINARY_DIR
}
--pdcodegen_out=
${
CMAKE_CURRENT_BINARY_DIR
}
--plugin=protoc-gen-pdcodegen=
${
CMAKE_BINARY_DIR
}
/pdcodegen/pdcodegen
--proto_path=
${
CMAKE_SOURCE_DIR
}
/predictor/proto
${
_protobuf_include_path
}
${
ABS_FIL
}
DEPENDS
${
ABS_FIL
}
${
Protobuf_PROTOC_EXECUTABLE
}
COMMENT
"Running Paddle-serving C++ protocol buffer compiler on
${
FIL
}
"
VERBATIM
)
else
()
add_custom_command
(
OUTPUT
"
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
FIL_WE
}
.pb.cc"
"
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
FIL_WE
}
.pb.h"
COMMAND
${
Protobuf_PROTOC_EXECUTABLE
}
ARGS --cpp_out=
${
CMAKE_CURRENT_BINARY_DIR
}
--pdcodegen_out=
${
CMAKE_CURRENT_BINARY_DIR
}
--plugin=protoc-gen-pdcodegen=
${
CMAKE_BINARY_DIR
}
/pdcodegen/pdcodegen
${
_protobuf_include_path
}
${
ABS_FIL
}
DEPENDS
${
ABS_FIL
}
${
Protobuf_PROTOC_EXECUTABLE
}
COMMENT
"Running Paddle-serving C++ protocol buffer compiler on
${
FIL
}
"
VERBATIM
)
endif
()
endforeach
()
set_source_files_properties
(
${${
SRCS
}}
${${
HDRS
}}
PROPERTIES GENERATED TRUE
)
set
(
${
SRCS
}
${${
SRCS
}}
PARENT_SCOPE
)
set
(
${
HDRS
}
${${
HDRS
}}
PARENT_SCOPE
)
endfunction
()
FILE
(
GLOB protos
${
CMAKE_CURRENT_LIST_DIR
}
/*.proto
)
FILE
(
GLOB protos
${
CMAKE_CURRENT_LIST_DIR
}
/*.proto
)
list
(
APPEND protos
${
CMAKE_SOURCE_DIR
}
/predictor/proto/pds_option.proto
list
(
APPEND protos
${
CMAKE_SOURCE_DIR
}
/predictor/proto/pds_option.proto
${
CMAKE_SOURCE_DIR
}
/predictor/proto/builtin_format.proto
)
${
CMAKE_SOURCE_DIR
}
/predictor/proto/builtin_format.proto
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录