From fb93a8be27642f1761262778afea09353fa5c71d Mon Sep 17 00:00:00 2001 From: Liu Yiqun Date: Thu, 31 Aug 2017 17:57:05 +0800 Subject: [PATCH] Add paddle_pserver back to c-api library, because it is used in Evaluator.h. --- CMakeLists.txt | 8 +++----- cmake/cross_compiling/ios.cmake | 2 -- cmake/util.cmake | 13 ++++--------- paddle/CMakeLists.txt | 10 +++------- paddle/capi/CMakeLists.txt | 5 ++--- 5 files changed, 12 insertions(+), 26 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a5971ddd954..ba1febe5e4f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -155,11 +155,9 @@ endif(USE_NNPACK) add_subdirectory(proto) -if(NOT ANDROID AND NOT IOS) - # "add_subdirectory(go)" should be placed after the following loine, - # because it depends on paddle/optimizer. - add_subdirectory(paddle/optimizer) -endif() +# "add_subdirectory(go)" should be placed after the following loine, +# because it depends on paddle/optimizer. +add_subdirectory(paddle/optimizer) # "add_subdirectory(paddle)" and "add_subdirectory(python)" should be # placed after this block, because they depends on it. diff --git a/cmake/cross_compiling/ios.cmake b/cmake/cross_compiling/ios.cmake index eea17436bd8..4b2a18bcc61 100644 --- a/cmake/cross_compiling/ios.cmake +++ b/cmake/cross_compiling/ios.cmake @@ -49,8 +49,6 @@ if(NOT IOS) endif() set(CMAKE_SYSTEM_NAME Darwin) -#set(UNIX ON) -#set(APPLE ON) # Get the Xcode version being used. execute_process(COMMAND xcodebuild -version diff --git a/cmake/util.cmake b/cmake/util.cmake index bfe269ea253..0da4969d310 100644 --- a/cmake/util.cmake +++ b/cmake/util.cmake @@ -71,25 +71,20 @@ function(link_paddle_exe TARGET_NAME) generate_rdma_links() endif() - if(NOT ANDROID AND NOT IOS) - set(PADDLE_TRAIN_LIBS - paddle_pserver - paddle_network - paddle_trainer_lib - paddle_optimizer) - endif() - target_circle_link_libraries(${TARGET_NAME} ARCHIVE_START paddle_gserver paddle_function ARCHIVE_END + paddle_pserver + paddle_trainer_lib + paddle_network paddle_math paddle_utils paddle_parameter paddle_proto paddle_cuda - ${PADDLE_TRAIN_LIBS} + paddle_optimizer ${EXTERNAL_LIBS} ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS} diff --git a/paddle/CMakeLists.txt b/paddle/CMakeLists.txt index cee47bb8aca..b435de80a22 100644 --- a/paddle/CMakeLists.txt +++ b/paddle/CMakeLists.txt @@ -5,12 +5,8 @@ add_subdirectory(testing) add_subdirectory(math) add_subdirectory(parameter) add_subdirectory(gserver) - -if(NOT ANDROID AND NOT IOS) - add_subdirectory(pserver) - add_subdirectory(trainer) -endif() - +add_subdirectory(pserver) +add_subdirectory(trainer) add_subdirectory(scripts) add_subdirectory(string) @@ -23,7 +19,7 @@ if(Boost_FOUND) endif() if(WITH_C_API) - add_subdirectory(capi) + add_subdirectory(capi) endif() if(WITH_SWIG_PY) diff --git a/paddle/capi/CMakeLists.txt b/paddle/capi/CMakeLists.txt index 071f5a0b0d2..dca3b887e1d 100644 --- a/paddle/capi/CMakeLists.txt +++ b/paddle/capi/CMakeLists.txt @@ -38,9 +38,8 @@ set(PADDLE_CAPI_INFER_LIBS paddle_function paddle_gserver paddle_proto - ) - -set(PADDLE_CAPI_TRAIN_LIBS paddle_pserver paddle_network) + paddle_pserver + paddle_network) cc_library(paddle_capi_whole DEPS paddle_capi ${PADDLE_CAPI_INFER_LIBS}) -- GitLab