CMakeLists.txt 1.2 KB
Newer Older
W
Wu Yi 已提交
1 2
include(operators)

3 4 5 6
cc_library(
  reader_op_registry
  SRCS reader_op_registry.cc
  DEPS operator op_registry reader)
Y
Refine  
Yu Yang 已提交
7 8 9
set(LOCAL_READER_LIBS)

function(reader_library TARGET_NAME)
10 11 12 13 14 15 16 17 18 19 20
  set(oneValueArgs "")
  set(multiValueArgs SRCS DEPS)
  set(options "")
  set(common_deps reader_op_registry)
  cmake_parse_arguments(reader_library "${options}" "${oneValueArgs}"
                        "${multiValueArgs}" ${ARGN})
  op_library(${TARGET_NAME} SRCS ${reader_library_SRCS} DEPS ${common_deps}
             ${reader_library_DEPS})
  set(LOCAL_READER_LIBS
      ${TARGET_NAME} ${LOCAL_READER_LIBS}
      PARENT_SCOPE)
Y
Refine  
Yu Yang 已提交
21 22
endfunction()

23 24 25 26 27 28 29 30
cc_library(
  py_reader
  SRCS py_reader.cc
  DEPS reader)
cc_library(
  buffered_reader
  SRCS buffered_reader.cc
  DEPS reader simple_threadpool)
S
sneaxiy 已提交
31

32 33
reader_library(create_double_buffer_reader_op SRCS
               create_double_buffer_reader_op.cc DEPS buffered_reader)
S
sneaxiy 已提交
34
reader_library(create_py_reader_op SRCS create_py_reader_op.cc DEPS py_reader)
F
fengjiayi 已提交
35

36 37
op_library(read_op DEPS py_reader buffered_reader)

F
fengjiayi 已提交
38
cc_test(reader_blocking_queue_test SRCS reader_blocking_queue_test.cc)
Y
Refine  
Yu Yang 已提交
39
# Export local libraries to parent
W
Wu Yi 已提交
40
# set(READER_LIBRARY ${LOCAL_READER_LIBS} PARENT_SCOPE)