2 # This file is open source software, licensed to you under the terms
3 # of the Apache License, Version 2.0 (the "License"). See the NOTICE file
4 # distributed with this work for additional information regarding copyright
5 # ownership. You may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
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
20 # Copyright (C) 2018 Scylladb, Ltd.
23 # Logical target for all demos.
24 add_custom_target (demos)
26 macro (seastar_add_demo name)
29 cmake_parse_arguments (
36 set (target demo_${name})
37 add_executable (${target} ${parsed_args_SOURCES})
39 target_include_directories (${target}
40 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
42 target_link_libraries (${target}
44 Boost::program_options
47 set_target_properties (${target}
49 OUTPUT_NAME ${name}_demo)
51 add_dependencies (demos ${target})
54 seastar_add_demo (block_discard
55 SOURCES block_discard_demo.cc)
57 if (${Seastar_API_LEVEL} GREATER_EQUAL 3)
58 seastar_add_demo (coroutines
59 SOURCES coroutines_demo.cc)
62 seastar_add_demo (echo
68 seastar_add_demo (line_count
69 SOURCES line_count_demo.cc)
77 seastar_add_demo (scheduling_group
78 SOURCES scheduling_group_demo.cc)
83 seastar_add_demo (tcp_sctp_client
84 SOURCES tcp_sctp_client_demo.cc)
86 seastar_add_demo (tcp_sctp_server
87 SOURCES tcp_sctp_server_demo.cc)
89 seastar_add_demo (tls_echo_server
92 tls_echo_server_demo.cc)
94 seastar_add_demo (tls_simple_client
97 tls_simple_client_demo.cc)
99 seastar_add_demo (udp_client
100 SOURCES udp_client_demo.cc)
102 seastar_add_demo (udp_server
103 SOURCES udp_server_demo.cc)
105 seastar_add_demo (udp_zero_copy
106 SOURCES udp_zero_copy_demo.cc)
108 seastar_add_demo (sharded_parameter
109 SOURCES sharded_parameter_demo.cc)
111 seastar_add_demo (file
112 SOURCES file_demo.cc)
114 seastar_add_demo (tutorial_examples
115 SOURCES tutorial_examples.cc)