Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Serving
提交
23bedb47
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看板
提交
23bedb47
编写于
2月 21, 2020
作者:
G
guru4elephant
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
move kvdb test files into tests
上级
630a5245
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
8 addition
and
42 deletion
+8
-42
CMakeLists.txt
CMakeLists.txt
+1
-1
cmake/external/gtest.cmake
cmake/external/gtest.cmake
+1
-2
core/cube/cube-server/CMakeLists.txt
core/cube/cube-server/CMakeLists.txt
+3
-3
core/kvdb/CMakeLists.txt
core/kvdb/CMakeLists.txt
+3
-36
core/tests/gtest_db_func.cpp
core/tests/gtest_db_func.cpp
+0
-0
core/tests/gtest_db_thread.cpp
core/tests/gtest_db_thread.cpp
+0
-0
core/tests/gtest_kvdb.cpp
core/tests/gtest_kvdb.cpp
+0
-0
core/tests/test_rocksdb.cpp
core/tests/test_rocksdb.cpp
+0
-0
未找到文件。
CMakeLists.txt
浏览文件 @
23bedb47
...
...
@@ -65,8 +65,8 @@ endif()
if
(
NOT CLIENT_ONLY
)
include
(
external/jsoncpp
)
include
(
external/rocksdb
)
include
(
external/gtest
)
endif
()
#include(external/gtest)
include
(
external/snappy
)
include
(
external/leveldb
)
...
...
cmake/external/gtest.cmake
浏览文件 @
23bedb47
...
...
@@ -28,7 +28,7 @@ ExternalProject_Add(
GIT_TAG master
UPDATE_COMMAND
""
CONFIGURE_COMMAND
""
BUILD_COMMAND CXXFLAGS=-fPIC && mkdir
build && cd build &&
cmake .. && make -j
${
NUM_OF_PROCESSOR
}
gtest
BUILD_COMMAND CXXFLAGS=-fPIC && mkdir
-p build && cd build && /home/users/dongdaxiang/software/cmake-3.15.2/bin/
cmake .. && make -j
${
NUM_OF_PROCESSOR
}
gtest
INSTALL_COMMAND mkdir -p
${
GTEST_INSTALL_DIR
}
/lib/
&& cp
${
GTEST_SOURCES_DIR
}
/src/extern_gtest/build/lib/libgtest.a
${
GTEST_LIBRARIES
}
&& cp -r
${
GTEST_SOURCES_DIR
}
/src/extern_gtest/googletest/include
${
GTEST_INSTALL_DIR
}
/
...
...
@@ -41,4 +41,3 @@ ADD_LIBRARY(gtest STATIC IMPORTED GLOBAL)
SET_PROPERTY
(
TARGET gtest PROPERTY IMPORTED_LOCATION
${
GTEST_LIBRARIES
}
)
LIST
(
APPEND external_project_dependencies gtest
)
core/cube/cube-server/CMakeLists.txt
浏览文件 @
23bedb47
...
...
@@ -67,10 +67,10 @@ endif()
target_link_libraries
(
cube brpc
${
DYNAMIC_LIB
}
-lpthread -ldl -lz
)
add_executable
(
cube_test
${
SRC_LIST
}
test/cube_test.cpp
${
PROTO_SRC
}
${
PROTO_HEADER
}
)
#
add_executable(cube_test ${SRC_LIST} test/cube_test.cpp
#
${PROTO_SRC} ${PROTO_HEADER})
target_link_libraries
(
cube_test brpc
${
DYNAMIC_LIB
}
gtest -lpthread -ldl -lz
)
#
target_link_libraries(cube_test brpc ${DYNAMIC_LIB} gtest -lpthread -ldl -lz)
# install
install
(
TARGETS cube
...
...
core/kvdb/CMakeLists.txt
浏览文件 @
23bedb47
include_directories
(
SYSTEM
${
CMAKE_CURRENT_LIST_DIR
}
/include
)
set
(
SRC_LIST
${
CMAKE_CURRENT_LIST_DIR
}
/src/test_rocksdb.cpp
${
CMAKE_CURRENT_LIST_DIR
}
/src/rockskvdb_impl.cpp
set
(
SRC_LIST
${
CMAKE_CURRENT_LIST_DIR
}
/src/rockskvdb_impl.cpp
${
CMAKE_CURRENT_LIST_DIR
}
/src/param_dict_mgr_impl.cpp
${
CMAKE_CURRENT_LIST_DIR
}
/src/mock_param_dict_impl.cpp
${
CMAKE_CURRENT_LIST_DIR
}
/src/paddle_rocksdb.cpp
${
CMAKE_CURRENT_LIST_DIR
}
/src/gtest_kvdb.cpp
)
${
CMAKE_CURRENT_LIST_DIR
}
/src/paddle_rocksdb.cpp
)
add_library
(
kvdb
${
SRC_LIST
}
)
add_dependencies
(
kvdb rocksdb
)
install
(
TARGETS kvdb ARCHIVE DESTINATION
${
PADDLE_SERVING_INSTALL_DIR
}
/lib/
)
add_executable
(
kvdb_test
${
SRC_LIST
}
)
add_dependencies
(
kvdb_test rocksdb
)
target_link_libraries
(
kvdb_test rocksdb bz2 snappy zlib gtest
)
#target_include_directories(kvdb_test PUBLIC ${CMAKE_CURRENT_LIST_DIR}/include/kvdb)
set
(
SRC_LIST2
${
CMAKE_CURRENT_LIST_DIR
}
/src/gtest_db_thread.cpp
${
CMAKE_CURRENT_LIST_DIR
}
/src/rockskvdb_impl.cpp
set
(
SRC_LIST2
${
CMAKE_CURRENT_LIST_DIR
}
/src/rockskvdb_impl.cpp
${
CMAKE_CURRENT_LIST_DIR
}
/src/param_dict_mgr_impl.cpp
${
CMAKE_CURRENT_LIST_DIR
}
/src/mock_param_dict_impl.cpp
${
CMAKE_CURRENT_LIST_DIR
}
/src/paddle_rocksdb.cpp
)
add_executable
(
db_thread
${
SRC_LIST2
}
)
add_dependencies
(
db_thread rocksdb
)
target_link_libraries
(
db_thread rocksdb bz2 snappy zlib gtest
)
#target_include_directories(db_thread PUBLIC ${CMAKE_CURRENT_LIST_DIR}/include/kvdb)
set
(
SRC_LIST3
${
CMAKE_CURRENT_LIST_DIR
}
/src/gtest_db_func.cpp
${
CMAKE_CURRENT_LIST_DIR
}
/src/rockskvdb_impl.cpp
${
CMAKE_CURRENT_LIST_DIR
}
/src/param_dict_mgr_impl.cpp
${
CMAKE_CURRENT_LIST_DIR
}
/src/mock_param_dict_impl.cpp
${
CMAKE_CURRENT_LIST_DIR
}
/src/paddle_rocksdb.cpp
)
add_executable
(
db_func
${
SRC_LIST3
}
)
add_dependencies
(
db_func rocksdb
)
target_link_libraries
(
db_func rocksdb bz2 snappy zlib gtest
)
#target_include_directories(db_func PUBLIC ${CMAKE_CURRENT_LIST_DIR}/include/kvdb)
install
(
TARGETS kvdb_test
RUNTIME DESTINATION
${
PADDLE_SERVING_INSTALL_DIR
}
/demo/kvdb_test
)
install
(
TARGETS db_thread
RUNTIME DESTINATION
${
PADDLE_SERVING_INSTALL_DIR
}
/demo/db_thread
)
install
(
TARGETS db_func
RUNTIME DESTINATION
${
PADDLE_SERVING_INSTALL_DIR
}
/demo/db_func
)
file
(
GLOB kvdb_headers
"
${
CMAKE_CURRENT_LIST_DIR
}
/include/kvdb/*.h"
)
install
(
FILES
${
kvdb_headers
}
DESTINATION
${
PADDLE_SERVING_INSTALL_DIR
}
/include/kvdb/
)
core/
kvdb/src
/gtest_db_func.cpp
→
core/
tests
/gtest_db_func.cpp
浏览文件 @
23bedb47
文件已移动
core/
kvdb/src
/gtest_db_thread.cpp
→
core/
tests
/gtest_db_thread.cpp
浏览文件 @
23bedb47
文件已移动
core/
kvdb/src
/gtest_kvdb.cpp
→
core/
tests
/gtest_kvdb.cpp
浏览文件 @
23bedb47
文件已移动
core/
kvdb/src
/test_rocksdb.cpp
→
core/
tests
/test_rocksdb.cpp
浏览文件 @
23bedb47
文件已移动
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录