CMakeLists.txt 996 字节
Newer Older
1
set(FLUID_CORE_MODULES proto_desc memory lod_tensor executor init)
2 3

cc_library(paddle_fluid_api
4
    SRCS io.cc
L
Luo Tao 已提交
5
    DEPS ${FLUID_CORE_MODULES} ${GLOB_OP_LIB})
6

L
Liu Yiqun 已提交
7
# Create static library
8 9
get_property(fluid_modules GLOBAL PROPERTY FLUID_MODULES)
cc_library(paddle_fluid DEPS ${fluid_modules})
L
Luo Tao 已提交
10 11

# Create shared library
L
Liu Yiqun 已提交
12 13
cc_library(paddle_fluid_shared SHARED
    SRCS io.cc
14
    DEPS ${fluid_modules})
L
Liu Yiqun 已提交
15
set_target_properties(paddle_fluid_shared PROPERTIES OUTPUT_NAME paddle_fluid)
Y
Update  
Yi Wang 已提交
16 17 18 19 20
if(NOT APPLE)
  # TODO(liuyiqun): Temporarily disable the link flag because it is not support on Mac.
  set(LINK_FLAGS "-Wl,--version-script ${CMAKE_CURRENT_SOURCE_DIR}/paddle_fluid.map")
  set_target_properties(paddle_fluid_shared PROPERTIES LINK_FLAGS "${LINK_FLAGS}")
endif()
21

22
if(WITH_TESTING)
L
Luo Tao 已提交
23
  # both tests/book and analysis depends the models that generated by python/paddle/fluid/tests/book
24
  add_subdirectory(tests/book)
25
  add_subdirectory(analysis)
L
Luo Tao 已提交
26 27 28 29
endif()

if (TENSORRT_FOUND)
  add_subdirectory(tensorrt)
30
endif()