]> git.proxmox.com Git - ceph.git/blob - ceph/src/arrow/cpp/src/arrow/ipc/CMakeLists.txt
import quincy 17.2.0
[ceph.git] / ceph / src / arrow / cpp / src / arrow / ipc / CMakeLists.txt
1 # Licensed to the Apache Software Foundation (ASF) under one
2 # or more contributor license agreements. See the NOTICE file
3 # distributed with this work for additional information
4 # regarding copyright ownership. The ASF licenses this file
5 # to you under the Apache License, Version 2.0 (the
6 # "License"); you may not use this file except in compliance
7 # with the License. You may obtain a copy of the License at
8 #
9 # http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing,
12 # software distributed under the License is distributed on an
13 # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 # KIND, either express or implied. See the License for the
15 # specific language governing permissions and limitations
16 # under the License.
17
18 #
19 # Messaging and interprocess communication
20
21 add_custom_target(arrow_ipc)
22
23 function(ADD_ARROW_IPC_TEST REL_TEST_NAME)
24 set(options)
25 set(one_value_args PREFIX)
26 set(multi_value_args LABELS)
27 cmake_parse_arguments(ARG
28 "${options}"
29 "${one_value_args}"
30 "${multi_value_args}"
31 ${ARGN})
32
33 if(ARG_PREFIX)
34 set(PREFIX ${ARG_PREFIX})
35 else()
36 set(PREFIX "arrow-ipc")
37 endif()
38
39 add_arrow_test(${REL_TEST_NAME}
40 EXTRA_LINK_LIBS
41 ${ARROW_DATASET_TEST_LINK_LIBS}
42 PREFIX
43 ${PREFIX}
44 ${ARG_UNPARSED_ARGUMENTS})
45 endfunction()
46
47 add_arrow_test(feather_test)
48 add_arrow_ipc_test(json_simple_test)
49 add_arrow_ipc_test(read_write_test)
50 add_arrow_ipc_test(tensor_test)
51
52 # Headers: top level
53 arrow_install_all_headers("arrow/ipc")
54
55 if(ARROW_BUILD_STATIC)
56 set(ARROW_UTIL_LIB arrow_static)
57 else()
58 set(ARROW_UTIL_LIB arrow_shared)
59 endif()
60
61 if(ARROW_BUILD_UTILITIES OR ARROW_BUILD_INTEGRATION)
62 add_executable(arrow-file-to-stream file_to_stream.cc)
63 target_link_libraries(arrow-file-to-stream ${ARROW_UTIL_LIB})
64 add_executable(arrow-stream-to-file stream_to_file.cc)
65 target_link_libraries(arrow-stream-to-file ${ARROW_UTIL_LIB})
66
67 if(ARROW_BUILD_INTEGRATION)
68 add_dependencies(arrow-integration arrow-file-to-stream)
69 add_dependencies(arrow-integration arrow-stream-to-file)
70 endif()
71 endif()
72
73 add_arrow_benchmark(read_write_benchmark PREFIX "arrow-ipc")
74
75 if(ARROW_FUZZING)
76 add_executable(arrow-ipc-generate-fuzz-corpus generate_fuzz_corpus.cc)
77 target_link_libraries(arrow-ipc-generate-fuzz-corpus ${ARROW_UTIL_LIB}
78 ${ARROW_TEST_LINK_LIBS})
79
80 add_executable(arrow-ipc-generate-tensor-fuzz-corpus generate_tensor_fuzz_corpus.cc)
81 target_link_libraries(arrow-ipc-generate-tensor-fuzz-corpus ${ARROW_UTIL_LIB}
82 ${ARROW_TEST_LINK_LIBS})
83 endif()
84
85 add_arrow_fuzz_target(file_fuzz PREFIX "arrow-ipc")
86 add_arrow_fuzz_target(stream_fuzz PREFIX "arrow-ipc")
87 add_arrow_fuzz_target(tensor_stream_fuzz PREFIX "arrow-ipc")