Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
sven357
Paddle
提交
9b5d41b6
P
Paddle
项目概览
sven357
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
9b5d41b6
编写于
1月 30, 2018
作者:
L
Luo Tao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
make inference_lib_dist
上级
311334e0
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
66 addition
and
36 deletion
+66
-36
cmake/external/eigen.cmake
cmake/external/eigen.cmake
+7
-5
cmake/external/gflags.cmake
cmake/external/gflags.cmake
+8
-1
cmake/external/glog.cmake
cmake/external/glog.cmake
+8
-1
cmake/external/protobuf.cmake
cmake/external/protobuf.cmake
+8
-1
paddle/framework/CMakeLists.txt
paddle/framework/CMakeLists.txt
+7
-6
paddle/inference/CMakeLists.txt
paddle/inference/CMakeLists.txt
+9
-4
paddle/memory/CMakeLists.txt
paddle/memory/CMakeLists.txt
+6
-6
paddle/platform/CMakeLists.txt
paddle/platform/CMakeLists.txt
+7
-7
paddle/string/CMakeLists.txt
paddle/string/CMakeLists.txt
+6
-5
未找到文件。
cmake/external/eigen.cmake
浏览文件 @
9b5d41b6
...
@@ -29,8 +29,10 @@ add_dependencies(eigen3 extern_eigen3)
...
@@ -29,8 +29,10 @@ add_dependencies(eigen3 extern_eigen3)
LIST
(
APPEND external_project_dependencies eigen3
)
LIST
(
APPEND external_project_dependencies eigen3
)
IF
(
NOT WITH_C_API AND WITH_FLUID
)
set
(
lib_dir
"
${
CMAKE_INSTALL_PREFIX
}
/third_party/eigen3"
)
INSTALL
(
FILES
${
EIGEN_INCLUDE_DIR
}
/Eigen/Core DESTINATION third_party/eigen3/Eigen
)
add_custom_target
(
eigen3_lib
INSTALL
(
DIRECTORY
${
EIGEN_INCLUDE_DIR
}
/Eigen/src DESTINATION third_party/eigen3/Eigen
)
COMMAND mkdir -p
"
${
lib_dir
}
/Eigen"
"
${
lib_dir
}
/unsupported"
INSTALL
(
DIRECTORY
${
EIGEN_INCLUDE_DIR
}
/unsupported/Eigen DESTINATION third_party/eigen3/unsupported
)
COMMAND cp
"
${
EIGEN_INCLUDE_DIR
}
/Eigen/Core"
"
${
lib_dir
}
/Eigen"
ENDIF
()
COMMAND cp -r
"
${
EIGEN_INCLUDE_DIR
}
/Eigen/src"
"
${
lib_dir
}
/Eigen"
COMMAND cp -r
"
${
EIGEN_INCLUDE_DIR
}
/unsupported/Eigen"
"
${
lib_dir
}
/unsupported"
)
cmake/external/gflags.cmake
浏览文件 @
9b5d41b6
...
@@ -52,7 +52,7 @@ ADD_DEPENDENCIES(gflags extern_gflags)
...
@@ -52,7 +52,7 @@ ADD_DEPENDENCIES(gflags extern_gflags)
LIST
(
APPEND external_project_dependencies gflags
)
LIST
(
APPEND external_project_dependencies gflags
)
IF
(
WITH_C_API
OR WITH_FLUID
)
IF
(
WITH_C_API
)
INSTALL
(
DIRECTORY
${
GFLAGS_INCLUDE_DIR
}
DESTINATION third_party/gflags
)
INSTALL
(
DIRECTORY
${
GFLAGS_INCLUDE_DIR
}
DESTINATION third_party/gflags
)
IF
(
ANDROID
)
IF
(
ANDROID
)
INSTALL
(
FILES
${
GFLAGS_LIBRARIES
}
DESTINATION third_party/gflags/lib/
${
ANDROID_ABI
}
)
INSTALL
(
FILES
${
GFLAGS_LIBRARIES
}
DESTINATION third_party/gflags/lib/
${
ANDROID_ABI
}
)
...
@@ -60,3 +60,10 @@ IF(WITH_C_API OR WITH_FLUID)
...
@@ -60,3 +60,10 @@ IF(WITH_C_API OR WITH_FLUID)
INSTALL
(
FILES
${
GFLAGS_LIBRARIES
}
DESTINATION third_party/gflags/lib
)
INSTALL
(
FILES
${
GFLAGS_LIBRARIES
}
DESTINATION third_party/gflags/lib
)
ENDIF
()
ENDIF
()
ENDIF
()
ENDIF
()
set
(
lib_dir
"
${
CMAKE_INSTALL_PREFIX
}
/third_party/install/gflags"
)
add_custom_target
(
gflags_lib
COMMAND mkdir -p
"
${
lib_dir
}
/lib"
COMMAND cp -r
"
${
GFLAGS_INCLUDE_DIR
}
"
"
${
lib_dir
}
"
COMMAND cp
"
${
GFLAGS_LIBRARIES
}
"
"
${
lib_dir
}
/lib"
)
cmake/external/glog.cmake
浏览文件 @
9b5d41b6
...
@@ -68,7 +68,7 @@ LINK_LIBRARIES(glog gflags)
...
@@ -68,7 +68,7 @@ LINK_LIBRARIES(glog gflags)
LIST
(
APPEND external_project_dependencies glog
)
LIST
(
APPEND external_project_dependencies glog
)
IF
(
WITH_C_API
OR WITH_FLUID
)
IF
(
WITH_C_API
)
INSTALL
(
DIRECTORY
${
GLOG_INCLUDE_DIR
}
DESTINATION third_party/glog
)
INSTALL
(
DIRECTORY
${
GLOG_INCLUDE_DIR
}
DESTINATION third_party/glog
)
IF
(
ANDROID
)
IF
(
ANDROID
)
INSTALL
(
FILES
${
GLOG_LIBRARIES
}
DESTINATION third_party/glog/lib/
${
ANDROID_ABI
}
)
INSTALL
(
FILES
${
GLOG_LIBRARIES
}
DESTINATION third_party/glog/lib/
${
ANDROID_ABI
}
)
...
@@ -76,3 +76,10 @@ IF(WITH_C_API OR WITH_FLUID)
...
@@ -76,3 +76,10 @@ IF(WITH_C_API OR WITH_FLUID)
INSTALL
(
FILES
${
GLOG_LIBRARIES
}
DESTINATION third_party/glog/lib
)
INSTALL
(
FILES
${
GLOG_LIBRARIES
}
DESTINATION third_party/glog/lib
)
ENDIF
()
ENDIF
()
ENDIF
()
ENDIF
()
set
(
lib_dir
"
${
CMAKE_INSTALL_PREFIX
}
/third_party/install/glog"
)
add_custom_target
(
glog_lib
COMMAND mkdir -p
"
${
lib_dir
}
/lib"
COMMAND cp -r
"
${
GLOG_INCLUDE_DIR
}
"
"
${
lib_dir
}
"
COMMAND cp
"
${
GLOG_LIBRARIES
}
"
"
${
lib_dir
}
/lib"
)
cmake/external/protobuf.cmake
浏览文件 @
9b5d41b6
...
@@ -250,7 +250,7 @@ IF(NOT PROTOBUF_FOUND)
...
@@ -250,7 +250,7 @@ IF(NOT PROTOBUF_FOUND)
SET
(
PROTOBUF_PROTOC_LIBRARY
${
extern_protobuf_PROTOC_LIBRARY
}
SET
(
PROTOBUF_PROTOC_LIBRARY
${
extern_protobuf_PROTOC_LIBRARY
}
CACHE FILEPATH
"protoc library."
FORCE
)
CACHE FILEPATH
"protoc library."
FORCE
)
IF
(
WITH_C_API
OR WITH_FLUID
)
IF
(
WITH_C_API
)
INSTALL
(
DIRECTORY
${
PROTOBUF_INCLUDE_DIR
}
DESTINATION third_party/protobuf
)
INSTALL
(
DIRECTORY
${
PROTOBUF_INCLUDE_DIR
}
DESTINATION third_party/protobuf
)
IF
(
ANDROID
)
IF
(
ANDROID
)
INSTALL
(
FILES
${
PROTOBUF_LITE_LIBRARY
}
DESTINATION third_party/protobuf/lib/
${
ANDROID_ABI
}
)
INSTALL
(
FILES
${
PROTOBUF_LITE_LIBRARY
}
DESTINATION third_party/protobuf/lib/
${
ANDROID_ABI
}
)
...
@@ -259,6 +259,13 @@ IF(NOT PROTOBUF_FOUND)
...
@@ -259,6 +259,13 @@ IF(NOT PROTOBUF_FOUND)
ENDIF
()
ENDIF
()
ENDIF
()
ENDIF
()
set
(
lib_dir
"
${
CMAKE_INSTALL_PREFIX
}
/third_party/install/protobuf"
)
add_custom_target
(
protobuf_lib
COMMAND mkdir -p
"
${
lib_dir
}
/lib"
COMMAND cp -r
"
${
PROTOBUF_INCLUDE_DIR
}
"
"
${
lib_dir
}
"
COMMAND cp
"
${
PROTOBUF_LITE_LIBRARY
}
"
"
${
lib_dir
}
/lib"
)
IF
(
CMAKE_CROSSCOMPILING
)
IF
(
CMAKE_CROSSCOMPILING
)
PROMPT_PROTOBUF_LIB
(
protobuf_host extern_protobuf
)
PROMPT_PROTOBUF_LIB
(
protobuf_host extern_protobuf
)
ELSE
()
ELSE
()
...
...
paddle/framework/CMakeLists.txt
浏览文件 @
9b5d41b6
...
@@ -92,11 +92,12 @@ cc_test(init_test SRCS init_test.cc DEPS init)
...
@@ -92,11 +92,12 @@ cc_test(init_test SRCS init_test.cc DEPS init)
cc_test
(
op_kernel_type_test SRCS op_kernel_type_test.cc DEPS place device_context framework_proto
)
cc_test
(
op_kernel_type_test SRCS op_kernel_type_test.cc DEPS place device_context framework_proto
)
cc_test
(
cow_ptr_tests SRCS details/cow_ptr_test.cc
)
cc_test
(
cow_ptr_tests SRCS details/cow_ptr_test.cc
)
if
(
NOT WITH_C_API AND WITH_FLUID
)
set
(
lib_dir
"
${
CMAKE_INSTALL_PREFIX
}
/paddle/framework"
)
file
(
GLOB FRAMEWORK_HEADERS *.h
)
add_custom_target
(
framework_lib DEPENDS framework_py_proto
install
(
FILES
${
FRAMEWORK_HEADERS
}
DESTINATION include/paddle/framework
)
COMMAND mkdir -p
"
${
lib_dir
}
/details"
install
(
FILES
${
CMAKE_CURRENT_BINARY_DIR
}
/framework.pb.h DESTINATION include/paddle/framework
)
COMMAND cp
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/*.h"
"
${
lib_dir
}
"
install
(
FILES details/cow_ptr.h details/op_registry.h DESTINATION include/paddle/framework/details
)
COMMAND cp
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/details/*.h"
"
${
lib_dir
}
/details"
endif
()
COMMAND cp
"
${
CMAKE_CURRENT_BINARY_DIR
}
/framework.pb.h"
"
${
lib_dir
}
"
)
cc_test
(
channel_test SRCS channel_test.cc
)
cc_test
(
channel_test SRCS channel_test.cc
)
paddle/inference/CMakeLists.txt
浏览文件 @
9b5d41b6
...
@@ -19,10 +19,15 @@ target_circle_link_libraries(paddle_fluid_shared
...
@@ -19,10 +19,15 @@ target_circle_link_libraries(paddle_fluid_shared
SET_TARGET_PROPERTIES
(
paddle_fluid_shared PROPERTIES OUTPUT_NAME paddle_fluid
)
SET_TARGET_PROPERTIES
(
paddle_fluid_shared PROPERTIES OUTPUT_NAME paddle_fluid
)
# install library & headers
# install library & headers
if
(
NOT WITH_C_API AND WITH_FLUID
)
set
(
lib_dir
"
${
CMAKE_INSTALL_PREFIX
}
/paddle/inference"
)
install
(
FILES io.h DESTINATION include/paddle/inference
)
add_custom_target
(
inference_lib DEPENDS paddle_fluid_shared
install
(
TARGETS paddle_fluid_shared DESTINATION lib
)
COMMAND mkdir -p
"
${
lib_dir
}
"
endif
()
COMMAND cp
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/*.h"
"
${
lib_dir
}
"
COMMAND cp
"
${
CMAKE_CURRENT_BINARY_DIR
}
/libpaddle_fluid.so"
"
${
lib_dir
}
"
)
add_custom_target
(
inference_lib_dist DEPENDS
inference_lib framework_lib memory_lib platform_lib string_lib
gflags_lib glog_lib protobuf_lib eigen3_lib
)
add_executable
(
example example.cc
)
add_executable
(
example example.cc
)
if
(
APPLE
)
if
(
APPLE
)
...
...
paddle/memory/CMakeLists.txt
浏览文件 @
9b5d41b6
...
@@ -15,9 +15,9 @@ cc_library(paddle_memory
...
@@ -15,9 +15,9 @@ cc_library(paddle_memory
cc_test
(
memory_test SRCS memory_test.cc DEPS place paddle_memory
)
cc_test
(
memory_test SRCS memory_test.cc DEPS place paddle_memory
)
if
(
NOT WITH_C_API AND WITH_FLUID
)
set
(
lib_dir
"
${
CMAKE_INSTALL_PREFIX
}
/paddle/memory"
)
file
(
GLOB MEMORY_HEADERS *.h
)
add_custom_target
(
memory_lib
file
(
GLOB MEMORY_DETAIL_HEADERS detail/*.h
)
COMMAND mkdir -p
"
${
lib_dir
}
/detail"
install
(
FILES
${
MEMORY_HEADERS
}
DESTINATION include/paddle/memory
)
COMMAND cp
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/*.h"
"
${
lib_dir
}
"
install
(
FILES
${
MEMORY_DETAIL_HEADERS
}
DESTINATION include/paddle/memory/detail
)
COMMAND cp
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/detail/*.h"
"
${
lib_dir
}
/detail"
endif
(
)
)
paddle/platform/CMakeLists.txt
浏览文件 @
9b5d41b6
...
@@ -40,10 +40,10 @@ nv_test(nccl_test SRCS nccl_test.cu DEPS dynload_cuda gpu_info device_context)
...
@@ -40,10 +40,10 @@ nv_test(nccl_test SRCS nccl_test.cu DEPS dynload_cuda gpu_info device_context)
cc_library
(
profiler SRCS profiler.cc DEPS device_context
)
cc_library
(
profiler SRCS profiler.cc DEPS device_context
)
cc_test
(
profiler_test SRCS profiler_test.cc DEPS profiler
)
cc_test
(
profiler_test SRCS profiler_test.cc DEPS profiler
)
if
(
NOT WITH_C_API AND WITH_FLUID
)
set
(
lib_dir
"
${
CMAKE_INSTALL_PREFIX
}
/paddle/platform"
)
file
(
GLOB PLATFORM_HEADERS *.h
)
add_custom_target
(
platform_lib
file
(
GLOB PLATFORM_dynload_HEADERS dynload/*.h
)
COMMAND mkdir -p
"
${
lib_dir
}
/dynload"
"
${
lib_dir
}
/details"
install
(
FILES
${
PLATFORM_HEADERS
}
DESTINATION include/paddle/platform
)
COMMAND cp
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/*.h"
"
${
lib_dir
}
"
install
(
FILES
${
PLATFORM_HEADERS
}
DESTINATION include/paddle/platform/dynload
)
COMMAND cp
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/dynload/*.h"
"
${
lib_dir
}
/dynload"
install
(
FILES details/device_ptr_cast.h DESTINATION include/paddle/platform/details
)
COMMAND cp
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/details/*.h"
"
${
lib_dir
}
/details"
endif
()
)
paddle/string/CMakeLists.txt
浏览文件 @
9b5d41b6
...
@@ -3,8 +3,9 @@ cc_test(stringpiece_test SRCS piece_test.cc DEPS stringpiece glog gflags)
...
@@ -3,8 +3,9 @@ cc_test(stringpiece_test SRCS piece_test.cc DEPS stringpiece glog gflags)
cc_test
(
stringprintf_test SRCS printf_test.cc DEPS glog gflags
)
cc_test
(
stringprintf_test SRCS printf_test.cc DEPS glog gflags
)
cc_test
(
to_string_test SRCS to_string_test.cc
)
cc_test
(
to_string_test SRCS to_string_test.cc
)
if
(
NOT WITH_C_API AND WITH_FLUID
)
set
(
lib_dir
"
${
CMAKE_INSTALL_PREFIX
}
/paddle/string"
)
file
(
GLOB STRING_HEADERS *.h
)
add_custom_target
(
string_lib
install
(
FILES
${
STRING_HEADERS
}
DESTINATION include/paddle/string
)
COMMAND mkdir -p
"
${
lib_dir
}
/tinyformat"
install
(
FILES tinyformat/tinyformat.h DESTINATION include/paddle/string/tinyformat
)
COMMAND cp
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/*.h"
"
${
lib_dir
}
"
endif
()
COMMAND cp
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/tinyformat/*.h"
"
${
lib_dir
}
/tinyformat"
)
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录