From 2be7cf909a6680cc53151b2fe422dddbef13f8da Mon Sep 17 00:00:00 2001 From: Luo Tao Date: Tue, 16 Jan 2018 18:30:25 +0800 Subject: [PATCH] add paddle INSTALL for fluid api --- paddle/framework/CMakeLists.txt | 6 ++++++ paddle/inference/CMakeLists.txt | 6 ++++++ paddle/memory/CMakeLists.txt | 7 +++++++ paddle/platform/CMakeLists.txt | 8 ++++++++ paddle/string/CMakeLists.txt | 7 ++++++- 5 files changed, 33 insertions(+), 1 deletion(-) diff --git a/paddle/framework/CMakeLists.txt b/paddle/framework/CMakeLists.txt index 597ea959f..fcfac5a3e 100644 --- a/paddle/framework/CMakeLists.txt +++ b/paddle/framework/CMakeLists.txt @@ -84,3 +84,9 @@ cc_test(op_kernel_type_test SRCS op_kernel_type_test.cc DEPS place device_contex cc_test(cow_ptr_tests SRCS details/cow_ptr_test.cc) nv_test(data_device_transform_test SRCS data_device_transform_test.cu DEPS operator op_registry init math_function) + +if(NOT WITH_C_API AND WITH_FLUID) + file(GLOB FRAMEWORK_HEADERS *.h) + install(FILES ${FRAMEWORK_HEADERS} DESTINATION include/paddle/framework) + install(FILES details/cow_ptr.h details/op_registry.h DESTINATION include/paddle/framework/details) +endif() diff --git a/paddle/inference/CMakeLists.txt b/paddle/inference/CMakeLists.txt index b017283ec..af882f252 100644 --- a/paddle/inference/CMakeLists.txt +++ b/paddle/inference/CMakeLists.txt @@ -16,6 +16,12 @@ target_circle_link_libraries(paddle_fluid_shared ARCHIVE_END ${FLUID_CORE_MODULES}) +# install library & headers +if(NOT WITH_C_API AND WITH_FLUID) + install(FILES inference.h DESTINATION include/paddle/inference) + install(TARGETS paddle_fluid_shared DESTINATION lib) +endif() + # ptools # just for testing, we may need to change the storing format for inference_model # and move the dependent of pickle. diff --git a/paddle/memory/CMakeLists.txt b/paddle/memory/CMakeLists.txt index 8841c14ee..061ee1a4d 100644 --- a/paddle/memory/CMakeLists.txt +++ b/paddle/memory/CMakeLists.txt @@ -14,3 +14,10 @@ cc_library(paddle_memory system_allocator) cc_test(memory_test SRCS memory_test.cc DEPS place paddle_memory) + +if(NOT WITH_C_API AND WITH_FLUID) + file(GLOB MEMORY_HEADERS *.h) + file(GLOB MEMORY_DETAIL_HEADERS detail/*.h) + install(FILES ${MEMORY_HEADERS} DESTINATION include/paddle/memory) + install(FILES ${MEMORY_DETAIL_HEADERS} DESTINATION include/paddle/memory/detail) +endif() diff --git a/paddle/platform/CMakeLists.txt b/paddle/platform/CMakeLists.txt index 44f6d85cd..3742594a5 100644 --- a/paddle/platform/CMakeLists.txt +++ b/paddle/platform/CMakeLists.txt @@ -39,3 +39,11 @@ 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_test(profiler_test SRCS profiler_test.cc DEPS profiler) + +if(NOT WITH_C_API AND WITH_FLUID) + file(GLOB PLATFORM_HEADERS *.h) + file(GLOB PLATFORM_dynload_HEADERS dynload/*.h) + install(FILES ${PLATFORM_HEADERS} DESTINATION include/paddle/platform) + install(FILES ${PLATFORM_HEADERS} DESTINATION include/paddle/platform/dynload) + install(FILES details/device_ptr_cast.h DESTINATION include/paddle/platform/details) +endif() diff --git a/paddle/string/CMakeLists.txt b/paddle/string/CMakeLists.txt index 60667b728..0fa846c4e 100644 --- a/paddle/string/CMakeLists.txt +++ b/paddle/string/CMakeLists.txt @@ -1,5 +1,10 @@ cc_library(stringpiece SRCS piece.cc) 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(to_string_test SRCS to_string_test.cc) + +if(NOT WITH_C_API AND WITH_FLUID) + file(GLOB STRING_HEADERS *.h) + install(FILES ${STRING_HEADERS} DESTINATION include/paddle/memory) + install(FILES tinyformat/tinyformat.h DESTINATION include/paddle/memory/tinyformat) +endif() -- GitLab