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

3
cc_library(reader_op_registry SRCS reader_op_registry.cc DEPS operator op_registry reader)
Y
Refine  
Yu Yang 已提交
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
set(LOCAL_READER_LIBS)

function(reader_library TARGET_NAME)
    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)
endfunction()

S
sneaxiy 已提交
20
cc_library(py_reader SRCS py_reader.cc DEPS reader)
Y
yuyang18 已提交
21
cc_library(buffered_reader SRCS buffered_reader.cc DEPS reader simple_threadpool)
S
sneaxiy 已提交
22

Y
yuyang18 已提交
23
reader_library(open_files_op SRCS open_files_op.cc DEPS buffered_reader)
Y
Refine  
Yu Yang 已提交
24 25 26 27
reader_library(create_random_data_generator_op SRCS create_random_data_generator_op.cc)
reader_library(create_shuffle_reader_op SRCS create_shuffle_reader_op.cc)
reader_library(create_batch_reader_op SRCS create_batch_reader_op.cc)
reader_library(create_recordio_file_reader_op SRCS create_recordio_file_reader_op.cc)
Y
yuyang18 已提交
28
reader_library(create_double_buffer_reader_op SRCS create_double_buffer_reader_op.cc DEPS buffered_reader)
F
fengjiayi 已提交
29
reader_library(create_multi_pass_reader_op SRCS create_multi_pass_reader_op.cc)
30
reader_library(create_custom_reader_op SRCS create_custom_reader_op.cc)
S
sneaxiy 已提交
31
reader_library(create_py_reader_op SRCS create_py_reader_op.cc DEPS py_reader)
F
fengjiayi 已提交
32

Q
Qiao Longfei 已提交
33
if (NOT WIN32 AND NOT ON_INFER)
34 35 36
    cc_library(ctr_reader SRCS ctr_reader.cc DEPS gzstream reader zlib)
    cc_test(ctr_reader_test SRCS ctr_reader_test.cc DEPS ctr_reader)
    reader_library(create_ctr_reader_op SRCS create_ctr_reader_op.cc DEPS ctr_reader)
Q
Qiao Longfei 已提交
37
endif ()
38

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

S
sneaxiy 已提交
43
op_library(read_op DEPS py_reader buffered_reader)
W
Wu Yi 已提交
44 45 46 47

foreach(src ${LOCAL_READER_LIBS})
    set(OP_LIBRARY ${src} ${OP_LIBRARY} CACHE INTERNAL "op libs")
endforeach()