diff --git a/CMakeLists.txt b/CMakeLists.txt index a5971ddd954237284257ca469dc5d0ab8969f074..ba1febe5e4f2c8a4a21da6a0069652724a94e438 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 eea17436bd8bbd082f82a23e90aa2028d4987b70..4b2a18bcc6198aa0ff045d2a93becfa5ba4fef27 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 bfe269ea25380867c3e33cb3bbec29b5690c10e7..0da4969d310368ab27b0ed65237813c07d6e59f0 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 cee47bb8aca1873e620c21d78f3468f87c9c209f..b435de80a224571d16efdee168541aa301c3f73a 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 071f5a0b0d22ef331729009f626e935aeb5ce57a..dca3b887e1d8af7db1692241a5ba00b169b90e57 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})