|
|
|
|
@ -25,13 +25,13 @@ if (WIN32)
|
|
|
|
|
list(APPEND fluid_third_partys gflags glog protobuf cblas)
|
|
|
|
|
endif(WIN32)
|
|
|
|
|
|
|
|
|
|
# paddle_fluid_origin exclude inference api interface
|
|
|
|
|
if(WIN32)
|
|
|
|
|
sep_library(paddle_fluid_origin DEPS ${fluid_modules} paddle_fluid_api)
|
|
|
|
|
else(WIN32)
|
|
|
|
|
#set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> --target elf64-x86-64 cr paddle_fluid_origin ${fluid_modules} paddle_fluid_api")
|
|
|
|
|
cc_library(paddle_fluid_origin DEPS ${fluid_modules} paddle_fluid_api)
|
|
|
|
|
endif(WIN32)
|
|
|
|
|
# # paddle_fluid_origin exclude inference api interface
|
|
|
|
|
# if(WIN32)
|
|
|
|
|
# sep_library(paddle_fluid_origin DEPS ${fluid_modules} paddle_fluid_api)
|
|
|
|
|
# else(WIN32)
|
|
|
|
|
# set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> --target elf64-x86-64 cr paddle_fluid_origin ${fluid_modules} paddle_fluid_api")
|
|
|
|
|
# cc_library(paddle_fluid_origin DEPS ${fluid_modules} paddle_fluid_api)
|
|
|
|
|
# endif(WIN32)
|
|
|
|
|
|
|
|
|
|
add_subdirectory(api)
|
|
|
|
|
|
|
|
|
|
@ -41,19 +41,19 @@ set(SHARED_INFERENCE_SRCS
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/api/analysis_predictor.cc
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/api/details/zero_copy_tensor.cc)
|
|
|
|
|
|
|
|
|
|
if(WIN32)
|
|
|
|
|
sep_library(paddle_fluid DEPS ${fluid_modules} ${STATIC_INFERENCE_APIS} zero_copy_tensor reset_tensor_array
|
|
|
|
|
analysis_config paddle_pass_builder)
|
|
|
|
|
else(WIN32)
|
|
|
|
|
cc_library(paddle_fluid DEPS ${fluid_modules} ${STATIC_INFERENCE_APIS}
|
|
|
|
|
zero_copy_tensor reset_tensor_array analysis_config paddle_pass_builder)
|
|
|
|
|
endif(WIN32)
|
|
|
|
|
# if(WIN32)
|
|
|
|
|
# sep_library(paddle_fluid DEPS ${fluid_modules} ${STATIC_INFERENCE_APIS} zero_copy_tensor reset_tensor_array
|
|
|
|
|
# analysis_config paddle_pass_builder)
|
|
|
|
|
# else(WIN32)
|
|
|
|
|
# cc_library(paddle_fluid DEPS ${fluid_modules} ${STATIC_INFERENCE_APIS}
|
|
|
|
|
# zero_copy_tensor reset_tensor_array analysis_config paddle_pass_builder)
|
|
|
|
|
# endif(WIN32)
|
|
|
|
|
|
|
|
|
|
if(NOT APPLE)
|
|
|
|
|
# TODO(liuyiqu: Temporarily disable the link flag because it is not support on Mac.
|
|
|
|
|
set(LINK_FLAGS "-Wl,--retain-symbols-file ${CMAKE_CURRENT_SOURCE_DIR}/paddle_fluid.sym")
|
|
|
|
|
set_target_properties(paddle_fluid PROPERTIES LINK_FLAGS "${LINK_FLAGS}")
|
|
|
|
|
endif()
|
|
|
|
|
# if(NOT APPLE)
|
|
|
|
|
# # TODO(liuyiqu: Temporarily disable the link flag because it is not support on Mac.
|
|
|
|
|
# set(LINK_FLAGS "-Wl,--retain-symbols-file ${CMAKE_CURRENT_SOURCE_DIR}/paddle_fluid.sym")
|
|
|
|
|
# set_target_properties(paddle_fluid PROPERTIES LINK_FLAGS "${LINK_FLAGS}")
|
|
|
|
|
# endif()
|
|
|
|
|
|
|
|
|
|
# Create shared library
|
|
|
|
|
if(WIN32)
|
|
|
|
|
@ -87,10 +87,10 @@ if(NOT APPLE AND NOT WIN32)
|
|
|
|
|
add_custom_target(check_symbol ALL DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/.check_symbol")
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
if(WITH_TESTING)
|
|
|
|
|
# tests/book depends the models that generated by python/paddle/fluid/tests/book
|
|
|
|
|
add_subdirectory(tests/book)
|
|
|
|
|
if(WITH_INFERENCE_API_TEST)
|
|
|
|
|
add_subdirectory(tests/api)
|
|
|
|
|
endif()
|
|
|
|
|
endif()
|
|
|
|
|
# if(WITH_TESTING)
|
|
|
|
|
# # tests/book depends the models that generated by python/paddle/fluid/tests/book
|
|
|
|
|
# add_subdirectory(tests/book)
|
|
|
|
|
# if(WITH_INFERENCE_API_TEST)
|
|
|
|
|
# add_subdirectory(tests/api)
|
|
|
|
|
# endif()
|
|
|
|
|
# endif()
|
|
|
|
|
|