[PATCH master v2 00/16] Restructure files and switch to CMake

449 views
Skip to first unread message

Jesse Haber-Kucharsky

<jhaberku@scylladb.com>
unread,
Aug 3, 2018, 6:15:21 PM8/3/18
to seastar-dev@googlegroups.com, Jesse Haber-Kucharsky
This change is a modernization of Seastar's build system to maximize its
ability to integrate easily into applications and into the C++
ecosystem.

These changes reflect the C++'s community's evolving and solidifying
understanding of how to work with CMake and structure libraries and also
my own evolving experience and understanding in the same.

With this structure and integration support, Seastar and Seastar-based
applications will be easier to package, deploy, and develop, and in a
variety of environments.

There are many internal changes, but none of these changes should impact
existing consumers of Seastar.

I have carefully structured this series so that each patch is incremental
and compile-able. This is to help with review and auditing. However,
to review this series the best first step is to start at the
"finished product" and evaluate and experiment with the new build.

Fixes #67.
Fixes #264.
Fixes #313.

Also available at https://github.com/hakuch/seastar.git on the jhk/better_cmake/v2 branch.

Changes since v1:

- Split changes into an auditable series
- Rebased against documentation-generation changes

Jesse Haber-Kucharsky (16):
build: Remove experimental CMake support
Increment release version for next release
Split private and public files
Switch text files to a Markdown extension
Use consistent naming scheme for directories
tests: Move interactive tests to `demo` directory
tests: Restructure `test` directory
tests: Rename test source files for consistency
demos: Rename demo source files for consistency
perf: Rename perf. test source files for consistency
docs: Move Doxygen files to `doc` directory
app: Rename response parser file for consistency
tests: Ensure test thread is always joined
docs: Use absolute paths for specifying templates
build: Replace build system with CMake
doc: Fix include paths in tutorial

.gitignore | 1 +
.gitmodules | 9 -
CMakeLists.txt | 1417 +++++------
HACKING.md | 138 ++
LICENSE => LICENSE.md | 0
NOTICE => NOTICE.md | 0
README.md | 19 +-
{apps => app}/CMakeLists.txt | 30 +-
{apps/io_tester => app/httpd}/CMakeLists.txt | 16 +-
{apps => app}/httpd/demo.json | 0
{apps => app}/httpd/main.cc | 12 +-
{apps/iotune => app/io_tester}/CMakeLists.txt | 8 +-
{apps => app}/io_tester/conf.yaml | 0
{apps => app}/io_tester/io_tester.cc | 20 +-
{apps/memcached => app/iotune}/CMakeLists.txt | 9 +-
{apps => app}/iotune/iotune.cc | 22 +-
{tests => app}/memcached/CMakeLists.txt | 36 +-
{apps => app}/memcached/ascii.rl | 4 +-
{apps => app}/memcached/memcache.cc | 30 +-
{apps => app}/memcached/memcached.hh | 2 +-
app/memcached/test/CMakeLists.txt | 56 +
.../memcached => app/memcached/test}/test.py | 0
.../memcached/test}/test_ascii_parser.cc | 10 +-
.../memcached/test}/test_memcached.py | 0
{apps => app}/seawreck/CMakeLists.txt | 3 +-
{apps => app}/seawreck/seawreck.cc | 16 +-
cmake-tests/asan_fiber.cc | 32 -
cmake-tests/have_membarrier.cc | 28 -
cmake-tests/sanitize_vptr.cc | 32 -
cmake-tests/visibility_flags.cc | 45 -
cmake-tools/dpdk_adjust_variables.py | 76 -
cmake-tools/dpdk_query_cflags.py | 58 -
cmake/FindBoost.cmake | 2098 +++++++++++++++++
cmake/FindCryptopp.cmake | 60 -
cmake/{FindLz4.cmake => FindGnuTLS.cmake} | 54 +-
.../FindLinuxMembarrier.cmake | 22 +-
cmake/FindProtobuf.cmake | 578 +++++
cmake/FindSanitizers.cmake | 78 +
cmake/FindStdFilesystem.cmake | 63 +
cmake/{FindLz4.cmake => Findc-ares.cmake} | 52 +-
cmake/{FindLz4.cmake => Findcryptopp.cmake} | 52 +-
cmake/Finddl.cmake | 62 +
cmake/Finddpdk.cmake | 405 ++++
cmake/{FindHWLoc.cmake => Findhwloc.cmake} | 50 +-
.../{FindLz4.cmake => Findlksctp-tools.cmake} | 51 +-
cmake/Findlz4.cmake | 72 +
cmake/{FindLz4.cmake => Findnumactl.cmake} | 51 +-
.../Findragel.cmake | 30 +-
cmake/Findrt.cmake | 60 +
...{FindYaml-cpp.cmake => Findyaml-cpp.cmake} | 50 +-
cmake/SeastarConfig.cmake.in | 64 +
cmake/code_test/LinuxMembarrier_test.cc | 8 +
cmake/code_test/Sanitizers_fiber_test.cc | 11 +
cmake/code_test/StdFilesystem_test.cc | 6 +
cmake/code_test/dl_test.cc | 7 +
cmake/code_test/rt_test.cc | 10 +
configure.py | 1079 ---------
cooking.sh | 552 +++++
demo/CMakeLists.txt | 101 +
.../block_discard_demo.cc | 8 +-
tests/echotest.cc => demo/echo_demo.cc | 8 +-
tests/ip_test.cc => demo/ip_demo.cc | 10 +-
tests/l3_test.cc => demo/l3_demo.cc | 6 +-
tests/linecount.cc => demo/line_count_demo.cc | 8 +-
tests/rpc.cc => demo/rpc_demo.cc | 10 +-
{tests => demo}/scheduling_group_demo.cc | 12 +-
tests/tcp_test.cc => demo/tcp_demo.cc | 6 +-
.../tcp_sctp_client_demo.cc | 6 +-
.../tcp_sctp_server_demo.cc | 8 +-
{tests => demo}/tls_echo_server.hh | 16 +-
.../tls_echo_server_demo.cc | 8 +-
.../tls_simple_client_demo.cc | 10 +-
.../udp_client.cc => demo/udp_client_demo.cc | 8 +-
.../udp_server.cc => demo/udp_server_demo.cc | 6 +-
.../udp_zero_copy_demo.cc | 12 +-
doc/CMakeLists.txt | 68 +
Doxyfile => doc/Doxyfile | 0
Doxyfile => doc/Doxyfile.cmake | 8 +-
DoxygenLayout.xml => doc/DoxygenLayout.xml | 0
doc/building-arch.md | 4 +-
doc/building-centos.md | 5 +-
doc/building-fedora.md | 7 +-
doc/building-ubuntu.md | 4 +-
doc/htmlsplit.py | 2 +-
doc/md2html | 4 +-
doc/md2pdf | 4 +-
doc/tutorial.md | 80 +-
{http => gen/http}/request_parser.rl | 4 +-
.../http/response_parser.rl | 2 +-
{json => gen}/json2code.py | 5 +-
{proto => gen/proto}/metrics2.proto | 0
http/CMakeLists.txt | 5 -
.../seastar/core}/abort_source.hh | 6 +-
{core => include/seastar/core}/alien.hh | 8 +-
{core => include/seastar/core}/align.hh | 0
.../seastar/core}/aligned_buffer.hh | 2 +-
.../seastar/core}/app-template.hh | 4 +-
{core => include/seastar/core}/apply.hh | 0
{core => include/seastar/core}/array_map.hh | 0
{core => include/seastar/core}/bitops.hh | 0
{core => include/seastar/core}/bitset-iter.hh | 0
{core => include/seastar/core}/byteorder.hh | 2 +-
{core => include/seastar/core}/cacheline.hh | 0
{core => include/seastar/core}/checked_ptr.hh | 2 +-
.../seastar/core}/chunked_fifo.hh | 0
.../seastar/core}/circular_buffer.hh | 4 +-
.../core}/circular_buffer_fixed_capacity.hh | 0
.../seastar/core}/condition-variable.hh | 4 +-
{core => include/seastar/core}/deleter.hh | 0
{core => include/seastar/core}/distributed.hh | 2 +-
{core => include/seastar/core}/do_with.hh | 4 +-
{core => include/seastar/core}/dpdk_rte.hh | 0
{core => include/seastar/core}/enum.hh | 0
.../seastar/core}/exception_hacks.hh | 0
.../seastar/core}/execution_stage.hh | 24 +-
.../seastar/core}/expiring_fifo.hh | 10 +-
{core => include/seastar/core}/fair_queue.hh | 12 +-
{core => include/seastar/core}/file.hh | 12 +-
{core => include/seastar/core}/fsqual.hh | 2 +-
{core => include/seastar/core}/fstream.hh | 6 +-
.../seastar/core}/function_traits.hh | 0
{core => include/seastar/core}/future-util.hh | 16 +-
{core => include/seastar/core}/future.hh | 14 +-
{core => include/seastar/core}/gate.hh | 2 +-
.../seastar/core}/iostream-impl.hh | 8 +-
{core => include/seastar/core}/iostream.hh | 6 +-
{core => include/seastar/core}/linux-aio.hh | 0
.../seastar/core}/lowres_clock.hh | 4 +-
.../seastar/core}/manual_clock.hh | 0
{core => include/seastar/core}/memory.hh | 4 +-
{core => include/seastar/core}/metrics.hh | 8 +-
{core => include/seastar/core}/metrics_api.hh | 4 +-
.../seastar/core}/metrics_registration.hh | 0
.../seastar/core}/metrics_types.hh | 0
{core => include/seastar/core}/pipe.hh | 4 +-
{core => include/seastar/core}/posix.hh | 4 +-
{core => include/seastar/core}/preempt.hh | 0
{core => include/seastar/core}/prefetch.hh | 4 +-
{core => include/seastar/core}/print.hh | 2 +-
{core => include/seastar/core}/prometheus.hh | 2 +-
{core => include/seastar/core}/queue.hh | 4 +-
{core => include/seastar/core}/ragel.hh | 8 +-
{core => include/seastar/core}/reactor.hh | 56 +-
.../seastar/core}/report_exception.hh | 0
{core => include/seastar/core}/resource.hh | 0
{core => include/seastar/core}/rwlock.hh | 2 +-
.../seastar/core}/scattered_message.hh | 8 +-
{core => include/seastar/core}/scheduling.hh | 2 +-
{core => include/seastar/core}/scollectd.hh | 16 +-
.../seastar/core}/scollectd_api.hh | 4 +-
{core => include/seastar/core}/seastar.hh | 4 +-
{core => include/seastar/core}/semaphore.hh | 8 +-
{core => include/seastar/core}/sharded.hh | 8 +-
.../seastar/core}/shared_future.hh | 4 +-
.../seastar/core}/shared_mutex.hh | 4 +-
{core => include/seastar/core}/shared_ptr.hh | 6 +-
.../seastar/core}/shared_ptr_debug_helper.hh | 0
.../seastar/core}/shared_ptr_incomplete.hh | 2 +-
.../seastar/core}/simple-stream.hh | 2 +-
{core => include/seastar/core}/slab.hh | 6 +-
{core => include/seastar/core}/sleep.hh | 12 +-
{core => include/seastar/core}/sstring.hh | 2 +-
.../seastar/core}/stall_sampler.hh | 4 +-
{core => include/seastar/core}/stream.hh | 2 +-
.../core}/systemwide_memory_barrier.hh | 0
{core => include/seastar/core}/task.hh | 2 +-
.../seastar/core}/temporary_buffer.hh | 4 +-
{core => include/seastar/core}/thread.hh | 14 +-
.../seastar/core}/thread_cputime_clock.hh | 0
{core => include/seastar/core}/thread_impl.hh | 2 +-
{core => include/seastar/core}/timer-set.hh | 2 +-
{core => include/seastar/core}/timer.hh | 4 +-
{core => include/seastar/core}/transfer.hh | 0
{core => include/seastar/core}/unaligned.hh | 0
{core => include/seastar/core}/units.hh | 0
.../seastar/core}/vector-data-sink.hh | 2 +-
{core => include/seastar/core}/vla.hh | 2 +-
{core => include/seastar/core}/weak_ptr.hh | 0
{http => include/seastar/http}/api_docs.hh | 10 +-
{http => include/seastar/http}/common.hh | 2 +-
{http => include/seastar/http}/exception.hh | 4 +-
.../seastar/http}/file_handler.hh | 4 +-
.../seastar/http}/function_handlers.hh | 4 +-
{http => include/seastar/http}/handlers.hh | 8 +-
{http => include/seastar/http}/httpd.hh | 22 +-
{http => include/seastar/http}/json_path.hh | 8 +-
{http => include/seastar/http}/matcher.hh | 4 +-
{http => include/seastar/http}/matchrules.hh | 8 +-
{http => include/seastar/http}/mime_types.hh | 2 +-
{http => include/seastar/http}/reply.hh | 10 +-
{http => include/seastar/http}/request.hh | 4 +-
{http => include/seastar/http}/routes.hh | 10 +-
.../seastar/http}/transformers.hh | 4 +-
{json => include/seastar/json}/formatter.hh | 4 +-
.../seastar/json}/json_elements.hh | 6 +-
{net => include/seastar/net}/api.hh | 14 +-
{net => include/seastar/net}/arp.hh | 10 +-
{net => include/seastar/net}/byteorder.hh | 2 +-
{net => include/seastar/net}/config.hh | 0
{net => include/seastar/net}/const.hh | 0
{net => include/seastar/net}/dhcp.hh | 4 +-
{net => include/seastar/net}/dns.hh | 8 +-
{net => include/seastar/net}/dpdk.hh | 6 +-
{net => include/seastar/net}/ethernet.hh | 4 +-
{net => include/seastar/net}/inet_address.hh | 4 +-
{net => include/seastar/net}/ip.hh | 22 +-
{net => include/seastar/net}/ip_checksum.hh | 2 +-
{net => include/seastar/net}/native-stack.hh | 2 +-
{net => include/seastar/net}/net.hh | 18 +-
.../seastar/net}/packet-data-source.hh | 4 +-
{net => include/seastar/net}/packet-util.hh | 2 +-
{net => include/seastar/net}/packet.hh | 6 +-
{net => include/seastar/net}/posix-stack.hh | 6 +-
{net => include/seastar/net}/proxy.hh | 4 +-
{net => include/seastar/net}/socket_defs.hh | 2 +-
{net => include/seastar/net}/stack.hh | 2 +-
{net => include/seastar/net}/tcp-stack.hh | 2 +-
{net => include/seastar/net}/tcp.hh | 22 +-
{net => include/seastar/net}/tls.hh | 8 +-
{net => include/seastar/net}/toeplitz.hh | 0
{net => include/seastar/net}/udp.hh | 10 +-
.../seastar/net}/virtio-interface.hh | 0
{net => include/seastar/net}/virtio.hh | 4 +-
.../seastar/rpc}/lz4_compressor.hh | 4 +-
.../rpc}/multi_algo_compressor_factory.hh | 4 +-
{rpc => include/seastar/rpc}/rpc.hh | 26 +-
{rpc => include/seastar/rpc}/rpc_impl.hh | 16 +-
{rpc => include/seastar/rpc}/rpc_types.hh | 10 +-
.../seastar/util}/alloc_failure_injector.hh | 2 +-
{util => include/seastar/util}/backtrace.hh | 4 +-
{util => include/seastar/util}/bool_class.hh | 0
{util => include/seastar/util}/conversions.hh | 0
{util => include/seastar/util}/defer.hh | 0
{util => include/seastar/util}/eclipse.hh | 0
.../seastar/util}/function_input_iterator.hh | 0
.../seastar/util}/gcc6-concepts.hh | 0
{util => include/seastar/util}/indirect.hh | 0
.../seastar/util}/is_smart_ptr.hh | 0
{util => include/seastar/util}/lazy.hh | 0
{util => include/seastar/util}/log-cli.hh | 6 +-
{util => include/seastar/util}/log.hh | 2 +-
.../seastar/util}/noncopyable_function.hh | 0
.../seastar/util}/optimized_optional.hh | 4 +-
{util => include/seastar/util}/print_safe.hh | 0
.../seastar/util}/program-options.hh | 2 +-
.../seastar/util}/reference_wrapper.hh | 0
{util => include/seastar/util}/spinlock.hh | 0
.../seastar/util}/transform_iterator.hh | 0
{util => include/seastar/util}/tuple_utils.hh | 0
.../seastar/util}/variant_utils.hh | 0
license/cmake.txt | 30 +
{licenses => license}/dpdk.txt | 0
{licenses => license}/freebsd.txt | 0
pkgconfig/seastar.pc.cmake | 46 +
proto/CMakeLists.txt | 7 -
recipe/dev.cmake | 275 +++
recipe/dpdk_config | 23 +
.../dpdk_configure.cmake | 30 +-
{scripts => script}/dpdk_nic_bind.py | 0
{scripts => script}/perftune.py | 0
{scripts => script}/perftune.yaml | 0
{scripts => script}/posix_net_conf.sh | 0
{scripts => script}/run_with_dpdk.sh | 0
{scripts => script}/seastar-addr2line | 0
{scripts => script}/seastar-cpu-map.sh | 0
{scripts => script}/tap.sh | 0
seastar_cmake.py | 39 -
{core => src/core}/alien.cc | 6 +-
{core => src/core}/app-template.cc | 14 +-
{core => src/core}/dpdk_rte.cc | 6 +-
{core => src/core}/exception_hacks.cc | 6 +-
{core => src/core}/execution_stage.cc | 4 +-
{core => src/core}/file-impl.hh | 4 +-
{core => src/core}/fsqual.cc | 8 +-
{core => src/core}/fstream.cc | 10 +-
{core => src/core}/future-util.cc | 4 +-
{core => src/core}/linux-aio.cc | 2 +-
{core => src/core}/memory.cc | 20 +-
{core => src/core}/metrics.cc | 4 +-
{core => src/core}/posix.cc | 4 +-
{core => src/core}/prometheus.cc | 12 +-
{core => src/core}/reactor.cc | 58 +-
{core => src/core}/resource.cc | 12 +-
{core => src/core}/scollectd-impl.hh | 6 +-
{core => src/core}/scollectd.cc | 11 +-
.../core}/systemwide_memory_barrier.cc | 6 +-
{core => src/core}/thread.cc | 4 +-
{http => src/http}/api_docs.cc | 14 +-
{http => src/http}/common.cc | 2 +-
{http => src/http}/file_handler.cc | 12 +-
{http => src/http}/httpd.cc | 20 +-
{http => src/http}/json_path.cc | 2 +-
{http => src/http}/matcher.cc | 2 +-
{http => src/http}/mime_types.cc | 2 +-
{http => src/http}/reply.cc | 6 +-
{http => src/http}/routes.cc | 8 +-
{http => src/http}/transformers.cc | 2 +-
{json => src/json}/formatter.cc | 4 +-
{json => src/json}/json_elements.cc | 2 +-
{net => src/net}/arp.cc | 2 +-
{net => src/net}/config.cc | 4 +-
{net => src/net}/dhcp.cc | 8 +-
{net => src/net}/dns.cc | 20 +-
{net => src/net}/dpdk.cc | 34 +-
{net => src/net}/ethernet.cc | 2 +-
{net => src/net}/inet_address.cc | 8 +-
{net => src/net}/ip.cc | 12 +-
{net => src/net}/ip_checksum.cc | 4 +-
{net => src/net}/native-stack-impl.hh | 4 +-
{net => src/net}/native-stack.cc | 24 +-
{net => src/net}/net.cc | 8 +-
{net => src/net}/packet.cc | 4 +-
{net => src/net}/posix-stack.cc | 8 +-
{net => src/net}/proxy.cc | 4 +-
{net => src/net}/stack.cc | 4 +-
{net => src/net}/tcp.cc | 12 +-
{net => src/net}/tls.cc | 14 +-
{net => src/net}/udp.cc | 4 +-
{net => src/net}/virtio.cc | 30 +-
{rpc => src/rpc}/lz4_compressor.cc | 4 +-
{rpc => src/rpc}/rpc.cc | 2 +-
{util => src/util}/alloc_failure_injector.cc | 8 +-
{util => src/util}/backtrace.cc | 4 +-
{util => src/util}/conversions.cc | 4 +-
{util => src/util}/log.cc | 10 +-
{util => src/util}/program-options.cc | 2 +-
test.py | 232 --
.../CMakeLists.txt | 31 +-
test/dist/CMakeLists.txt | 54 +
.../dist/consumer/CMakeLists.txt | 20 +-
.../dist/consumer/Makefile | 15 +-
test/dist/consumer/cmake_consumer.cc | 15 +
test/dist/consumer/pkgconfig_consumer.cc | 15 +
test/dist/consumer/recipe/test_dist.cmake | 11 +
.../dist/consumer_test.sh | 33 +-
{tests => test}/exchanger.hh | 0
test/perf/CMakeLists.txt | 77 +
.../perf/fstream_perf.cc | 8 +-
.../perf/future_util_perf.cc | 0
{tests => test}/perf/perf-tests.md | 0
{tests => test}/perf/perf_tests.cc | 4 +-
{tests => test}/perf/perf_tests.hh | 4 +-
{tests => test}/test-utils.cc | 10 +-
{tests => test}/test-utils.hh | 2 +-
{tests => test}/test_runner.cc | 19 +-
{tests => test}/test_runner.hh | 5 +-
test/unit/CMakeLists.txt | 260 ++
{tests => test/unit}/abort_source_test.cc | 8 +-
{tests => test/unit}/alien_test.cc | 8 +-
{tests => test/unit}/alloc_test.cc | 6 +-
{tests => test/unit}/allocator_test.cc | 4 +-
{tests => test/unit}/catest.key | 0
{tests => test/unit}/catest.pem | 0
{tests => test/unit}/checked_ptr_test.cc | 4 +-
{tests => test/unit}/chunked_fifo_test.cc | 4 +-
.../circular_buffer_fixed_capacity_test.cc | 2 +-
{tests => test/unit}/circular_buffer_test.cc | 2 +-
{tests => test/unit}/connect_test.cc | 4 +-
{tests => test/unit}/defer_test.cc | 2 +-
{tests => test/unit}/directory_test.cc | 8 +-
{tests => test/unit}/distributed_test.cc | 10 +-
{tests => test/unit}/dns_test.cc | 14 +-
{tests => test/unit}/execution_stage_test.cc | 6 +-
{tests => test/unit}/expiring_fifo_test.cc | 6 +-
{tests => test/unit}/fair_queue_test.cc | 16 +-
.../unit/file_io_test.cc | 14 +-
{tests => test/unit}/foreign_ptr_test.cc | 10 +-
{tests => test/unit}/fstream_test.cc | 16 +-
{tests => test/unit}/futures_test.cc | 16 +-
tests/httpd.cc => test/unit/httpd_test.cc | 26 +-
{tests => test/unit}/json_formatter_test.cc | 12 +-
{tests => test/unit}/loopback_socket.hh | 18 +-
{tests => test/unit}/lowres_clock_test.cc | 6 +-
{tests => test/unit}/mkcert.gmk | 0
{tests => test/unit}/mock_file.hh | 2 +-
.../unit/net_config_test.cc | 2 +-
.../unit}/noncopyable_function_test.cc | 2 +-
{tests => test/unit}/output_stream_test.cc | 14 +-
{tests => test/unit}/packet_test.cc | 2 +-
{tests => test/unit}/program_options_test.cc | 2 +-
{tests => test/unit}/queue_test.cc | 6 +-
{tests => test/unit}/rpc_test.cc | 12 +-
{tests => test/unit}/semaphore_test.cc | 18 +-
{tests => test/unit}/shared_ptr_test.cc | 4 +-
{tests => test/unit}/slab_test.cc | 2 +-
{tests => test/unit}/smp_test.cc | 6 +-
{tests => test/unit}/sstring_test.cc | 2 +-
{tests => test/unit}/test.crl | 0
{tests => test/unit}/test.crt | 0
{tests => test/unit}/test.csr | 0
{tests => test/unit}/test.key | 0
.../unit/thread_context_switch_test.cc | 12 +-
{tests => test/unit}/thread_test.cc | 16 +-
tests/timertest.cc => test/unit/timer_test.cc | 6 +-
{tests => test/unit}/tls-ca-bundle.pem | 0
{tests => test/unit}/tls_test.cc | 50 +-
{tests => test/unit}/tuple_utils_test.cc | 2 +-
{tests => test/unit}/unwind_test.cc | 6 +-
{tests => test/unit}/weak_ptr_test.cc | 2 +-
tests/CMakeLists.txt | 311 ---
tests/perf/CMakeLists.txt | 28 -
401 files changed, 7267 insertions(+), 4191 deletions(-)
create mode 100644 HACKING.md
rename LICENSE => LICENSE.md (100%)
rename NOTICE => NOTICE.md (100%)
rename {apps => app}/CMakeLists.txt (66%)
rename {apps/io_tester => app/httpd}/CMakeLists.txt (68%)
rename {apps => app}/httpd/demo.json (100%)
rename {apps => app}/httpd/main.cc (93%)
rename {apps/iotune => app/io_tester}/CMakeLists.txt (86%)
rename {apps => app}/io_tester/conf.yaml (100%)
rename {apps => app}/io_tester/io_tester.cc (98%)
rename {apps/memcached => app/iotune}/CMakeLists.txt (84%)
rename {apps => app}/iotune/iotune.cc (98%)
copy {tests => app}/memcached/CMakeLists.txt (58%)
rename {apps => app}/memcached/ascii.rl (98%)
rename {apps => app}/memcached/memcache.cc (99%)
rename {apps => app}/memcached/memcached.hh (98%)
create mode 100644 app/memcached/test/CMakeLists.txt
rename {tests/memcached => app/memcached/test}/test.py (100%)
rename {tests/memcached => app/memcached/test}/test_ascii_parser.cc (98%)
rename {tests/memcached => app/memcached/test}/test_memcached.py (100%)
rename {apps => app}/seawreck/CMakeLists.txt (93%)
rename {apps => app}/seawreck/seawreck.cc (96%)
delete mode 100644 cmake-tests/asan_fiber.cc
delete mode 100644 cmake-tests/have_membarrier.cc
delete mode 100644 cmake-tests/sanitize_vptr.cc
delete mode 100644 cmake-tests/visibility_flags.cc
delete mode 100755 cmake-tools/dpdk_adjust_variables.py
delete mode 100755 cmake-tools/dpdk_query_cflags.py
create mode 100644 cmake/FindBoost.cmake
delete mode 100644 cmake/FindCryptopp.cmake
copy cmake/{FindLz4.cmake => FindGnuTLS.cmake} (50%)
copy cmake-tools/query_link_pool_depth.py => cmake/FindLinuxMembarrier.cmake (55%)
mode change 100755 => 100644
create mode 100644 cmake/FindProtobuf.cmake
create mode 100644 cmake/FindSanitizers.cmake
create mode 100644 cmake/FindStdFilesystem.cmake
copy cmake/{FindLz4.cmake => Findc-ares.cmake} (51%)
copy cmake/{FindLz4.cmake => Findcryptopp.cmake} (51%)
create mode 100644 cmake/Finddl.cmake
create mode 100644 cmake/Finddpdk.cmake
rename cmake/{FindHWLoc.cmake => Findhwloc.cmake} (53%)
copy cmake/{FindLz4.cmake => Findlksctp-tools.cmake} (50%)
create mode 100644 cmake/Findlz4.cmake
rename cmake/{FindLz4.cmake => Findnumactl.cmake} (51%)
copy cmake-tools/query_link_pool_depth.py => cmake/Findragel.cmake (56%)
mode change 100755 => 100644
create mode 100644 cmake/Findrt.cmake
rename cmake/{FindYaml-cpp.cmake => Findyaml-cpp.cmake} (50%)
create mode 100644 cmake/SeastarConfig.cmake.in
create mode 100644 cmake/code_test/LinuxMembarrier_test.cc
create mode 100644 cmake/code_test/Sanitizers_fiber_test.cc
create mode 100644 cmake/code_test/StdFilesystem_test.cc
create mode 100644 cmake/code_test/dl_test.cc
create mode 100644 cmake/code_test/rt_test.cc
delete mode 100755 configure.py
create mode 100755 cooking.sh
create mode 100644 demo/CMakeLists.txt
rename tests/blkdiscard_test.cc => demo/block_discard_demo.cc (93%)
rename tests/echotest.cc => demo/echo_demo.cc (96%)
rename tests/ip_test.cc => demo/ip_demo.cc (89%)
rename tests/l3_test.cc => demo/l3_demo.cc (94%)
rename tests/linecount.cc => demo/line_count_demo.cc (94%)
rename tests/rpc.cc => demo/rpc_demo.cc (98%)
rename {tests => demo}/scheduling_group_demo.cc (96%)
rename tests/tcp_test.cc => demo/tcp_demo.cc (95%)
rename tests/tcp_sctp_client.cc => demo/tcp_sctp_client_demo.cc (98%)
rename tests/tcp_sctp_server.cc => demo/tcp_sctp_server_demo.cc (97%)
rename {tests => demo}/tls_echo_server.hh (94%)
rename tests/tls_echo_server.cc => demo/tls_echo_server_demo.cc (95%)
rename tests/tls_simple_client.cc => demo/tls_simple_client_demo.cc (97%)
rename tests/udp_client.cc => demo/udp_client_demo.cc (94%)
rename tests/udp_server.cc => demo/udp_server_demo.cc (95%)
rename tests/udp_zero_copy.cc => demo/udp_zero_copy_demo.cc (95%)
create mode 100644 doc/CMakeLists.txt
copy Doxyfile => doc/Doxyfile (100%)
rename Doxyfile => doc/Doxyfile.cmake (99%)
rename DoxygenLayout.xml => doc/DoxygenLayout.xml (100%)
rename {http => gen/http}/request_parser.rl (97%)
rename http/http_response_parser.rl => gen/http/response_parser.rl (98%)
rename {json => gen}/json2code.py (99%)
rename {proto => gen/proto}/metrics2.proto (100%)
delete mode 100644 http/CMakeLists.txt
rename {core => include/seastar/core}/abort_source.hh (98%)
rename {core => include/seastar/core}/alien.hh (97%)
rename {core => include/seastar/core}/align.hh (100%)
rename {core => include/seastar/core}/aligned_buffer.hh (97%)
rename {core => include/seastar/core}/app-template.hh (97%)
rename {core => include/seastar/core}/apply.hh (100%)
rename {core => include/seastar/core}/array_map.hh (100%)
rename {core => include/seastar/core}/bitops.hh (100%)
rename {core => include/seastar/core}/bitset-iter.hh (100%)
rename {core => include/seastar/core}/byteorder.hh (99%)
rename {core => include/seastar/core}/cacheline.hh (100%)
rename {core => include/seastar/core}/checked_ptr.hh (99%)
rename {core => include/seastar/core}/chunked_fifo.hh (100%)
rename {core => include/seastar/core}/circular_buffer.hh (99%)
rename {core => include/seastar/core}/circular_buffer_fixed_capacity.hh (100%)
rename {core => include/seastar/core}/condition-variable.hh (98%)
rename {core => include/seastar/core}/deleter.hh (100%)
rename {core => include/seastar/core}/distributed.hh (96%)
rename {core => include/seastar/core}/do_with.hh (98%)
rename {core => include/seastar/core}/dpdk_rte.hh (100%)
rename {core => include/seastar/core}/enum.hh (100%)
rename {core => include/seastar/core}/exception_hacks.hh (100%)
rename {core => include/seastar/core}/execution_stage.hh (97%)
rename {core => include/seastar/core}/expiring_fifo.hh (96%)
rename {core => include/seastar/core}/fair_queue.hh (97%)
rename {core => include/seastar/core}/file.hh (98%)
rename {core => include/seastar/core}/fsqual.hh (96%)
rename {core => include/seastar/core}/fstream.hh (97%)
rename {core => include/seastar/core}/function_traits.hh (100%)
rename {core => include/seastar/core}/future-util.hh (99%)
rename {core => include/seastar/core}/future.hh (99%)
rename {core => include/seastar/core}/gate.hh (99%)
rename {core => include/seastar/core}/iostream-impl.hh (99%)
rename {core => include/seastar/core}/iostream.hh (99%)
rename {core => include/seastar/core}/linux-aio.hh (100%)
rename {core => include/seastar/core}/lowres_clock.hh (98%)
rename {core => include/seastar/core}/manual_clock.hh (100%)
rename {core => include/seastar/core}/memory.hh (99%)
rename {core => include/seastar/core}/metrics.hh (99%)
rename {core => include/seastar/core}/metrics_api.hh (99%)
rename {core => include/seastar/core}/metrics_registration.hh (100%)
rename {core => include/seastar/core}/metrics_types.hh (100%)
rename {core => include/seastar/core}/pipe.hh (99%)
rename {core => include/seastar/core}/posix.hh (99%)
rename {core => include/seastar/core}/preempt.hh (100%)
rename {core => include/seastar/core}/prefetch.hh (98%)
rename {core => include/seastar/core}/print.hh (99%)
rename {core => include/seastar/core}/prometheus.hh (97%)
rename {core => include/seastar/core}/queue.hh (98%)
rename {core => include/seastar/core}/ragel.hh (96%)
rename {core => include/seastar/core}/reactor.hh (98%)
rename {core => include/seastar/core}/report_exception.hh (100%)
rename {core => include/seastar/core}/resource.hh (100%)
rename {core => include/seastar/core}/rwlock.hh (99%)
rename {core => include/seastar/core}/scattered_message.hh (95%)
rename {core => include/seastar/core}/scheduling.hh (99%)
rename {core => include/seastar/core}/scollectd.hh (99%)
rename {core => include/seastar/core}/scollectd_api.hh (90%)
rename {core => include/seastar/core}/seastar.hh (99%)
rename {core => include/seastar/core}/semaphore.hh (99%)
rename {core => include/seastar/core}/sharded.hh (99%)
rename {core => include/seastar/core}/shared_future.hh (99%)
rename {core => include/seastar/core}/shared_mutex.hh (98%)
rename {core => include/seastar/core}/shared_ptr.hh (99%)
rename {core => include/seastar/core}/shared_ptr_debug_helper.hh (100%)
rename {core => include/seastar/core}/shared_ptr_incomplete.hh (96%)
rename {core => include/seastar/core}/simple-stream.hh (99%)
rename {core => include/seastar/core}/slab.hh (99%)
rename {core => include/seastar/core}/sleep.hh (94%)
rename {core => include/seastar/core}/sstring.hh (99%)
rename {core => include/seastar/core}/stall_sampler.hh (94%)
rename {core => include/seastar/core}/stream.hh (99%)
rename {core => include/seastar/core}/systemwide_memory_barrier.hh (100%)
rename {core => include/seastar/core}/task.hh (98%)
rename {core => include/seastar/core}/temporary_buffer.hh (99%)
rename {core => include/seastar/core}/thread.hh (98%)
rename {core => include/seastar/core}/thread_cputime_clock.hh (100%)
rename {core => include/seastar/core}/thread_impl.hh (98%)
rename {core => include/seastar/core}/timer-set.hh (99%)
rename {core => include/seastar/core}/timer.hh (97%)
rename {core => include/seastar/core}/transfer.hh (100%)
rename {core => include/seastar/core}/unaligned.hh (100%)
rename {core => include/seastar/core}/units.hh (100%)
rename {core => include/seastar/core}/vector-data-sink.hh (97%)
rename {core => include/seastar/core}/vla.hh (97%)
rename {core => include/seastar/core}/weak_ptr.hh (100%)
rename {http => include/seastar/http}/api_docs.hh (97%)
rename {http => include/seastar/http}/common.hh (97%)
rename {http => include/seastar/http}/exception.hh (97%)
rename {http => include/seastar/http}/file_handler.hh (98%)
rename {http => include/seastar/http}/function_handlers.hh (98%)
rename {http => include/seastar/http}/handlers.hh (92%)
rename {http => include/seastar/http}/httpd.hh (96%)
rename {http => include/seastar/http}/json_path.hh (97%)
rename {http => include/seastar/http}/matcher.hh (97%)
rename {http => include/seastar/http}/matchrules.hh (95%)
rename {http => include/seastar/http}/mime_types.hh (94%)
rename {http => include/seastar/http}/reply.hh (96%)
rename {http => include/seastar/http}/request.hh (97%)
rename {http => include/seastar/http}/routes.hh (97%)
rename {http => include/seastar/http}/transformers.hh (95%)
rename {json => include/seastar/json}/formatter.hh (99%)
rename {json => include/seastar/json}/json_elements.hh (98%)
rename {net => include/seastar/net}/api.hh (97%)
rename {net => include/seastar/net}/arp.hh (98%)
rename {net => include/seastar/net}/byteorder.hh (98%)
rename {net => include/seastar/net}/config.hh (100%)
rename {net => include/seastar/net}/const.hh (100%)
rename {net => include/seastar/net}/dhcp.hh (97%)
rename {net => include/seastar/net}/dns.hh (95%)
rename {net => include/seastar/net}/dpdk.hh (94%)
rename {net => include/seastar/net}/ethernet.hh (97%)
rename {net => include/seastar/net}/inet_address.hh (97%)
rename {net => include/seastar/net}/ip.hh (97%)
rename {net => include/seastar/net}/ip_checksum.hh (98%)
rename {net => include/seastar/net}/native-stack.hh (97%)
rename {net => include/seastar/net}/net.hh (96%)
rename {net => include/seastar/net}/packet-data-source.hh (95%)
rename {net => include/seastar/net}/packet-util.hh (99%)
rename {net => include/seastar/net}/packet.hh (99%)
rename {net => include/seastar/net}/posix-stack.hh (98%)
rename {net => include/seastar/net}/proxy.hh (93%)
rename {net => include/seastar/net}/socket_defs.hh (98%)
rename {net => include/seastar/net}/stack.hh (98%)
rename {net => include/seastar/net}/tcp-stack.hh (97%)
rename {net => include/seastar/net}/tcp.hh (99%)
rename {net => include/seastar/net}/tls.hh (98%)
rename {net => include/seastar/net}/toeplitz.hh (100%)
rename {net => include/seastar/net}/udp.hh (90%)
rename {net => include/seastar/net}/virtio-interface.hh (100%)
rename {net => include/seastar/net}/virtio.hh (94%)
rename {rpc => include/seastar/rpc}/lz4_compressor.hh (95%)
rename {rpc => include/seastar/rpc}/multi_algo_compressor_factory.hh (97%)
rename {rpc => include/seastar/rpc}/rpc.hh (98%)
rename {rpc => include/seastar/rpc}/rpc_impl.hh (98%)
rename {rpc => include/seastar/rpc}/rpc_types.hh (98%)
rename {util => include/seastar/util}/alloc_failure_injector.hh (98%)
rename {util => include/seastar/util}/backtrace.hh (98%)
rename {util => include/seastar/util}/bool_class.hh (100%)
rename {util => include/seastar/util}/conversions.hh (100%)
rename {util => include/seastar/util}/defer.hh (100%)
rename {util => include/seastar/util}/eclipse.hh (100%)
rename {util => include/seastar/util}/function_input_iterator.hh (100%)
rename {util => include/seastar/util}/gcc6-concepts.hh (100%)
rename {util => include/seastar/util}/indirect.hh (100%)
rename {util => include/seastar/util}/is_smart_ptr.hh (100%)
rename {util => include/seastar/util}/lazy.hh (100%)
rename {util => include/seastar/util}/log-cli.hh (95%)
rename {util => include/seastar/util}/log.hh (99%)
rename {util => include/seastar/util}/noncopyable_function.hh (100%)
rename {util => include/seastar/util}/optimized_optional.hh (98%)
rename {util => include/seastar/util}/print_safe.hh (100%)
rename {util => include/seastar/util}/program-options.hh (98%)
rename {util => include/seastar/util}/reference_wrapper.hh (100%)
rename {util => include/seastar/util}/spinlock.hh (100%)
rename {util => include/seastar/util}/transform_iterator.hh (100%)
rename {util => include/seastar/util}/tuple_utils.hh (100%)
rename {util => include/seastar/util}/variant_utils.hh (100%)
create mode 100644 license/cmake.txt
rename {licenses => license}/dpdk.txt (100%)
rename {licenses => license}/freebsd.txt (100%)
create mode 100644 pkgconfig/seastar.pc.cmake
delete mode 100644 proto/CMakeLists.txt
create mode 100644 recipe/dev.cmake
create mode 100644 recipe/dpdk_config
rename tests/memcached/CMakeLists.txt => recipe/dpdk_configure.cmake (59%)
rename {scripts => script}/dpdk_nic_bind.py (100%)
rename {scripts => script}/perftune.py (100%)
rename {scripts => script}/perftune.yaml (100%)
rename {scripts => script}/posix_net_conf.sh (100%)
rename {scripts => script}/run_with_dpdk.sh (100%)
rename {scripts => script}/seastar-addr2line (100%)
rename {scripts => script}/seastar-cpu-map.sh (100%)
rename {scripts => script}/tap.sh (100%)
delete mode 100644 seastar_cmake.py
rename {core => src/core}/alien.cc (97%)
rename {core => src/core}/app-template.cc (95%)
rename {core => src/core}/dpdk_rte.cc (96%)
rename {core => src/core}/exception_hacks.cc (97%)
rename {core => src/core}/execution_stage.cc (98%)
rename {core => src/core}/file-impl.hh (99%)
rename {core => src/core}/fsqual.cc (95%)
rename {core => src/core}/fstream.cc (99%)
rename {core => src/core}/future-util.cc (98%)
rename {core => src/core}/linux-aio.cc (99%)
rename {core => src/core}/memory.cc (99%)
rename {core => src/core}/metrics.cc (99%)
rename {core => src/core}/posix.cc (98%)
rename {core => src/core}/prometheus.cc (99%)
rename {core => src/core}/reactor.cc (99%)
rename {core => src/core}/resource.cc (98%)
rename {core => src/core}/scollectd-impl.hh (95%)
rename {core => src/core}/scollectd.cc (99%)
rename {core => src/core}/systemwide_memory_barrier.cc (96%)
rename {core => src/core}/thread.cc (99%)
rename {http => src/http}/api_docs.cc (89%)
rename {http => src/http}/common.cc (96%)
rename {http => src/http}/file_handler.cc (95%)
rename {http => src/http}/httpd.cc (95%)
rename {http => src/http}/json_path.cc (98%)
rename {http => src/http}/matcher.cc (98%)
rename {http => src/http}/mime_types.cc (96%)
rename {http => src/http}/reply.cc (98%)
rename {http => src/http}/routes.cc (97%)
rename {http => src/http}/transformers.cc (99%)
rename {json => src/json}/formatter.cc (96%)
rename {json => src/json}/json_elements.cc (99%)
rename {net => src/net}/arp.cc (98%)
rename {net => src/net}/config.cc (98%)
rename {net => src/net}/dhcp.cc (99%)
rename {net => src/net}/dns.cc (99%)
rename {net => src/net}/dpdk.cc (99%)
rename {net => src/net}/ethernet.cc (97%)
rename {net => src/net}/inet_address.cc (96%)
rename {net => src/net}/ip.cc (98%)
rename {net => src/net}/ip_checksum.cc (96%)
rename {net => src/net}/native-stack-impl.hh (99%)
rename {net => src/net}/native-stack.cc (96%)
rename {net => src/net}/net.cc (98%)
rename {net => src/net}/packet.cc (98%)
rename {net => src/net}/posix-stack.cc (99%)
rename {net => src/net}/proxy.cc (97%)
rename {net => src/net}/stack.cc (98%)
rename {net => src/net}/tcp.cc (96%)
rename {net => src/net}/tls.cc (99%)
rename {net => src/net}/udp.cc (99%)
rename {net => src/net}/virtio.cc (98%)
rename {rpc => src/rpc}/lz4_compressor.cc (97%)
rename {rpc => src/rpc}/rpc.cc (99%)
rename {util => src/util}/alloc_failure_injector.cc (90%)
rename {util => src/util}/backtrace.cc (97%)
rename {util => src/util}/conversions.cc (95%)
rename {util => src/util}/log.cc (98%)
rename {util => src/util}/program-options.cc (98%)
delete mode 100755 test.py
copy cmake-tools/query_link_pool_depth.py => test/CMakeLists.txt (63%)
mode change 100755 => 100644
create mode 100644 test/dist/CMakeLists.txt
copy cmake-tools/query_link_pool_depth.py => test/dist/consumer/CMakeLists.txt (70%)
mode change 100755 => 100644
rename apps/httpd/CMakeLists.txt => test/dist/consumer/Makefile (75%)
create mode 100644 test/dist/consumer/cmake_consumer.cc
create mode 100644 test/dist/consumer/pkgconfig_consumer.cc
create mode 100644 test/dist/consumer/recipe/test_dist.cmake
rename cmake-tools/query_link_pool_depth.py => test/dist/consumer_test.sh (57%)
rename {tests => test}/exchanger.hh (100%)
create mode 100644 test/perf/CMakeLists.txt
rename tests/perf/perf_fstream.cc => test/perf/fstream_perf.cc (96%)
rename tests/perf/perf_future_util.cc => test/perf/future_util_perf.cc (100%)
rename {tests => test}/perf/perf-tests.md (100%)
rename {tests => test}/perf/perf_tests.cc (99%)
rename {tests => test}/perf/perf_tests.hh (98%)
rename {tests => test}/test-utils.cc (90%)
rename {tests => test}/test-utils.hh (98%)
rename {tests => test}/test_runner.cc (93%)
rename {tests => test}/test_runner.hh (93%)
create mode 100644 test/unit/CMakeLists.txt
rename {tests => test/unit}/abort_source_test.cc (96%)
rename {tests => test/unit}/alien_test.cc (96%)
rename {tests => test/unit}/alloc_test.cc (95%)
rename {tests => test/unit}/allocator_test.cc (99%)
rename {tests => test/unit}/catest.key (100%)
rename {tests => test/unit}/catest.pem (100%)
rename {tests => test/unit}/checked_ptr_test.cc (97%)
rename {tests => test/unit}/chunked_fifo_test.cc (99%)
rename {tests => test/unit}/circular_buffer_fixed_capacity_test.cc (98%)
rename {tests => test/unit}/circular_buffer_test.cc (98%)
rename {tests => test/unit}/connect_test.cc (97%)
rename {tests => test/unit}/defer_test.cc (98%)
rename {tests => test/unit}/directory_test.cc (91%)
rename {tests => test/unit}/distributed_test.cc (96%)
rename {tests => test/unit}/dns_test.cc (92%)
rename {tests => test/unit}/execution_stage_test.cc (98%)
rename {tests => test/unit}/expiring_fifo_test.cc (97%)
rename {tests => test/unit}/fair_queue_test.cc (97%)
rename tests/fileiotest.cc => test/unit/file_io_test.cc (95%)
rename {tests => test/unit}/foreign_ptr_test.cc (94%)
rename {tests => test/unit}/fstream_test.cc (98%)
rename {tests => test/unit}/futures_test.cc (99%)
rename tests/httpd.cc => test/unit/httpd_test.cc (98%)
rename {tests => test/unit}/json_formatter_test.cc (89%)
rename {tests => test/unit}/loopback_socket.hh (96%)
rename {tests => test/unit}/lowres_clock_test.cc (97%)
rename {tests => test/unit}/mkcert.gmk (100%)
rename {tests => test/unit}/mock_file.hh (99%)
rename tests/netconfig_test.cc => test/unit/net_config_test.cc (99%)
rename {tests => test/unit}/noncopyable_function_test.cc (98%)
rename {tests => test/unit}/output_stream_test.cc (95%)
rename {tests => test/unit}/packet_test.cc (99%)
rename {tests => test/unit}/program_options_test.cc (97%)
rename {tests => test/unit}/queue_test.cc (95%)
rename {tests => test/unit}/rpc_test.cc (98%)
rename {tests => test/unit}/semaphore_test.cc (95%)
rename {tests => test/unit}/shared_ptr_test.cc (98%)
rename {tests => test/unit}/slab_test.cc (99%)
rename {tests => test/unit}/smp_test.cc (95%)
rename {tests => test/unit}/sstring_test.cc (99%)
rename {tests => test/unit}/test.crl (100%)
rename {tests => test/unit}/test.crt (100%)
rename {tests => test/unit}/test.csr (100%)
rename {tests => test/unit}/test.key (100%)
rename tests/thread_context_switch.cc => test/unit/thread_context_switch_test.cc (92%)
rename {tests => test/unit}/thread_test.cc (94%)
rename tests/timertest.cc => test/unit/timer_test.cc (96%)
rename {tests => test/unit}/tls-ca-bundle.pem (100%)
rename {tests => test/unit}/tls_test.cc (91%)
rename {tests => test/unit}/tuple_utils_test.cc (98%)
rename {tests => test/unit}/unwind_test.cc (94%)
rename {tests => test/unit}/weak_ptr_test.cc (99%)
delete mode 100644 tests/CMakeLists.txt
delete mode 100644 tests/perf/CMakeLists.txt

--
2.17.1

Jesse Haber-Kucharsky

<jhaberku@scylladb.com>
unread,
Aug 3, 2018, 6:15:22 PM8/3/18
to seastar-dev@googlegroups.com, Jesse Haber-Kucharsky
We are older and wiser now. Better to start with a clean slate.

Signed-off-by: Jesse Haber-Kucharsky <jhab...@scylladb.com>
---
CMakeLists.txt | 992 ---------------------------
apps/CMakeLists.txt | 36 -
apps/httpd/CMakeLists.txt | 24 -
apps/io_tester/CMakeLists.txt | 24 -
apps/iotune/CMakeLists.txt | 27 -
apps/memcached/CMakeLists.txt | 24 -
apps/seawreck/CMakeLists.txt | 23 -
cmake-tests/asan_fiber.cc | 32 -
cmake-tests/have_membarrier.cc | 28 -
cmake-tests/sanitize_vptr.cc | 32 -
cmake-tests/visibility_flags.cc | 45 --
cmake-tools/dpdk_adjust_variables.py | 76 --
cmake-tools/dpdk_query_cflags.py | 58 --
cmake-tools/query_link_pool_depth.py | 34 -
cmake/FindCryptopp.cmake | 60 --
cmake/FindHWLoc.cmake | 59 --
cmake/FindLz4.cmake | 59 --
cmake/FindYaml-cpp.cmake | 59 --
configure.py | 46 --
http/CMakeLists.txt | 5 -
proto/CMakeLists.txt | 7 -
seastar_cmake.py | 39 --
test.py | 38 -
tests/CMakeLists.txt | 311 ---------
tests/memcached/CMakeLists.txt | 40 --
tests/perf/CMakeLists.txt | 28 -
26 files changed, 2206 deletions(-)
delete mode 100644 CMakeLists.txt
delete mode 100644 apps/CMakeLists.txt
delete mode 100644 apps/httpd/CMakeLists.txt
delete mode 100644 apps/io_tester/CMakeLists.txt
delete mode 100644 apps/iotune/CMakeLists.txt
delete mode 100644 apps/memcached/CMakeLists.txt
delete mode 100644 apps/seawreck/CMakeLists.txt
delete mode 100644 cmake-tests/asan_fiber.cc
delete mode 100644 cmake-tests/have_membarrier.cc
delete mode 100644 cmake-tests/sanitize_vptr.cc
delete mode 100644 cmake-tests/visibility_flags.cc
delete mode 100755 cmake-tools/dpdk_adjust_variables.py
delete mode 100755 cmake-tools/dpdk_query_cflags.py
delete mode 100755 cmake-tools/query_link_pool_depth.py
delete mode 100644 cmake/FindCryptopp.cmake
delete mode 100644 cmake/FindHWLoc.cmake
delete mode 100644 cmake/FindLz4.cmake
delete mode 100644 cmake/FindYaml-cpp.cmake
delete mode 100644 http/CMakeLists.txt
delete mode 100644 proto/CMakeLists.txt
delete mode 100644 seastar_cmake.py
delete mode 100644 tests/CMakeLists.txt
delete mode 100644 tests/memcached/CMakeLists.txt
delete mode 100644 tests/perf/CMakeLists.txt

diff --git a/CMakeLists.txt b/CMakeLists.txt
deleted file mode 100644
index 05297b75..00000000
--- a/CMakeLists.txt
+++ /dev/null
@@ -1,992 +0,0 @@
-#
-# This file is open source software, licensed to you under the terms
-# of the Apache License, Version 2.0 (the "License"). See the NOTICE file
-# distributed with this work for additional information regarding copyright
-# ownership. You may not use this file except in compliance with the License.
-#
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-#
-# Copyright (C) 2018 Scylladb, Ltd.
-#
-
-cmake_minimum_required (VERSION 2.8)
-
-project (seastar)
-
-message (WARNING "CMake is not yet supported as the Seastar build system. Please use with caution.")
-
-get_filename_component (SEASTAR_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} ABSOLUTE)
-get_filename_component (SEASTAR_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR} ABSOLUTE)
-
-#
-# Prologue.
-#
-# We define these manually because we want to be explicit about the options that are defined and because CMake defines
-# NDEBUG by default, and we don't wish to.
-
-set (CMAKE_CXX_FLAGS_DEBUG "-O0 -g")
-set (CMAKE_CXX_FLAGS_RELEASE "-O2")
-set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
-set (CMAKE_CXX_FLAGS_MINSIZEREL "-Os")
-
-# Set an option defined in a sub-directory.
-# Courtesy of http://edsiper.linuxchile.cl/blog/2016/01/08/cmake-override-subdirectory-options/
-macro (set_option option value)
- set (${option} ${value} CACHE INTERNAL "" FORCE)
-endmacro ()
-
-#
-# Configuration options.
-#
-option (SEASTAR_ENABLE_TESTS
- "If OFF, used to disable testing altogether." ON)
-
-option (SEASTAR_EXCLUDE_TESTS_BY_DEFAULT
- "If ON, then tests are not built by default when the build tool is invoked"
- ON)
-
-option (SEASTAR_EXCLUDE_APPS_BY_DEFAULT
- "If ON, then applications are not build by default when the build tool is invoked"
- ON)
-
-option(SEASTAR_ENABLE_WERROR "If ON, add -Werror to compile flags" ON)
-
-set (SEASTAR_CXX_DIALECT
- "gnu++17"
- CACHE
- STRING
- "C++ dialect to build with.")
-
-set (SEASTAR_CXX_OPTIMIZATION_FLAGS
- ""
- CACHE
- STRING
- "Extra optimization flags for non-debug builds.")
-
-set (SEASTAR_USER_CXXFLAGS
- ""
- CACHE
- STRING
- "Extra CXXFLAGS, separated by semicolon.")
-
-set (SEASTAR_USER_CFLAGS
- ""
- CACHE
- STRING
- "Extra CFLAGS, separated by semicolon for DPDK submodule.")
-
-
-set (SEASTAR_USER_LDFLAGS
- ""
- CACHE
- STRING
- "Extra LDFLAGS, separated by semicolon.")
-
-option (SEASTAR_ENABLE_HWLOC
- "Enable hwloc support."
- ON)
-
-option (SEASTAR_ENABLE_DPDK
- "Enable DPDK (from bundled sources)."
- OFF)
-
-option (SEASTAR_ENABLE_EXCEPTION_SCALABILITY_WORKAROUND
- "Override the dl_iterate_phdr symbol to workaround C++ exception scalability issues."
- OFF)
-
-set (SEASTAR_ALLOCATOR_PAGE_SIZE
- ""
- CACHE
- STRING
- "Override the allocator page size in bytes.")
-
-option (SEASTAR_ENABLE_ALLOC_FAILURE_INJECTOR
- "Enable allocation failure injection."
- OFF)
-
-option (SEASTAR_ENABLE_GCC6_CONCEPTS
- "Enable experimental support for C++ concepts as implemented in GCC 6."
- OFF)
-
-option (SEASTAR_LINK_STATIC_BOOST
- "Link with the Boost library statically."
- OFF)
-
-option (SEASTAR_LINK_STATIC_YAML_CPP
- "Link with the yaml-cpp library statically."
- OFF)
-
-option (SEASTAR_EXECUTE_ONLY_FAST_TESTS
- "Execute fast unit tests only, where applicable."
- OFF)
-
-set (SEASTAR_JENKINS
- ""
- CACHE
- STRING
- "Configure the build and tests for execution within a Jenkins context, with the given identifier.")
-
-#
-# Link pools (only supported for the Ninja generator).
-#
-
-if (${CMAKE_GENERATOR} STREQUAL "Ninja")
- exec_program ("${CMAKE_CURRENT_SOURCE_DIR}/cmake-tools/query_link_pool_depth.py"
- OUTPUT_VARIABLE link_pool_depth
- RETURN_VALUE query_pool_depth_code)
-
- if (NOT ("${query_pool_depth_code}" STREQUAL 0))
- MESSAGE (FATAL_ERROR "tools/query_link_pool_depth.py had a non-zero exit code.")
- endif ()
-
- set_property (GLOBAL PROPERTY
- JOB_POOLS
- seastar_link_pool=${link_pool_depth})
-
- set_property (GLOBAL PROPERTY
- CMAKE_JOB_POOL_LINK seastar_link_pool)
-endif ()
-
-#
-# External projects.
-#
-
-set_option (CARES_STATIC YES)
-set_option (CARES_SHARED NO)
-set_option (CARES_INSTALL NO)
-set_option (CARES_STATIC_PIC YES)
-add_subdirectory (c-ares)
-
-add_subdirectory (fmt)
-
-#
-# System dependencies.
-#
-
-set (CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
-
-##
-## Unconditional dependencies.
-##
-
-if (${SEASTAR_LINK_STATIC_BOOST})
- set (Boost_USE_STATIC_LIBS ON)
-endif ()
-
-if (NOT TARGET Boost)
- find_package (Boost COMPONENTS program_options filesystem unit_test_framework thread REQUIRED)
-endif()
-
-if (${Boost_VERSION} VERSION_LESS "1.58")
- message(error "Seastar requires Boost >= 1.58")
-endif ()
-
-find_package (GnuTLS REQUIRED)
-
-find_package (Protobuf REQUIRED)
-
-find_package (Cryptopp REQUIRED)
-
-find_package (Lz4 REQUIRED)
-
-find_package (Yaml-cpp REQUIRED)
-
-find_library (RT_LIBRARY rt DOC "The Posix Realtime extension library.")
-
-find_program (Ragel_EXECUTABLE NAMES ragel DOC "Path to the ragel executable.")
-
-##
-## Conditional dependencies.
-##
-
-if (${SEASTAR_ENABLE_HWLOC})
- find_package (HWLoc REQUIRED)
-
- find_package (LibXml2 REQUIRED)
-
- find_package (ZLIB REQUIRED)
-
- find_library (NUMA_LIBRARY numa DOC "The NUMA support library.")
-
- find_library (PCIAccess_LIBRARY pciaccess DOC "The pciaccess library.")
-endif ()
-
-#
-# Code generation.
-#
-
-add_subdirectory (proto)
-
-function (seastar_ragel_generate file output_var)
- set (abs_file "${CMAKE_CURRENT_SOURCE_DIR}/${file}")
-
- get_filename_component (base_name ${file} NAME_WE)
- set (output_name "${base_name}.hh")
-
- add_custom_command (
- OUTPUT "${output_name}"
- MAIN_DEPENDENCY ${abs_file}
- COMMAND ${Ragel_EXECUTABLE} -G2 -o ${output_name} ${abs_file}
- # sed away a bug in ragel 7 that emits some extraneous _nfa* variables.
- COMMAND sed -i -e '1h\;2,$$H\;$$!d\;g' -re 's/static const char _nfa[^\;]*\;//g' ${output_name})
-
- set ("${output_var}" "${CMAKE_CURRENT_BINARY_DIR}/${output_name}" PARENT_SCOPE)
-endfunction ()
-
-function (seastar_swagger_generate file output_var)
- set (abs_file "${CMAKE_CURRENT_SOURCE_DIR}/${file}")
- set (output_name "${file}.hh")
- set (output_path "${CMAKE_CURRENT_BINARY_DIR}/${output_name}")
-
- add_custom_command (
- OUTPUT ${output_path}
- MAIN_DEPENDENCY ${abs_file}
- COMMAND "${SEASTAR_SOURCE_DIR}/json/json2code.py" -f ${abs_file} -o ${output_path})
-
- set ("${output_var}" ${output_path} PARENT_SCOPE)
-endfunction ()
-
-add_subdirectory (http)
-
-#
-# Sources.
-#
-
-set (core_files
- core/abort_source.hh
- core/alien.hh core/alien.cc
- core/align.hh
- core/execution_stage.hh core/execution_stage.cc
- core/aligned_buffer.hh
- core/app-template.hh core/app-template.cc
- core/apply.hh
- core/array_map.hh
- core/bitops.hh
- core/bitset-iter.hh
- core/byteorder.hh
- core/cacheline.hh
- core/checked_ptr.hh
- core/chunked_fifo.hh
- core/circular_buffer.hh
- core/circular_buffer_fixed_capacity.hh
- core/condition-variable.hh
- core/deleter.hh
- core/distributed.hh
- core/do_with.hh
- core/dpdk_rte.hh core/dpdk_rte.cc
- core/enum.hh
- core/exception_hacks.hh core/exception_hacks.cc
- core/execution_stage.hh
- core/expiring_fifo.hh
- core/fair_queue.hh
- core/file-impl.hh
- core/file.hh
- core/fsqual.hh core/fsqual.cc
- core/fstream.hh core/fstream.cc
- core/function_traits.hh
- core/future-util.hh core/future-util.cc
- core/future.hh
- core/gate.hh
- core/iostream-impl.hh
- core/iostream.hh
- core/linux-aio.hh core/linux-aio.cc
- core/lowres_clock.hh
- core/manual_clock.hh
- core/memory.hh core/memory.cc
- core/metrics.hh core/metrics.cc
- core/metrics_api.hh
- core/metrics_registration.hh
- core/metrics_types.hh
- core/pipe.hh
- core/posix.hh core/posix.cc
- core/preempt.hh
- core/prefetch.hh
- core/print.hh
- core/prometheus.hh core/prometheus.cc
- core/queue.hh
- core/ragel.hh
- core/reactor.hh core/reactor.cc
- core/report_exception.hh
- core/resource.hh core/resource.cc
- core/rwlock.hh
- core/scattered_message.hh
- core/scheduling.hh
- core/scollectd-impl.hh
- core/scollectd.hh core/scollectd.cc
- core/scollectd_api.hh
- core/seastar.hh
- core/semaphore.hh
- core/sharded.hh
- core/shared_future.hh
- core/shared_mutex.hh
- core/shared_ptr.hh
- core/shared_ptr_debug_helper.hh
- core/shared_ptr_incomplete.hh
- core/simple-stream.hh
- core/slab.hh
- core/sleep.hh
- core/sstring.hh
- core/stall_sampler.hh
- core/stream.hh
- core/systemwide_memory_barrier.hh core/systemwide_memory_barrier.cc
- core/task.hh
- core/temporary_buffer.hh
- core/thread.hh core/thread.cc
- core/thread_impl.hh
- core/timer-set.hh
- core/timer.hh
- core/transfer.hh
- core/unaligned.hh
- core/units.hh
- core/vector-data-sink.hh
- core/vla.hh
- core/weak_ptr.hh)
-
-set (http_files
- http/api_docs.hh http/api_docs.cc
- http/common.hh http/common.cc
- http/exception.hh
- http/file_handler.hh http/file_handler.cc
- http/function_handlers.hh
- http/handlers.hh
- http/httpd.hh http/httpd.cc
- http/json_path.hh http/json_path.cc
- http/matcher.hh http/matcher.cc
- http/matchrules.hh
- http/mime_types.hh http/mime_types.cc
- http/reply.hh http/reply.cc
- http/request.hh
- http/routes.hh http/routes.cc
- http/transformers.hh http/transformers.cc)
-
-set (json_files
- json/formatter.hh json/formatter.cc
- json/json_elements.hh json/json_elements.cc)
-
-set (net_files
- net/api.hh
- net/arp.hh net/arp.cc
- net/byteorder.hh
- net/config.hh net/config.cc
- net/const.hh
- net/dhcp.hh net/dhcp.cc
- net/dns.hh net/dns.cc
- net/dpdk.hh net/dpdk.cc
- net/ethernet.hh net/ethernet.cc
- net/inet_address.hh net/inet_address.cc
- net/ip.hh net/ip.cc
- net/ip_checksum.hh net/ip_checksum.cc
- net/native-stack-impl.hh
- net/native-stack.hh net/native-stack.cc
- net/net.hh net/net.cc
- net/packet-data-source.hh
- net/packet-util.hh
- net/packet.hh net/packet.cc
- net/posix-stack.hh net/posix-stack.cc
- net/proxy.hh net/proxy.cc
- net/socket_defs.hh
- net/stack.hh net/stack.cc
- net/tcp-stack.hh
- net/tcp.hh net/tcp.cc
- net/tls.hh net/tls.cc
- net/toeplitz.hh
- net/udp.hh net/udp.cc
- net/virtio-interface.hh
- net/virtio.hh net/virtio.cc)
-
-set (rpc_files
- rpc/lz4_compressor.hh rpc/lz4_compressor.cc
- rpc/multi_algo_compressor_factory.hh
- rpc/rpc.hh rpc/rpc.cc
- rpc/rpc_impl.hh
- rpc/rpc_types.hh)
-
-set (util_files
- util/alloc_failure_injector.hh util/alloc_failure_injector.cc
- util/backtrace.hh util/backtrace.cc
- util/bool_class.hh
- util/conversions.hh util/conversions.cc
- util/defer.hh
- util/eclipse.hh
- util/function_input_iterator.hh
- util/gcc6-concepts.hh
- util/indirect.hh
- util/is_smart_ptr.hh
- util/lazy.hh
- util/log.hh util/log.cc
- util/log-cli.hh
- util/noncopyable_function.hh
- util/optimized_optional.hh
- util/print_safe.hh
- util/program-options.hh util/program-options.cc
- util/reference_wrapper.hh
- util/spinlock.hh
- util/transform_iterator.hh
- util/tuple_utils.hh
- util/variant_utils.hh)
-
-add_library (seastar
- ${core_files}
- ${http_files}
- ${json_files}
- ${net_files}
- ${rpc_files}
- ${util_files}
- $<TARGET_OBJECTS:seastar-protobuf>)
-
-add_dependencies (seastar
- seastar-http-response-parser
- seastar-http-request-parser)
-
-add_library (Seastar::seastar ALIAS seastar)
-
-#
-# DPDK.
-#
-
-if (${SEASTAR_ENABLE_DPDK})
- set (dpdk_source_dir "${CMAKE_CURRENT_SOURCE_DIR}/dpdk")
- set (dpdk_binary_dir "${CMAKE_CURRENT_BINARY_DIR}/dpdk")
-
- #
- # Oh, CMake...
- #
-
- set (arch "")
- foreach (flag ${SEASTAR_USER_CXXFLAGS})
- if (${flag} MATCHES "-march=(.+)")
- set (arch ${CMAKE_MATCH_1})
- endif ()
- endforeach ()
-
- if ("${arch}" STREQUAL "nehalem")
- set (dpdk_machine "nhm")
- elseif ("${arch}" STREQUAL "westmere")
- set (dpdk_machine "wsm")
- elseif ("${arch}" STREQUAL "sandybridge")
- set (dpdk_machine "snb")
- elseif ("${arch}" STREQUAL "ivybridge")
- set (dpdk_machine "ivb")
- else ()
- set (dpdk_machine "native")
- endif ()
-
- if (EXISTS "${dpdk_binary_dir}/.config")
- file (REMOVE "${dpdk_binary_dir}/.config")
- endif ()
-
- exec_program (make
- ARGS -C ${dpdk_source_dir} RTE_OUTPUT=${dpdk_binary_dir} config "T=x86_64-${dpdk_machine}-linuxapp-gcc")
-
- exec_program ("${CMAKE_CURRENT_SOURCE_DIR}/cmake-tools/dpdk_adjust_variables.py"
- ARGS "${dpdk_binary_dir}/.config" ${dpdk_machine})
-
- exec_program ("${CMAKE_CURRENT_SOURCE_DIR}/cmake-tools/dpdk_query_cflags.py"
- ARGS ${dpdk_binary_dir} ${dpdk_machine}
- OUTPUT_VARIABLE dpdk_cflags)
-
- add_custom_target (seastar-dpdk
- COMMAND make -C ${dpdk_binary_dir} CC=\"${CMAKE_C_COMPILER} -Wno-implicit-fallthrough -Wno-format-truncation -Wno-bool-operation -Wno-maybe-uninitialized ${SEASTAR_USER_CFLAGS}\")
-
- add_dependencies (seastar seastar-dpdk)
-
- target_include_directories (seastar SYSTEM PUBLIC "${dpdk_binary_dir}/include")
- target_compile_options (seastar PUBLIC "${dpdk_cflags}")
-endif ()
-
-#
-# Compilation flags and definitions.
-#
-
-target_compile_options (seastar
- PRIVATE
- -Wall
-
- PUBLIC
- "-std=${SEASTAR_CXX_DIALECT}"
- -Wno-error=deprecated-declarations
- -fvisibility=hidden
- -U_FORTIFY_SOURCE)
-
-if(SEASTAR_ENABLE_WERROR)
- target_compile_options (seastar PRIVATE
- -Werror
- )
-endif()
-
-if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
- target_compile_options (seastar PUBLIC
- -fsanitize=address
- -fsanitize=leak
- -fsanitize=undefined)
-
- target_compile_definitions (seastar PUBLIC
- SEASTAR_DEBUG
- SEASTAR_DEBUG_SHARED_PTR
- SEASTAR_DEFAULT_ALLOCATOR
- SEASTAR_THREAD_STACK_GUARDS
- SEASTAR_ASAN_ENABLED
- SEASTAR_SHUFFLE_TASK_QUEUE)
-else ()
- target_compile_options (seastar PUBLIC "${SEASTAR_CXX_OPTIMIZATION_FLAGS}")
-endif ()
-
-if (${SEASTAR_ENABLE_GCC6_CONCEPTS})
- target_compile_options (seastar PUBLIC -fconcepts)
- target_compile_definitions (seastar PUBLIC SEASTAR_HAVE_GCC6_CONCEPTS)
-endif ()
-
-if (NOT ${SEASTAR_ENABLE_EXCEPTION_SCALABILITY_WORKAROUND})
- target_compile_definitions (seastar PUBLIC
- SEASTAR_NO_EXCEPTION_HACK)
-endif ()
-
-if (${SEASTAR_ENABLE_HWLOC})
- target_compile_definitions (seastar PUBLIC
- SEASTAR_HAVE_HWLOC SEASTAR_HAVE_NUMA)
-endif ()
-
-if (${SEASTAR_ENABLE_DPDK})
- target_compile_options (seastar PUBLIC
- -Wno-error=literal-suffix
- -Wno-literal-suffix
- -Wno-invalid-offsetof)
-
- target_compile_definitions (seastar PUBLIC
- SEASTAR_HAVE_DPDK)
-endif ()
-
-if (${SEASTAR_ALLOCATOR_PAGE_SIZE})
- target_compile_definitions (seastar PUBLIC
- SEASTAR_OVERRIDE_ALLOCATOR_PAGE_SIZE=${SEASTAR_ALLOCATOR_PAGE_SIZE})
-endif ()
-
-if (${SEASTAR_ENABLE_ALLOC_FAILURE_INJECTOR})
- target_compile_definitions (seastar PUBLIC
- SEASTAR_ENABLE_ALLOC_FAILURE_INJECTION)
-endif ()
-
-##
-## Code tests.
-##
-
-###
-### have_lz4_compress_default
-###
-
-set (CMAKE_REQUIRED_INCLUDES ${Lz4_INCLUDE_DIRS})
-set (CMAKE_REQUIRED_LIBRARIES ${Lz4_LIBRARIES})
-check_symbol_exists (LZ4_compress_default lz4.h have_lz4_compress_default)
-
-if (${have_lz4_compress_default})
- target_compile_definitions (seastar PUBLIC SEASTAR_HAVE_LZ4_COMPRESS_DEFAULT)
-endif ()
-
-###
-### have_asan_fiber_support
-###
-
-try_compile (have_asan_fiber_support
- ${CMAKE_CURRENT_BINARY_DIR}
- ${CMAKE_CURRENT_SOURCE_DIR}/cmake-tests/asan_fiber.cc
- LINK_LIBRARIES -fsanitize=address)
-
-if (${have_asan_fiber_support})
- target_compile_definitions (seastar PUBLIC SEASTAR_HAVE_ASAN_FIBER_SUPPORT)
-endif ()
-
-###
-### have_sanitize_vptr_flag
-###
-
-# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67258
-check_cxx_compiler_flag (-fsanitize=vptr have_sanitize_vptr_flag)
-
-set (ENV{UBSAN_OPTIONS} "exitcode=1")
-try_run (sanitize_vptr_run sanitize_vptr_compile
- ${CMAKE_CURRENT_BINARY_DIR}
- ${CMAKE_CURRENT_SOURCE_DIR}/cmake-tests/sanitize_vptr.cc
- CMAKE_FLAGS -DCMAKE_CXX_FLAGS="-fsanitize=undefined -fno-sanitize-recover")
-
-# TODO: -fsanitize=vptr is broken even when the test passes.
-if ((NOT "${have_sanitize_vptr_flag}") OR "${sanitize_vptr_run}" AND FALSE)
-else ()
- if ("${CMAKE_BUILD_TYPE}" STREQUAL Debug)
- message (STATUS "-fsanitize=vptr is broken; disabling. Some debug-mode tests are bypassed.")
- target_compile_options (seastar PUBLIC -fno-sanitize=vptr)
- endif ()
-endif ()
-
-###
-### visibility_flags_compile
-###
-
-# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80947
-try_compile (visiblity_flags_compile
- ${CMAKE_CURRENT_BINARY_DIR}
- ${CMAKE_CURRENT_SOURCE_DIR}/cmake-tests/visibility_flags.cc
- CMAKE_FLAGS -DCMAKE_CXX_FLAGS="-fvisibility=hidden -std=gnu++1y -Werror=attributes")
-
-if (NOT "${visibility_flags_compile}")
- message (STATUS "Disabling -Wattributes due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80947")
- target_compile_options (seastar PUBLIC -Wno-attributes)
-endif ()
-
-###
-### have_membarrier
-###
-
-try_compile (have_membarrier
- ${CMAKE_CURRENT_BINARY_DIR}
- ${CMAKE_CURRENT_SOURCE_DIR}/cmake-tests/have_membarrier.cc)
-
-if (${have_membarrier})
- target_compile_definitions (seastar PUBLIC SEASTAR_HAS_MEMBARRIER)
-endif ()
-
-##
-## Warnings.
-##
-
-function (seastar_add_warning_if_supported warning)
- # GCC ignores the `-Wno` prefix even when the warning is not recognized, so strip it.
- string (REGEX REPLACE "^-Wno-" "-W" adjusted ${warning})
- string (REGEX REPLACE "^-W" "warning_" human_name_prefix ${adjusted})
- set (result "${human_name_prefix}_supported")
- check_cxx_compiler_flag (${adjusted} ${result})
-
- if ("${${result}}")
- target_compile_options (seastar PUBLIC ${warning})
- endif ()
-endfunction ()
-
-# Clang-only.
-seastar_add_warning_if_supported (-Wno-mismatched-tags)
-
-# Clang-only: moving a temporary object prevents copy elision.
-seastar_add_warning_if_supported (-Wno-pessimizing-move)
-
-# Clang-only: redundant move in return statement.
-seastar_add_warning_if_supported (-Wno-redundant-move)
-
-# Clang-only: 'x' overrides a member function but is not marked 'override'.
-seastar_add_warning_if_supported (-Wno-inconsistent-missing-override)
-
-# Clang-only: private field 'x' is not used.
-seastar_add_warning_if_supported (-Wno-unused-private-field)
-
-# Clang-only: unknown attribute 'x' ignored (x in this case is gnu::externally_visible).
-seastar_add_warning_if_supported (-Wno-unknown-attributes)
-
-# Clang-only: 'x' function 'y' declared in header file should be declared 'z'.
-seastar_add_warning_if_supported (-Wno-unneeded-internal-declaration)
-
-# Clang-only: inline function 'x' is not defined.
-seastar_add_warning_if_supported (-Wno-undefined-inline)
-
-# Clang-only: 'x' hides overloaded virtual functions.
-seastar_add_warning_if_supported (-Wno-overloaded-virtual)
-
-seastar_add_warning_if_supported (-Wno-maybe-uninitialized)
-
-# GCC: Overzealous: false positives.
-seastar_add_warning_if_supported (-Wno-stringop-overflow)
-
-seastar_add_warning_if_supported (-Wno-error=cpp)
-
-##
-## Extra flags at the end.
-##
-
-target_compile_options (seastar PUBLIC "${SEASTAR_USER_CXXFLAGS}")
-
-#
-# Configuration.
-#
-
-target_include_directories (seastar SYSTEM
- PUBLIC
- ${GNUTLS_INCLUDE_DIR})
-
-target_include_directories (seastar PUBLIC
- ${CMAKE_CURRENT_SOURCE_DIR}
- ${CMAKE_CURRENT_BINARY_DIR})
-
-if (${SEASTAR_NABLE_HWLOC})
- target_include_directories (seastar SYSTEM
- PUBLIC
- ${LIBXML2_INCLUDE_DIRS})
-endif ()
-
-target_link_libraries (seastar PUBLIC
- -Wl,--no-as-needed
- -fvisibility=hidden)
-
-target_link_libraries (seastar PUBLIC
- debug -fsanitize=address
- debug -fsanitize=leak
- debug -fsanitize=undefined
- stdc++fs
- -ldl
- -lgcc_s
- ${CMAKE_THREAD_LIBS_INIT}
- ${GNUTLS_LIBRARIES}
- ${PROTOBUF_LIBRARIES}
- ${RT_LIBRARY}
- Boost::boost # Headers only.
- Cryptopp::cryptopp
- Lz4::lz4
- fmt::fmt
- c-ares::cares)
-
-function (seastar_maybe_link_statically static_flag)
- string (REPLACE ";" "," joined_targets "${ARGN}")
-
- if (${static_flag})
- target_link_libraries (seastar PUBLIC "-Wl,-Bstatic" "${joined_targets}" "-Wl,-Bdynamic")
- else ()
- target_link_libraries (seastar PUBLIC "${ARGN}")
- endif ()
-endfunction ()
-
-seastar_maybe_link_statically (${SEASTAR_LINK_STATIC_BOOST}
- Boost::program_options
- Boost::filesystem
- Boost::thread)
-
-seastar_maybe_link_statically (${SEASTAR_LINK_STATIC_YAML_CPP}
- Yaml-cpp::yaml-cpp)
-
-if (${SEASTAR_ENABLE_HWLOC})
- target_link_libraries (seastar PUBLIC
- ${NUMA_LIBRARY}
- ${PCIAccess_LIBRARY}
- ${LIBXML2_LIBRARIES}
- HWLoc::hwloc
- ZLIB::ZLIB)
-endif ()
-
-if (${SEASTAR_ENABLE_DPDK})
- set (dpdk_libraries
- -lrte_pmd_vmxnet3_uio
- -lrte_pmd_i40e
- -lrte_pmd_ixgbe
- -lrte_pmd_e1000
- -lrte_pmd_ring
- -lrte_pmd_bnxt
- -lrte_pmd_cxgbe
- -lrte_pmd_ena
- -lrte_pmd_enic
- -lrte_pmd_fm10k
- -lrte_pmd_nfp
- -lrte_pmd_qede
- -lrte_pmd_sfc_efx
- -lrte_hash
- -lrte_kvargs
- -lrte_mbuf
- -lrte_ethdev
- -lrte_eal
- -lrte_mempool
- -lrte_ring
- -lrte_cmdline
- -lrte_cfgfile)
-
- string (REPLACE ";" "," joined_dpdk_libraries "${dpdk_libraries}")
-
- target_link_libraries (seastar PUBLIC
- -L"${dpdk_binary_dir}/lib"
- -Wl,--whole-archive,${joined_dpdk_libraries},--no-whole-archive)
-endif ()
-
-target_link_libraries (seastar PUBLIC "${SEASTAR_USER_LDFLAGS}")
-
-#
-# Applications.
-#
-
-if (${SEASTAR_EXCLUDE_APPS_BY_DEFAULT})
- set (exclude_apps EXCLUDE_FROM_ALL)
-else ()
- set (exclude_apps "")
-endif ()
-
-add_subdirectory (apps ${exclude_apps})
-
-#
-# Tests.
-#
-
-enable_testing ()
-
-if (${SEASTAR_EXCLUDE_TESTS_BY_DEFAULT})
- set (exclude_tests EXCLUDE_FROM_ALL)
-else ()
- set (exclude_tests "")
-endif ()
-
-if(${SEASTAR_ENABLE_TESTS})
- add_subdirectory (tests ${exclude_tests})
-endif()
-#
-# Documentation.
-#
-
-add_custom_target (tutorial-html
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
- COMMAND
- pandoc
- --self-contained
- --smart
- --toc
- -c doc/template.css
- -V documentclas=report
- --chapters
- --number-sections
- -f markdown_github+pandoc_title_block
- --highlight-style tango
- doc/tutorial.md
- -o doc/tutorial.html)
-
-add_custom_target (tutorial-html-split
- WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/doc"
- COMMAND mkdir -p split && ./htmlsplit.py
- DEPENDS tutorial-html)
-
-add_custom_target (tutorial-pdf
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
- COMMAND
- pandoc
- -f markdown_github+pandoc_title_block
- --highlight-style tango
- --template=doc/template.tex
- doc/tutorial.md
- -o doc/tutorial.pdf)
-
-#
-# Source code navigation tools.
-#
-
-add_custom_target (cscope
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
- COMMAND sh -c find -name '*.[chS]' -o -name '*.cc' -o -name '*.hh' | cscope -bq -i-)
-
-#
-# Generate pkg-config specification.
-#
-# This is quite ugly, since we need to extract information from imported targets
-# (like `Boost::program_options`) and resolve generator expessions ($<...>).
-# CMake doesn't make it easy to do either.
-
-set (imported_target_regex "[a-zA-Z0-9_\\-]+::[a-zA-ZA0-9_\\-]+")
-
-set (pc_cflags "")
-set (pc_libs "")
-
-##
-## Query an imported target for all its non-linking compiler options.
-##
-function (seastar_expand_imported_target_cflags target output)
- get_target_property (definitions ${target} INTERFACE_COMPILE_DEFINITIONS)
- get_target_property (options ${target} INTERFACE_COMPILE_OPTIONS)
- get_target_property (include_dirs ${target} INTERFACE_INCLUDE_DIRECTORIES)
-
- set (cflags "")
- if (definitions)
- # All definitions need to be prefixed with -D.
- string (REGEX REPLACE "([^;]+)" -D\\1 definitions_args "${definitions}")
- list (APPEND cflags "${definitions_args}")
- endif ()
- if (options)
- list (APPEND cflags "${options}")
- endif ()
- if (include_dirs)
- list (REMOVE_DUPLICATES include_dirs)
-
- ##
- ## All directories need to be prefixed with -I. We only care about
- ## BUILD_INTERFACE directories, so we have to manually remove the
- ## INSTALL_INTERFACE ones.
- ##
-
- string (REGEX REPLACE "([^;]+)" -I\\1 include_dirs_args "${include_dirs}")
- string (REGEX REPLACE "-I\\$<INSTALL_INTERFACE:.+>" "" include_dirs_args_no_empty "${include_dirs_args}")
- list (APPEND cflags "${include_dirs_args_no_empty}")
- endif ()
-
- set ("${output}" "${cflags}" PARENT_SCOPE)
-endfunction ()
-
-function (seastar_expand_imported_target_libs target output)
- get_target_property (libs ${target} INTERFACE_LINK_LIBRARIES)
- set ("${output}" "${libs}" PARENT_SCOPE)
-endfunction ()
-
-##
-## Start with the CMAKE_CXX cflags.
-##
-
-string (TOUPPER "${CMAKE_BUILD_TYPE}" build_type_uppercase)
-string (REGEX REPLACE "[ ]+" ";" global_cflags "${CMAKE_CXX_FLAGS_${build_type_uppercase}}")
-list (APPEND pc_cflags "${global_cflags}")
-
-seastar_expand_imported_target_cflags (Seastar::seastar seastar_cflags)
-list (APPEND pc_cflags "${seastar_cflags}")
-
-##
-## We expand the seastar library flags and process each one, looking for imported targets.
-##
-
-seastar_expand_imported_target_libs (Seastar::seastar seastar_libs_raw)
-foreach (lib ${seastar_libs_raw})
- if (${lib} MATCHES ${imported_target_regex})
- ##
- ## For an imported target, expand its CFLAGS.
- ##
-
- seastar_expand_imported_target_cflags (${lib} lib_cflags)
- list (APPEND pc_cflags "${lib_cflags}")
-
- ##
- ## For non-header-only libraries, add the imported target's actual library file.
- ##
-
- get_target_property (lib_type ${lib} TYPE)
- if (NOT ("${lib_type}" STREQUAL INTERFACE_LIBRARY))
- set (lib_location $<TARGET_FILE:${lib}>)
- list (APPEND pc_libs "${lib_location}")
- endif ()
- else ()
- list (APPEND pc_libs "${lib}")
- endif ()
-endforeach ()
-
-list (REMOVE_DUPLICATES pc_cflags)
-
-set (pc_file "${CMAKE_CURRENT_BINARY_DIR}/seastar.pc")
-
-# At this point, both pc_libs and pc_cflags can contain generator expressions
-# ($<...>). CMake gives us no way to evaluate these in code. They are evaluated
-# by CMake internally at the build phase (but not the configure phase). Creating
-# a target and echoing the strings forces their evaluation at the right time.
-# This would not be possible with CONFIGURE_FILE.
-#
-# Note that seastar needs to be listed prior to other static libraries to
-# prevent symbols from being omitted from them.
-add_custom_target (pkg-config ALL
- COMMAND echo "Name: Seastar" > ${pc_file}
- COMMAND echo "URL: http://seastar-project.org/" >> ${pc_file}
- COMMAND echo "Description: Advanced C++ framework for high-performance server applications on modern hardware." >> ${pc_file}
- COMMAND echo "Version: 1.0" >> ${pc_file}
- COMMAND echo "Libs:" '-Wl,--whole-archive,$<TARGET_FILE:Seastar::seastar>,--no-whole-archive' '${pc_libs}' >> ${pc_file}
- COMMAND echo "Cflags:" '${pc_cflags}' >> ${pc_file})
diff --git a/apps/CMakeLists.txt b/apps/CMakeLists.txt
deleted file mode 100644
index 896c8dc9..00000000
--- a/apps/CMakeLists.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# This file is open source software, licensed to you under the terms
-# of the Apache License, Version 2.0 (the "License"). See the NOTICE file
-# distributed with this work for additional information regarding copyright
-# ownership. You may not use this file except in compliance with the License.
-#
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-#
-# Copyright (C) 2018 Scylladb, Ltd.
-#
-
-# Logical target for all applications.
-add_custom_target (apps)
-
-function (add_seastar_app name)
- add_executable (${name} ${ARGN})
- target_link_libraries (${name} PRIVATE seastar)
- add_dependencies (apps ${name})
-endfunction ()
-
-add_subdirectory (httpd)
-add_subdirectory (io_tester)
-add_subdirectory (iotune)
-add_subdirectory (memcached)
-add_subdirectory (seawreck)
diff --git a/apps/httpd/CMakeLists.txt b/apps/httpd/CMakeLists.txt
deleted file mode 100644
index 193cd814..00000000
--- a/apps/httpd/CMakeLists.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-# This file is open source software, licensed to you under the terms
-# of the Apache License, Version 2.0 (the "License"). See the NOTICE file
-# distributed with this work for additional information regarding copyright
-# ownership. You may not use this file except in compliance with the License.
-#
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-#
-# Copyright (C) 2018 Scylladb, Ltd.
-#
-
-seastar_swagger_generate (demo.json httpd_swagger_sources)
-add_seastar_app (httpd main.cc "${httpd_swagger_sources}")
diff --git a/apps/io_tester/CMakeLists.txt b/apps/io_tester/CMakeLists.txt
deleted file mode 100644
index 139889ec..00000000
--- a/apps/io_tester/CMakeLists.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-# This file is open source software, licensed to you under the terms
-# of the Apache License, Version 2.0 (the "License"). See the NOTICE file
-# distributed with this work for additional information regarding copyright
-# ownership. You may not use this file except in compliance with the License.
-#
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-#
-# Copyright (C) 2018 Scylladb, Ltd.
-#
-
-add_seastar_app (io_tester io_tester.cc)
-target_link_libraries (io_tester PRIVATE Yaml-cpp::yaml-cpp)
diff --git a/apps/iotune/CMakeLists.txt b/apps/iotune/CMakeLists.txt
deleted file mode 100644
index ffd4cc34..00000000
--- a/apps/iotune/CMakeLists.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# This file is open source software, licensed to you under the terms
-# of the Apache License, Version 2.0 (the "License"). See the NOTICE file
-# distributed with this work for additional information regarding copyright
-# ownership. You may not use this file except in compliance with the License.
-#
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-#
-# Copyright (C) 2018 Scylladb, Ltd.
-#
-
-add_seastar_app (iotune iotune.cc)
-
-target_link_libraries (iotune
- PRIVATE
- stdc++fs)
diff --git a/apps/memcached/CMakeLists.txt b/apps/memcached/CMakeLists.txt
deleted file mode 100644
index ee04b0c2..00000000
--- a/apps/memcached/CMakeLists.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-# This file is open source software, licensed to you under the terms
-# of the Apache License, Version 2.0 (the "License"). See the NOTICE file
-# distributed with this work for additional information regarding copyright
-# ownership. You may not use this file except in compliance with the License.
-#
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-#
-# Copyright (C) 2018 Scylladb, Ltd.
-#
-
-seastar_ragel_generate (ascii.rl memcached_ragel_sources)
-add_seastar_app (memcached memcache.cc "${memcached_ragel_sources}")
diff --git a/apps/seawreck/CMakeLists.txt b/apps/seawreck/CMakeLists.txt
deleted file mode 100644
index 770c9840..00000000
--- a/apps/seawreck/CMakeLists.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-#
-# This file is open source software, licensed to you under the terms
-# of the Apache License, Version 2.0 (the "License"). See the NOTICE file
-# distributed with this work for additional information regarding copyright
-# ownership. You may not use this file except in compliance with the License.
-#
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-#
-# Copyright (C) 2018 Scylladb, Ltd.
-#
-
-add_seastar_app (seawreck seawreck.cc)
diff --git a/cmake-tests/asan_fiber.cc b/cmake-tests/asan_fiber.cc
deleted file mode 100644
index 3dfee7b1..00000000
--- a/cmake-tests/asan_fiber.cc
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * This file is open source software, licensed to you under the terms
- * of the Apache License, Version 2.0 (the "License"). See the NOTICE file
- * distributed with this work for additional information regarding copyright
- * ownership. You may not use this file except in compliance with the License.
- *
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-/*
- * Copyright (C) 2018 Scylladb, Ltd.
- */
-
-#include <cstddef>
-
-extern "C" {
-void __sanitizer_start_switch_fiber(void**, const void*, size_t);
-void __sanitizer_finish_switch_fiber(void*, const void**, size_t*);
-}
-
-int main() {
- __sanitizer_start_switch_fiber(nullptr, nullptr, 0);
- __sanitizer_finish_switch_fiber(nullptr, nullptr, nullptr);
-}
diff --git a/cmake-tests/have_membarrier.cc b/cmake-tests/have_membarrier.cc
deleted file mode 100644
index e1e2a21a..00000000
--- a/cmake-tests/have_membarrier.cc
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * This file is open source software, licensed to you under the terms
- * of the Apache License, Version 2.0 (the "License"). See the NOTICE file
- * distributed with this work for additional information regarding copyright
- * ownership. You may not use this file except in compliance with the License.
- *
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-/*
- * Copyright (C) 2018 Scylladb, Ltd.
- */
-
-extern "C" {
-#include <linux/membarrier.h>
-}
-
-int main() {
- int x = MEMBARRIER_CMD_PRIVATE_EXPEDITED | MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED;
-}
diff --git a/cmake-tests/sanitize_vptr.cc b/cmake-tests/sanitize_vptr.cc
deleted file mode 100644
index f6b6d622..00000000
--- a/cmake-tests/sanitize_vptr.cc
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * This file is open source software, licensed to you under the terms
- * of the Apache License, Version 2.0 (the "License"). See the NOTICE file
- * distributed with this work for additional information regarding copyright
- * ownership. You may not use this file except in compliance with the License.
- *
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-/*
- * Copyright (C) 2018 Scylladb, Ltd.
- */
-
-struct A {
- virtual ~A() {}
-};
-
-struct B : virtual A {};
-struct C : virtual A {};
-struct D : V, virtual C {};
-
-int main() {
- D d;
-}
diff --git a/cmake-tests/visibility_flags.cc b/cmake-tests/visibility_flags.cc
deleted file mode 100644
index c1b778f5..00000000
--- a/cmake-tests/visibility_flags.cc
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * This file is open source software, licensed to you under the terms
- * of the Apache License, Version 2.0 (the "License"). See the NOTICE file
- * distributed with this work for additional information regarding copyright
- * ownership. You may not use this file except in compliance with the License.
- *
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-/*
- * Copyright (C) 2018 Scylladb, Ltd.
- */
-
-template <class T>
-class my_class {
-public:
- my_class() {
- auto outer = [this]() {
- auto fn = [this] {};
- // Use `fn` for something here.
- };
- }
-};
-
-template<typename T>
-void foo() {
- struct inner {
- inner() {
- (void)([this] { });
- }
- };
-}
-
-int main() {
- my_class<int> r;
- foo<int>();
-}
diff --git a/cmake-tools/dpdk_adjust_variables.py b/cmake-tools/dpdk_adjust_variables.py
deleted file mode 100755
index e94f404a..00000000
--- a/cmake-tools/dpdk_adjust_variables.py
+++ /dev/null
@@ -1,76 +0,0 @@
-#!/usr/bin/python3
-
-#
-# This file is open source software, licensed to you under the terms
-# of the Apache License, Version 2.0 (the "License"). See the NOTICE file
-# distributed with this work for additional information regarding copyright
-# ownership. You may not use this file except in compliance with the License.
-#
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-#
-# Copyright (C) 2018 Scylladb, Ltd.
-#
-
-"""
-Doing this from CMake is a pain due to its poor type system.
-"""
-
-import argparse
-import os
-
-# Adjust to taste.
-DEFAULTS = {
- 'CONFIG_RTE_LIBRTE_PMD_BOND': 'n',
- 'CONFIG_RTE_MBUF_SCATTER_GATHER': 'n',
- 'CONFIG_RTE_LIBRTE_IP_FRAG': 'n',
- 'CONFIG_RTE_APP_TEST': 'n',
- 'CONFIG_RTE_TEST_PMD': 'n',
- 'CONFIG_RTE_MBUF_REFCNT_ATOMIC': 'n',
- 'CONFIG_RTE_MAX_MEMSEG': '8192',
- 'CONFIG_RTE_EAL_IGB_UIO': 'n',
- 'CONFIG_RTE_LIBRTE_KNI': 'n',
- 'CONFIG_RTE_KNI_KMOD': 'n',
- 'CONFIG_RTE_LIBRTE_JOBSTATS': 'n',
- 'CONFIG_RTE_LIBRTE_LPM': 'n',
- 'CONFIG_RTE_LIBRTE_ACL': 'n',
- 'CONFIG_RTE_LIBRTE_POWER': 'n',
- 'CONFIG_RTE_LIBRTE_IP_FRAG': 'n',
- 'CONFIG_RTE_LIBRTE_METER': 'n',
- 'CONFIG_RTE_LIBRTE_SCHED': 'n',
- 'CONFIG_RTE_LIBRTE_DISTRIBUTOR': 'n',
- 'CONFIG_RTE_LIBRTE_PMD_CRYPTO_SCHEDULER': 'n',
- 'CONFIG_RTE_LIBRTE_REORDER': 'n',
- 'CONFIG_RTE_LIBRTE_PORT': 'n',
- 'CONFIG_RTE_LIBRTE_TABLE': 'n',
- 'CONFIG_RTE_LIBRTE_PIPELINE': 'n',
-}
-
-parser = argparse.ArgumentParser(description='Update the configuration variables for DPDK.')
-parser.add_argument('file', metavar='FILE', help="Path of the DPDK configuration file.")
-parser.add_argument('machine', metavar='NAME', help="The architecture identifier for DPDK, like `ivb`.")
-
-args = parser.parse_args()
-
-lines = open(args.file, encoding='UTF-8').readlines()
-new_lines = []
-
-for line in lines:
- for var, val in DEFAULTS.items():
- if line.startswith(var + '='):
- line = '{}={}\n'.format(var, val)
-
- new_lines.append(line)
-
-new_lines += 'CONFIG_RTE_MACHINE={}\n'.format(args.machine)
-open(args.file, 'w', encoding='UTF-8').writelines(new_lines)
diff --git a/cmake-tools/dpdk_query_cflags.py b/cmake-tools/dpdk_query_cflags.py
deleted file mode 100755
index a3cba4a0..00000000
--- a/cmake-tools/dpdk_query_cflags.py
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/usr/bin/python3
-
-#
-# This file is open source software, licensed to you under the terms
-# of the Apache License, Version 2.0 (the "License"). See the NOTICE file
-# distributed with this work for additional information regarding copyright
-# ownership. You may not use this file except in compliance with the License.
-#
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-#
-# Copyright (C) 2018 Scylladb, Ltd.
-#
-
-import argparse
-import os
-import re
-import subprocess
-import tempfile
-
-parser = argparse.ArgumentParser(description="Query necessary CFLAGS for compiling DPDK.")
-parser.add_argument('build_dir', metavar='DIR', help="The build directory of DPDK.")
-parser.add_argument('machine', help="The architecture identifier for DPDK, like `ivb`.")
-args = parser.parse_args()
-
-with tempfile.NamedTemporaryFile() as sfile:
- dpdk_sdk_path = os.path.dirname(os.path.realpath(__file__)) + '/../dpdk'
- dpdk_target = args.build_dir
- dpdk_target_name = 'x86_64-{}-linuxapp-gcc'.format(args.machine)
- dpdk_arch = 'x86_64'
-
- sfile.file.write(bytes('include ' + dpdk_sdk_path + '/mk/rte.vars.mk' + "\n", 'utf-8'))
- sfile.file.write(bytes('all:' + "\n\t", 'utf-8'))
- sfile.file.write(bytes('@echo $(MACHINE_CFLAGS)' + "\n", 'utf-8'))
- sfile.file.flush()
-
- dpdk_cflags = subprocess.check_output(['make', '--no-print-directory',
- '-f', sfile.name,
- 'RTE_SDK=' + dpdk_sdk_path,
- 'RTE_OUTPUT=' + dpdk_target,
- 'RTE_TARGET=' + dpdk_target_name,
- 'RTE_SDK_BIN=' + dpdk_target,
- 'RTE_ARCH=' + dpdk_arch])
- dpdk_cflags_str = dpdk_cflags.decode('utf-8')
- dpdk_cflags_str = re.sub(r'\n+$', '', dpdk_cflags_str)
-
- # CMake likes comma-separated values.
- print(';'.join(dpdk_cflags_str.split()))
diff --git a/cmake-tools/query_link_pool_depth.py b/cmake-tools/query_link_pool_depth.py
deleted file mode 100755
index 0084c934..00000000
--- a/cmake-tools/query_link_pool_depth.py
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/usr/bin/env python3
-
-#
-# This file is open source software, licensed to you under the terms
-# of the Apache License, Version 2.0 (the "License"). See the NOTICE file
-# distributed with this work for additional information regarding copyright
-# ownership. You may not use this file except in compliance with the License.
-#
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-#
-# Copyright (C) 2018 Scylladb, Ltd.
-#
-
-import os
-
-MEMORY_PER_LINK_PROCESS = 7e9
-
-def query_physical_memory():
- return os.sysconf('SC_PAGE_SIZE') * os.sysconf('SC_PHYS_PAGES')
-
-if __name__ == '__main__':
- link_depth = max(1, int(query_physical_memory() / MEMORY_PER_LINK_PROCESS))
- print(link_depth)
diff --git a/cmake/FindCryptopp.cmake b/cmake/FindCryptopp.cmake
deleted file mode 100644
index 51d197a0..00000000
--- a/cmake/FindCryptopp.cmake
+++ /dev/null
@@ -1,60 +0,0 @@
-#
-# This file is open source software, licensed to you under the terms
-# of the Apache License, Version 2.0 (the "License"). See the NOTICE file
-# distributed with this work for additional information regarding copyright
-# ownership. You may not use this file except in compliance with the License.
-#
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-#
-# Copyright (C) 2018 Scylladb, Ltd.
-#
-
-find_package (PkgConfig)
-
-pkg_check_modules (PC_Cryptopp QUIET cryptopp)
-
-find_path (Cryptopp_INCLUDE_DIR
- NAMES default.h
- PATHS ${PC_Cryptopp_INCLUDE_DIRS}
- PATH_SUFFIXES cryptopp)
-
-find_library (Cryptopp_LIBRARY
- NAMES cryptopp
- PATHS ${PC_Cryptopp_LIBRARY_DIRS})
-
-set (Cryptopp_VERSION ${PC_Cryptopp_VERSION})
-
-include (FindPackageHandleStandardArgs)
-
-find_package_handle_standard_args (Cryptopp
- FOUND_VAR Cryptopp_FOUND
- REQUIRED_VARS
- Cryptopp_LIBRARY
- Cryptopp_INCLUDE_DIR
- VERSION_VAR Cryptopp_VERSION)
-
-if (Cryptopp_FOUND)
- set (Cryptopp_LIBRARIES ${Cryptopp_LIBRARY})
- set (Cryptopp_INCLUDE_DIRS ${Cryptopp_INCLUDE_DIR})
- set (Cryptopp_DEFINITIONS ${PC_Cryptopp_CFLAGS_OTHER})
-endif ()
-
-if (Cryptopp_FOUND AND NOT TARGET Cryptopp::cryptopp)
- add_library (Cryptopp::cryptopp UNKNOWN IMPORTED)
-
- set_target_properties (Cryptopp::cryptopp PROPERTIES
- IMPORTED_LOCATION "${Cryptopp_LIBRARY}"
- INTERFACE_COMPILE_OPTIONS "${PC_Cryptopp_CFLAGS_OTHER}"
- INTERFACE_INCLUDE_DIRECTORIES "${Cryptopp_INCLUDE_DIR}")
-endif ()
diff --git a/cmake/FindHWLoc.cmake b/cmake/FindHWLoc.cmake
deleted file mode 100644
index f76dc8a9..00000000
--- a/cmake/FindHWLoc.cmake
+++ /dev/null
@@ -1,59 +0,0 @@
-#
-# This file is open source software, licensed to you under the terms
-# of the Apache License, Version 2.0 (the "License"). See the NOTICE file
-# distributed with this work for additional information regarding copyright
-# ownership. You may not use this file except in compliance with the License.
-#
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-#
-# Copyright (C) 2018 Scylladb, Ltd.
-#
-
-find_package (PkgConfig)
-
-pkg_check_modules (PC_HWLoc QUIET hwloc)
-
-find_path (HWLoc_INCLUDE_DIR
- NAMES hwloc.h
- PATHS ${PC_HWLoc_INCLUDE_DIRS})
-
-find_library (HWLoc_LIBRARY
- NAMES hwloc
- PATHS ${PC_HWLoc_LIBRARY_DIRS})
-
-set (HWLoc_VERSION ${PC_HWLoc_VERSION})
-
-include (FindPackageHandleStandardArgs)
-
-find_package_handle_standard_args (HWLoc
- FOUND_VAR HWLoc_FOUND
- REQUIRED_VARS
- HWLoc_LIBRARY
- HWLoc_INCLUDE_DIR
- VERSION_VAR HWLoc_VERSION)
-
-if (HWLoc_FOUND)
- set (HWLoc_LIBRARIES ${HWLoc_LIBRARY})
- set (HWLoc_INCLUDE_DIRS ${HWLoc_INCLUDE_DIR})
- set (HWLoc_DEFINITIONS ${PC_HWLoc_CFLAGS_OTHER})
-endif ()
-
-if (HWLoc_FOUND AND NOT TARGET HWLoc::hwloc)
- add_library (HWLoc::hwloc UNKNOWN IMPORTED)
-
- set_target_properties (HWLoc::hwloc PROPERTIES
- IMPORTED_LOCATION "${HWLoc_LIBRARY}"
- INTERFACE_COMPILE_OPTIONS "${PC_HWLoc_CFLAGS_OTHER}"
- INTERFACE_INCLUDE_DIRECTORIES "${HWLoc_INCLUDE_DIR}")
-endif ()
diff --git a/cmake/FindLz4.cmake b/cmake/FindLz4.cmake
deleted file mode 100644
index 9cb3052e..00000000
--- a/cmake/FindLz4.cmake
+++ /dev/null
@@ -1,59 +0,0 @@
-#
-# This file is open source software, licensed to you under the terms
-# of the Apache License, Version 2.0 (the "License"). See the NOTICE file
-# distributed with this work for additional information regarding copyright
-# ownership. You may not use this file except in compliance with the License.
-#
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-#
-# Copyright (C) 2018 Scylladb, Ltd.
-#
-
-find_package (PkgConfig)
-
-pkg_check_modules (PC_Lz4 QUIET liblz4)
-
-find_path (Lz4_INCLUDE_DIR
- NAMES lz4.h
- PATHS ${PC_Lz4_INCLUDE_DIRS})
-
-find_library (Lz4_LIBRARY
- NAMES lz4
- PATHS ${PC_Lz4_LIBRARY_DIRS})
-
-set (Lz4_VERSION ${PC_Lz4_VERSION})
-
-include (FindPackageHandleStandardArgs)
-
-find_package_handle_standard_args (Lz4
- FOUND_VAR Lz4_FOUND
- REQUIRED_VARS
- Lz4_LIBRARY
- Lz4_INCLUDE_DIR
- VERSION_VAR Lz4_VERSION)
-
-if (Lz4_FOUND)
- set (Lz4_LIBRARIES ${Lz4_LIBRARY})
- set (Lz4_INCLUDE_DIRS ${Lz4_INCLUDE_DIR})
- set (Lz4_DEFINITIONS ${PC_Lz4_CFLAGS_OTHER})
-endif ()
-
-if (Lz4_FOUND AND NOT TARGET Lz4::lz4)
- add_library (Lz4::lz4 UNKNOWN IMPORTED)
-
- set_target_properties (Lz4::lz4 PROPERTIES
- IMPORTED_LOCATION "${Lz4_LIBRARY}"
- INTERFACE_COMPILE_OPTIONS "${PC_Lz4_CFLAGS_OTHER}"
- INTERFACE_INCLUDE_DIRECTORIES "${Lz4_INCLUDE_DIR}")
-endif ()
diff --git a/cmake/FindYaml-cpp.cmake b/cmake/FindYaml-cpp.cmake
deleted file mode 100644
index 512eaa45..00000000
--- a/cmake/FindYaml-cpp.cmake
+++ /dev/null
@@ -1,59 +0,0 @@
-#
-# This file is open source software, licensed to you under the terms
-# of the Apache License, Version 2.0 (the "License"). See the NOTICE file
-# distributed with this work for additional information regarding copyright
-# ownership. You may not use this file except in compliance with the License.
-#
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-#
-# Copyright (C) 2018 Scylladb, Ltd.
-#
-
-find_package (PkgConfig)
-
-pkg_check_modules (PC_Yaml-cpp QUIET yaml-cpp)
-
-find_path (Yaml-cpp_INCLUDE_DIR
- NAMES yaml-cpp/yaml.h
- PATHS ${PC_Yaml-cpp_INCLUDE_DIRS})
-
-find_library (Yaml-cpp_LIBRARY
- NAMES yaml-cpp
- PATHS ${PC_Yaml-cpp_LIBRARY_DIRS})
-
-set (Yaml-cpp_VERSION ${PC_Yaml-cpp_VERSION})
-
-include (FindPackageHandleStandardArgs)
-
-find_package_handle_standard_args (Yaml-cpp
- FOUND_VAR Yaml-cpp_FOUND
- REQUIRED_VARS
- Yaml-cpp_LIBRARY
- Yaml-cpp_INCLUDE_DIR
- VERSION_VAR Yaml-cpp_VERSION)
-
-if (Yaml-cpp_FOUND)
- set (Yaml-cpp_LIBRARIES ${Yaml-cpp_LIBRARY})
- set (Yaml-cpp_INCLUDE_DIRS ${Yaml-cpp_INCLUDE_DIR})
- set (Yaml-cpp_DEFINITIONS ${PC_Yaml-cpp_CFLAGS_OTHER})
-endif ()
-
-if (Yaml-cpp_FOUND AND NOT TARGET Yaml-cpp::yaml-cpp)
- add_library (Yaml-cpp::yaml-cpp UNKNOWN IMPORTED)
-
- set_target_properties (Yaml-cpp::yaml-cpp PROPERTIES
- IMPORTED_LOCATION "${Yaml-cpp_LIBRARY}"
- INTERFACE_COMPILE_OPTIONS "${PC_Yaml-cpp_CFLAGS_OTHER}"
- INTERFACE_INCLUDE_DIRECTORIES "${Yaml-cpp_INCLUDE_DIR}")
-endif ()
diff --git a/configure.py b/configure.py
index 22ec5bb8..1949a490 100755
--- a/configure.py
+++ b/configure.py
@@ -19,7 +19,6 @@
import os, os.path, textwrap, argparse, sys, shlex, subprocess, tempfile, re
import distutils.dir_util
import distutils.spawn
-import seastar_cmake

configure_args = str.join(' ', [shlex.quote(x) for x in sys.argv[1:]])

@@ -377,53 +376,8 @@ add_tristate(arg_parser, name = 'exception-scalability-workaround', dest='except
arg_parser.add_argument('--allocator-page-size', dest='allocator_page_size', type=int, help='override allocator page size')
arg_parser.add_argument('--protoc-compiler', action = 'store', dest='protoc', default='protoc',
help = 'Path to protoc compiler, the default is protoc')
-arg_parser.add_argument('--cmake', dest='cmake', action='store_true',
- help='Use CMake as the underlying build-sytem')
-arg_parser.add_argument('--without-tests', dest='exclude_tests', action='store_true', help='Do not build tests by default (CMake only)')
-arg_parser.add_argument('--without-apps', dest='exclude_apps', action='store_true', help='Do not build applications by default (CMake only)')
args = arg_parser.parse_args()

-# Forwarding to CMake.
-if args.cmake:
- MODES = seastar_cmake.SUPPORTED_MODES if args.mode is 'all' else [args.mode]
-
- # For convenience.
- tr = seastar_cmake.translate_arg
-
- def configure_mode(mode):
- BUILD_PATH = seastar_cmake.BUILD_PATHS[mode]
-
- TRANSLATED_ARGS = [
- '-DCMAKE_BUILD_TYPE={}'.format(mode.title()),
- '-DCMAKE_C_COMPILER={}'.format(args.cc),
- '-DCMAKE_CXX_COMPILER={}'.format(args.cxx),
- tr(args.exclude_tests, 'EXCLUDE_TESTS_BY_DEFAULT'),
- tr(args.exclude_apps, 'EXCLUDE_APPS_BY_DEFAULT'),
- tr(args.user_cflags, 'USER_CXXFLAGS'),
- tr(args.user_ldflags, 'USER_LDFLAGS'),
- tr(args.user_optflags, 'CXX_OPTIMIZATION_FLAGS'),
- tr(args.cpp_dialect, 'CXX_DIALECT'),
- tr(args.dpdk, 'ENABLE_DPDK'),
- tr(args.staticboost, 'LINK_STATIC_BOOST'),
- tr(args.staticyamlcpp, 'LINK_STATIC_YAML_CPP'),
- tr(args.hwloc, 'ENABLE_HWLOC'),
- tr(args.gcc6_concepts, 'ENABLE_GCC6_CONCEPTS'),
- tr(args.alloc_failure_injector, 'ENABLE_ALLOC_FAILURE_INJECTOR'),
- tr(args.exception_workaround, 'ENABLE_EXCEPTION_SCALABILITY_WORKAROUND'),
- tr(args.allocator_page_size, 'ALLOCATOR_PAGE_SIZE'),
- ]
-
- # Generate a new build by pointing to the source directory.
- ARGS = seastar_cmake.CMAKE_BASIC_ARGS + [seastar_cmake.ROOT_PATH] + TRANSLATED_ARGS
- print(ARGS)
- distutils.dir_util.mkpath(BUILD_PATH)
- subprocess.check_call(ARGS, shell=False, cwd=BUILD_PATH)
-
- for mode in MODES:
- configure_mode(mode)
-
- sys.exit(0)
-
libnet = [
'net/proxy.cc',
'net/virtio.cc',
diff --git a/http/CMakeLists.txt b/http/CMakeLists.txt
deleted file mode 100644
index 72d26077..00000000
--- a/http/CMakeLists.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-seastar_ragel_generate (http_response_parser.rl SEASTAR_HTTP_RESPONSE_PARSER_HEADER)
-add_custom_target (seastar-http-response-parser SOURCES ${SEASTAR_HTTP_RESPONSE_PARSER_HEADER})
-
-seastar_ragel_generate (request_parser.rl SEASTAR_HTTP_REQUEST_PARSER_HEADER)
-add_custom_target (seastar-http-request-parser SOURCES ${SEASTAR_HTTP_REQUEST_PARSER_HEADER})
diff --git a/proto/CMakeLists.txt b/proto/CMakeLists.txt
deleted file mode 100644
index f114322d..00000000
--- a/proto/CMakeLists.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-protobuf_generate_cpp (sources headers metrics2.proto)
-
-add_library (seastar-protobuf OBJECT
- ${sources}
- ${headers})
-
-target_include_directories (seastar-protobuf PUBLIC ${PROTOBUF_INCLUDE_DIRS})
diff --git a/seastar_cmake.py b/seastar_cmake.py
deleted file mode 100644
index afa39918..00000000
--- a/seastar_cmake.py
+++ /dev/null
@@ -1,39 +0,0 @@
-# This file is open source software, licensed to you under the terms
-# of the Apache License, Version 2.0 (the "License"). See the NOTICE file
-# distributed with this work for additional information regarding copyright
-# ownership. You may not use this file except in compliance with the License.
-#
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-import os
-
-SUPPORTED_MODES = ['release', 'debug']
-
-ROOT_PATH = os.path.realpath(os.path.dirname(__file__))
-
-BUILD_PATHS = { mode: os.path.join(ROOT_PATH, 'build', mode) for mode in SUPPORTED_MODES }
-
-CMAKE_BASIC_ARGS = ['cmake', '-G', 'Ninja']
-
-def translate_arg(arg, new_name, value_when_none='no'):
- """
- Translate a value populated from the command-line into a name to pass to the invocation of CMake.
- """
- if arg is None:
- value = value_when_none
- elif type(arg) is bool:
- value = 'yes' if arg else 'no'
- else:
- value = arg
-
- return '-DSEASTAR_{}={}'.format(new_name, value)
diff --git a/test.py b/test.py
index 3cbba412..16eb6bcd 100755
--- a/test.py
+++ b/test.py
@@ -22,7 +22,6 @@ import argparse
import subprocess
import signal
import re
-import seastar_cmake

boost_tests = [
'alloc_test',
@@ -92,44 +91,7 @@ if __name__ == "__main__":
parser.add_argument('--jenkins', action="store",help="jenkins output file prefix")
parser.add_argument('--verbose', '-v', action = 'store_true', default = False,
help = 'Verbose reporting')
- parser.add_argument('--cmake', action='store_true', help='Use the CMake test-runner (CTest)')
args = parser.parse_args()
-
- # Forwarding to CMake.
- if args.cmake:
- MODES = [args.mode] if args.mode else seastar_cmake.SUPPORTED_MODES
-
- def run_tests(mode):
- BUILD_PATH = seastar_cmake.BUILD_PATHS[mode]
-
- # For convenience.
- tr = seastar_cmake.translate_arg
-
- TRANSLATED_CMAKE_ARGS = [
- tr(args.fast, 'EXECUTE_ONLY_FAST_TESTS'),
- tr(args.jenkins, 'JENKINS', value_when_none=''),
- ]
-
- # Modify the existing build by pointing to the build directory.
- CMAKE_ARGS = seastar_cmake.CMAKE_BASIC_ARGS + [BUILD_PATH] + TRANSLATED_CMAKE_ARGS
- print(CMAKE_ARGS)
- subprocess.check_call(CMAKE_ARGS, shell=False, cwd=BUILD_PATH)
-
- TRANSLATED_CTEST_ARGS = [
- '--timeout', args.timeout
- ] + ['--verbose'] if args.verbose else [
- ] + ['-R', args.name] if args.name else [
- ]
-
- CTEST_ARGS = ['ctest', BUILD_PATH] + TRANSLATED_CTEST_ARGS
- print(CTEST_ARGS)
- subprocess.check_call(CTEST_ARGS, shell=False, cwd=BUILD_PATH)
-
- for mode in MODES:
- run_tests(mode)
-
- sys.exit(0)
-
print_status = print_status_verbose if args.verbose else print_status_short

# Run on 2 shard - it should be enough
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
deleted file mode 100644
index 70da55ce..00000000
--- a/tests/CMakeLists.txt
+++ /dev/null
@@ -1,311 +0,0 @@
-#
-# This file is open source software, licensed to you under the terms
-# of the Apache License, Version 2.0 (the "License"). See the NOTICE file
-# distributed with this work for additional information regarding copyright
-# ownership. You may not use this file except in compliance with the License.
-#
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-#
-# Copyright (C) 2018 Scylladb, Ltd.
-#
-
-add_library (seastar-testing
- test-utils.cc
- test_runner.cc)
-
-target_include_directories (seastar-testing PUBLIC
- $<TARGET_PROPERTY:seastar,INCLUDE_DIRECTORIES>)
-
-if (NOT ${SEASTAR_LINK_STATIC_BOOST})
- target_compile_definitions (seastar-testing PUBLIC
- BOOST_TEST_DYN_LINK)
-endif ()
-
-# Logical target for all tests.
-add_custom_target (tests)
-# Logical target for all tests with debugging symbols.
-add_custom_target (tests_debug)
-set_target_properties (tests_debug PROPERTIES EXCLUDE_FROM_ALL ON)
-
-# ADD_SEASTAR_TEST NAME $name [CUSTOM] [SUITE] SOURCES $source_1 $source_2 ... $source_n ARGS $arg_1 $arg_2 ... $arg_n)
-#
-# Define a unit test with name `name`. This defines a build target with `name`.
-#
-# If CUSTOM is included, then the test doesn't link against the Seastar testing libraries.
-#
-# if SUITE is included, the test is automatically run as part of the test suite (and in Jenkins).
-#
-# SOURCES are the source files necessary for the test.
-#
-# ARGS are additional arguments that the executable should be invoked with when the test is run.
-function (add_seastar_test)
- set (options CUSTOM SUITE)
- set (one_value_args NAME)
- set (multi_value_args SOURCES ARGS)
- cmake_parse_arguments (args "${options}" "${one_value_args}" "${multi_value_args}" "${ARGN}")
-
- macro (prepare name)
- add_executable (${name} "${args_SOURCES}")
-
- target_link_libraries (${name} PUBLIC
- -Wl,--whole-archive seastar -Wl,--no-whole-archive
- Boost::unit_test_framework)
-
- if (NOT "${args_CUSTOM}")
- target_link_libraries (${name} PUBLIC
- -Wl,--whole-archive seastar-testing -Wl,--no-whole-archive)
- endif ()
- endmacro ()
-
- prepare (${args_NAME})
- add_dependencies (tests ${args_NAME})
- # Strip symbols.
- target_link_libraries (${args_NAME} PUBLIC -s)
-
- if ("${args_SUITE}")
- if ((NOT ("${SEASTAR_JENKINS}" STREQUAL "")) AND (NOT "${args_CUSTOM}"))
- string (TOLOWER ${CMAKE_BUILD_TYPE} jenkins_mode)
- set (jenkins_file_name "${SEASTAR_JENKINS}.${jenkins_mode}.${args_NAME}.boost.xml")
- set (jenkins_args --output_format=XML --log_level=all --report_level=no --log_sink=${jenkins_file_name})
- set (args_ARGS -- "${args_ARGS}")
- endif ()
-
- add_test (
- NAME ${args_NAME}
- COMMAND ${args_NAME} ${jenkins_args} ${args_ARGS}
- WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/..")
- endif ()
-
- set (name_with_symbols "${args_NAME}_g")
- prepare (${name_with_symbols})
- add_dependencies (tests_debug ${name_with_symbols})
- set_target_properties (${name_with_symbols} PROPERTIES EXCLUDE_FROM_ALL ON)
-endfunction ()
-
-#
-# Certificates for TLS tests.
-#
-
-configure_file (catest.key . COPYONLY)
-configure_file (catest.pem . COPYONLY)
-configure_file (tls-ca-bundle.pem . COPYONLY)
-configure_file (test.crl . COPYONLY)
-configure_file (test.crt . COPYONLY)
-configure_file (test.csr . COPYONLY)
-configure_file (test.key . COPYONLY)
-
-add_seastar_test (NAME abort_source_test
- SUITE
- SOURCES abort_source_test.cc)
-
-add_seastar_test (NAME alloc_test
- SUITE
- SOURCES alloc_test.cc)
-
-add_seastar_test (NAME alien_test
- SUITE
- CUSTOM
- SOURCES alien_test.cc)
-
-if (${SEASTAR_EXECUTE_ONLY_FAST_TESTS})
- if (${CMAKE_BUILD_TYPE} STREQUAL Debug)
- set (allocator_test_args --iterations 5)
- else ()
- set (allocator_test_args --time 0.1)
- endif ()
-endif ()
-add_seastar_test (NAME allocator_test
- ARGS "${allocator_test_args}"
- SUITE
- CUSTOM
- SOURCES allocator_test.cc)
-
-add_seastar_test (NAME blkdiscard_test
- CUSTOM
- SOURCES blkdiscard_test.cc)
-
-add_seastar_test (NAME checked_ptr_test
- CUSTOM
- SOURCES checked_ptr_test.cc)
-
-add_seastar_test (NAME chunked_fifo_test
- CUSTOM SOURCES
- chunked_fifo_test.cc)
-
-add_seastar_test (NAME circular_buffer_test
- CUSTOM
- SOURCES circular_buffer_test.cc)
-
-add_seastar_test (NAME connect_test
- SUITE
- SOURCES connect_test.cc)
-
-add_seastar_test (NAME defer_test
- SUITE
- CUSTOM
- SOURCES defer_test.cc)
-
-add_seastar_test (NAME directory_test
- SUITE
- CUSTOM
- SOURCES directory_test.cc)
-
-add_seastar_test (NAME distributed_test
- ARGS -c 2
- SUITE
- CUSTOM
- SOURCES distributed_test.cc)
-
-add_seastar_test (NAME dns_test
- SOURCES dns_test.cc)
-
-add_seastar_test (NAME echo_test
- CUSTOM
- SOURCES echotest.cc)
-
-add_seastar_test (NAME execution_stage_test
- SUITE
- SOURCES execution_stage_test.cc)
-
-add_seastar_test (NAME expiring_fifo_test
- SUITE
- SOURCES expiring_fifo_test.cc)
-
-add_seastar_test (NAME fair_queue_test
- SUITE
- SOURCES fair_queue_test.cc)
-
-add_seastar_test (NAME file_io_test
- SOURCES fileiotest.cc)
-
-add_seastar_test (NAME foreign_ptr_test
- SUITE SOURCES foreign_ptr_test.cc)
-
-add_seastar_test (NAME fstream_test
- SUITE
- SOURCES fstream_test.cc)
-
-add_seastar_test (NAME futures_test
- SUITE
- SOURCES futures_test.cc)
-
-add_seastar_test (NAME httpd_test
- SUITE
- SOURCES httpd.cc)
-
-add_seastar_test (NAME ip_test
- CUSTOM
- SOURCES ip_test.cc)
-
-add_seastar_test (NAME json_formatter_test
- SUITE
- SOURCES json_formatter_test.cc)
-
-add_seastar_test (NAME l3_test
- CUSTOM
- SOURCES l3_test.cc)
-
-add_seastar_test (NAME lowres_clock_test
- SUITE
- SOURCES lowres_clock_test.cc)
-
-add_seastar_test (NAME noncopyable_function_test
- SUITE
- CUSTOM
- SOURCES noncopyable_function_test.cc)
-
-add_seastar_test (NAME output_stream_test
- SOURCES output_stream_test.cc)
-
-add_seastar_test (NAME packet_test
- SUITE
- CUSTOM SOURCES packet_test.cc)
-
-add_seastar_test (NAME program_options_test
- SUITE
- CUSTOM
- SOURCES program_options_test.cc)
-
-add_seastar_test (NAME rpc_test
- SUITE
- SOURCES rpc_test.cc)
-
-add_seastar_test (NAME scheduling_group_demo
- CUSTOM
- SOURCES scheduling_group_demo.cc)
-
-add_seastar_test (NAME semaphore_test
- SUITE
- SOURCES semaphore_test.cc)
-
-add_seastar_test (NAME shared_ptr_test
- SUITE
- CUSTOM
- SOURCES shared_ptr_test.cc)
-
-add_seastar_test (NAME slab_test
- CUSTOM
- SOURCES slab_test.cc)
-
-add_seastar_test (NAME smp_test
- SUITE
- CUSTOM
- SOURCES smp_test.cc)
-
-add_seastar_test (NAME sstring_test
- SUITE
- CUSTOM
- SOURCES sstring_test.cc)
-
-add_seastar_test (NAME tcp_test
- CUSTOM
- SOURCES tcp_test.cc)
-
-add_seastar_test (NAME thread_test
- SUITE
- SOURCES thread_test.cc)
-
-add_seastar_test (NAME thread_context_switch_test
- SUITE
- CUSTOM
- SOURCES thread_context_switch.cc)
-
-add_seastar_test (NAME timer_test
- SUITE
- CUSTOM
- SOURCES timertest.cc)
-
-add_seastar_test (NAME tls_test SUITE
- SOURCES tls_test.cc)
-
-add_seastar_test (NAME tuple_utils_test
- SUITE
- CUSTOM
- SOURCES tuple_utils_test)
-
-add_seastar_test (NAME unwind_test
- CUSTOM
- SOURCES unwind_test.cc)
-
-add_seastar_test (NAME weak_ptr_test
- SUITE
- CUSTOM
- SOURCES weak_ptr_test.cc)
-
-# Disable false positive due to new (with_alignment(...)).
-set (CTEST_ENVIRONMENT
- ASAN_OPTIONS='alloc_dealloc_mismatch=0')
-
-add_subdirectory (perf)
-add_subdirectory (memcached)
diff --git a/tests/memcached/CMakeLists.txt b/tests/memcached/CMakeLists.txt
deleted file mode 100644
index 132b8d9f..00000000
--- a/tests/memcached/CMakeLists.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-#
-# This file is open source software, licensed to you under the terms
-# of the Apache License, Version 2.0 (the "License"). See the NOTICE file
-# distributed with this work for additional information regarding copyright
-# ownership. You may not use this file except in compliance with the License.
-#
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-#
-# Copyright (C) 2018 Scylladb, Ltd.
-#
-
-if (${SEASTAR_EXECUTE_ONLY_FAST_TESTS})
- set (fast --fast)
-else ()
- set (fast "")
-endif()
-
-# Special case dependency since `memcached_test` depends on the `memcached` target being built.
-add_dependencies (tests memcached)
-
-add_test (
- NAME memcached_test
- COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/test.py" ${fast} --memcached $<TARGET_FILE:memcached>)
-
-add_seastar_test (NAME memcached_ascii_parser_test
- SUITE
- SOURCES test_ascii_parser.cc)
-
-add_dependencies (memcached_ascii_parser_test memcached)
diff --git a/tests/perf/CMakeLists.txt b/tests/perf/CMakeLists.txt
deleted file mode 100644
index 17d4b7b6..00000000
--- a/tests/perf/CMakeLists.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-add_library (seastar-perf-testing
- perf_tests.hh perf_tests.cc)
-
-target_include_directories (seastar-perf-testing PUBLIC
- $<TARGET_PROPERTY:seastar,INCLUDE_DIRECTORIES>)
-
-if (NOT ${SEASTAR_LINK_STATIC_BOOST})
- target_compile_definitions (seastar-perf-testing PUBLIC
- BOOST_TEST_DYN_LINK)
-endif ()
-
-# ADD_SEASTAR_PERF_TEST NAME $name SOURCES $source_1 $source_2 ... $source_n)
-function (add_seastar_perf_test)
- set (options "")
- set (one_value_args NAME)
- set (multi_value_args SOURCES)
- cmake_parse_arguments (args "${options}" "${one_value_args}" "${multi_value_args}" "${ARGN}")
-
- add_executable (${args_NAME} "${args_SOURCES}")
-
- target_link_libraries (${args_NAME} PUBLIC
- -Wl,--whole-archive seastar seastar-perf-testing -Wl,--no-whole-archive
- # Strip symbols.
- -s)
-endfunction ()
-
-add_seastar_perf_test (NAME perf_future_util
- SOURCES perf_future_util.cc)
--
2.17.1

Jesse Haber-Kucharsky

<jhaberku@scylladb.com>
unread,
Aug 3, 2018, 6:15:22 PM8/3/18
to seastar-dev@googlegroups.com, Jesse Haber-Kucharsky
We will follow a standard MAJOR.MINOR.PATCH scheme, where the major
version is incremented when a change is backwards-incompatible.

The reason for incrementing the version now is so that if a development
version of Seastar is installed in a system, then it will have a higher
version number than a released version of Seastar.

Once a release is actually made, the major version increment can be
changed to a minor one (depending on the scope of changes since the last
release).

Signed-off-by: Jesse Haber-Kucharsky <jhab...@scylladb.com>
---
configure.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.py b/configure.py
index 1949a490..5915ba17 100755
--- a/configure.py
+++ b/configure.py
@@ -945,7 +945,7 @@ with open(buildfile, 'w') as f:
Name: Seastar
URL: http://seastar-project.org/
Description: Advanced C++ framework for high-performance server applications on modern hardware.
- Version: 1.0
+ Version: 2.0.0
Libs: -L$full_builddir/{mode} -L$full_builddir/{mode}/fmt/fmt -Wl,--whole-archive,-lseastar,--no-whole-archive -lfmt $cxxflags $cxflags_{mode} -Wl,--no-as-needed {static} {pie} {user_ldflags} {sanitize_libs} {libs}
Cflags: $cxxflags $cxxflags_{mode}
''').format(**vars)
--
2.17.1

Jesse Haber-Kucharsky

<jhaberku@scylladb.com>
unread,
Aug 3, 2018, 6:15:24 PM8/3/18
to seastar-dev@googlegroups.com, Jesse Haber-Kucharsky
This is useful for avoiding ambiguity with directory names on
case-insensitive file-systems, gives some flexibility with
text-formatting, and lastly improves consistency with other text files
in the repository.

Signed-off-by: Jesse Haber-Kucharsky <jhab...@scylladb.com>
---
LICENSE => LICENSE.md | 0
NOTICE => NOTICE.md | 0
2 files changed, 0 insertions(+), 0 deletions(-)
rename LICENSE => LICENSE.md (100%)
rename NOTICE => NOTICE.md (100%)

diff --git a/LICENSE b/LICENSE.md
similarity index 100%
rename from LICENSE
rename to LICENSE.md
diff --git a/NOTICE b/NOTICE.md
similarity index 100%
rename from NOTICE
rename to NOTICE.md
--
2.17.1

Jesse Haber-Kucharsky

<jhaberku@scylladb.com>
unread,
Aug 3, 2018, 6:15:25 PM8/3/18
to seastar-dev@googlegroups.com, Jesse Haber-Kucharsky
It is important to differentiate public interface files and private
implementation details.

To that end, we move public headers to the `include` directory and move
all source files and implementation-internal header files to the `src`
directory.

This change has the following benefits:

- Clear separation between the public and private interface (check the
location of the file). This can help with over-inclusion of headers
and help to make future improvements in compilation time

- It is easy to know which source files should be installed on the
system (all files in the `include` directory) by build-system or
packaging tools

There are (beneficial) side-effects:

- All public header files now must be included with a prefix of
"seastar", like

#include <seastar/core/future.hh>

instead of

#include <core/future.hh>

This is helpful for making it clear in client applications (or
library) which header files belong to Seastar.

- In the implementation of Seastar itself, all public header files are
included with an absolute path relative to the `include` directory and
with <>-delimiters, including those in the same directory. This
eliminates ambiguity about the location of a header file and that it
is public.

- In the implementation of Seastar itself, all private header files are
included with an absolute path relative to the `src` directory and
with ""-delimiters, including those in the same directory. Like with
public header files, this eliminates ambiguity about the location of
the file on disk and also reinforces that the file is private.

Signed-off-by: Jesse Haber-Kucharsky <jhab...@scylladb.com>
---
apps/httpd/main.cc | 12 +-
apps/io_tester/io_tester.cc | 20 +--
apps/iotune/iotune.cc | 22 +--
apps/memcached/ascii.rl | 2 +-
apps/memcached/memcache.cc | 33 ++---
apps/memcached/memcached.hh | 2 +-
apps/seawreck/seawreck.cc | 16 +--
configure.py | 134 +++++++++---------
{http => gen/http}/http_response_parser.rl | 2 +-
{http => gen/http}/request_parser.rl | 4 +-
{json => gen}/json2code.py | 5 +-
{proto => gen/proto}/metrics2.proto | 0
.../seastar/core}/abort_source.hh | 6 +-
{core => include/seastar/core}/alien.hh | 8 +-
{core => include/seastar/core}/align.hh | 0
.../seastar/core}/aligned_buffer.hh | 2 +-
.../seastar/core}/app-template.hh | 4 +-
{core => include/seastar/core}/apply.hh | 0
{core => include/seastar/core}/array_map.hh | 0
{core => include/seastar/core}/bitops.hh | 0
{core => include/seastar/core}/bitset-iter.hh | 0
{core => include/seastar/core}/byteorder.hh | 2 +-
{core => include/seastar/core}/cacheline.hh | 0
{core => include/seastar/core}/checked_ptr.hh | 2 +-
.../seastar/core}/chunked_fifo.hh | 0
.../seastar/core}/circular_buffer.hh | 4 +-
.../core}/circular_buffer_fixed_capacity.hh | 0
.../seastar/core}/condition-variable.hh | 4 +-
{core => include/seastar/core}/deleter.hh | 0
{core => include/seastar/core}/distributed.hh | 2 +-
{core => include/seastar/core}/do_with.hh | 4 +-
{core => include/seastar/core}/dpdk_rte.hh | 0
{core => include/seastar/core}/enum.hh | 0
.../seastar/core}/exception_hacks.hh | 0
.../seastar/core}/execution_stage.hh | 24 ++--
.../seastar/core}/expiring_fifo.hh | 10 +-
{core => include/seastar/core}/fair_queue.hh | 12 +-
{core => include/seastar/core}/file.hh | 12 +-
{core => include/seastar/core}/fsqual.hh | 2 +-
{core => include/seastar/core}/fstream.hh | 6 +-
.../seastar/core}/function_traits.hh | 0
{core => include/seastar/core}/future-util.hh | 16 +--
{core => include/seastar/core}/future.hh | 14 +-
{core => include/seastar/core}/gate.hh | 2 +-
.../seastar/core}/iostream-impl.hh | 8 +-
{core => include/seastar/core}/iostream.hh | 6 +-
{core => include/seastar/core}/linux-aio.hh | 0
.../seastar/core}/lowres_clock.hh | 4 +-
.../seastar/core}/manual_clock.hh | 0
{core => include/seastar/core}/memory.hh | 4 +-
{core => include/seastar/core}/metrics.hh | 8 +-
{core => include/seastar/core}/metrics_api.hh | 4 +-
.../seastar/core}/metrics_registration.hh | 0
.../seastar/core}/metrics_types.hh | 0
{core => include/seastar/core}/pipe.hh | 4 +-
{core => include/seastar/core}/posix.hh | 4 +-
{core => include/seastar/core}/preempt.hh | 0
{core => include/seastar/core}/prefetch.hh | 4 +-
{core => include/seastar/core}/print.hh | 2 +-
{core => include/seastar/core}/prometheus.hh | 2 +-
{core => include/seastar/core}/queue.hh | 4 +-
{core => include/seastar/core}/ragel.hh | 8 +-
{core => include/seastar/core}/reactor.hh | 56 ++++----
.../seastar/core}/report_exception.hh | 0
{core => include/seastar/core}/resource.hh | 0
{core => include/seastar/core}/rwlock.hh | 2 +-
.../seastar/core}/scattered_message.hh | 8 +-
{core => include/seastar/core}/scheduling.hh | 2 +-
{core => include/seastar/core}/scollectd.hh | 16 +--
{http => include/seastar/http}/httpd.hh | 22 +--
{http => include/seastar/http}/json_path.hh | 8 +-
{http => include/seastar/http}/matcher.hh | 4 +-
{http => include/seastar/http}/matchrules.hh | 8 +-
{http => include/seastar/http}/mime_types.hh | 2 +-
{http => include/seastar/http}/reply.hh | 10 +-
{http => include/seastar/http}/request.hh | 4 +-
{http => include/seastar/http}/routes.hh | 10 +-
.../seastar/http}/transformers.hh | 4 +-
{json => include/seastar/json}/formatter.hh | 4 +-
.../seastar/json}/json_elements.hh | 6 +-
{net => include/seastar/net}/api.hh | 14 +-
{net => include/seastar/net}/arp.hh | 10 +-
{net => include/seastar/net}/byteorder.hh | 2 +-
{net => include/seastar/net}/config.hh | 0
{net => include/seastar/net}/const.hh | 0
{net => include/seastar/net}/dhcp.hh | 4 +-
{net => include/seastar/net}/dns.hh | 8 +-
{net => include/seastar/net}/dpdk.hh | 6 +-
{net => include/seastar/net}/ethernet.hh | 4 +-
{net => include/seastar/net}/inet_address.hh | 4 +-
{net => include/seastar/net}/ip.hh | 22 +--
{net => include/seastar/net}/ip_checksum.hh | 2 +-
{net => include/seastar/net}/native-stack.hh | 2 +-
{net => include/seastar/net}/net.hh | 18 +--
.../seastar/net}/packet-data-source.hh | 4 +-
{net => include/seastar/net}/packet-util.hh | 2 +-
{net => include/seastar/net}/packet.hh | 6 +-
{net => include/seastar/net}/posix-stack.hh | 6 +-
{net => include/seastar/net}/proxy.hh | 4 +-
{net => include/seastar/net}/socket_defs.hh | 2 +-
{net => include/seastar/net}/stack.hh | 2 +-
{net => include/seastar/net}/tcp-stack.hh | 2 +-
{net => include/seastar/net}/tcp.hh | 22 +--
{net => include/seastar/net}/tls.hh | 8 +-
{net => include/seastar/net}/toeplitz.hh | 0
{net => include/seastar/net}/udp.hh | 10 +-
.../seastar/net}/virtio-interface.hh | 0
{net => include/seastar/net}/virtio.hh | 4 +-
.../seastar/rpc}/lz4_compressor.hh | 4 +-
.../rpc}/multi_algo_compressor_factory.hh | 4 +-
{rpc => include/seastar/rpc}/rpc.hh | 26 ++--
{rpc => include/seastar/rpc}/rpc_impl.hh | 16 +--
{rpc => include/seastar/rpc}/rpc_types.hh | 10 +-
.../seastar/util}/alloc_failure_injector.hh | 2 +-
{util => include/seastar/util}/backtrace.hh | 4 +-
{util => include/seastar/util}/bool_class.hh | 0
{util => include/seastar/util}/conversions.hh | 0
{util => include/seastar/util}/defer.hh | 0
{util => include/seastar/util}/eclipse.hh | 0
.../seastar/util}/function_input_iterator.hh | 0
.../seastar/util}/gcc6-concepts.hh | 0
{util => include/seastar/util}/indirect.hh | 0
.../seastar/util}/is_smart_ptr.hh | 0
{util => include/seastar/util}/lazy.hh | 0
{util => include/seastar/util}/log-cli.hh | 6 +-
{util => include/seastar/util}/log.hh | 2 +-
.../seastar/util}/noncopyable_function.hh | 0
.../seastar/util}/optimized_optional.hh | 4 +-
{util => include/seastar/util}/print_safe.hh | 0
.../seastar/util}/program-options.hh | 2 +-
.../seastar/util}/reference_wrapper.hh | 0
{util => include/seastar/util}/spinlock.hh | 0
.../seastar/util}/transform_iterator.hh | 0
{util => include/seastar/util}/tuple_utils.hh | 0
.../seastar/util}/variant_utils.hh | 0
{core => src/core}/alien.cc | 6 +-
{core => src/core}/app-template.cc | 14 +-
{core => src/core}/dpdk_rte.cc | 6 +-
{core => src/core}/exception_hacks.cc | 6 +-
{core => src/core}/execution_stage.cc | 4 +-
{core => src/core}/file-impl.hh | 4 +-
{core => src/core}/fsqual.cc | 8 +-
{core => src/core}/fstream.cc | 10 +-
{core => src/core}/future-util.cc | 4 +-
{core => src/core}/linux-aio.cc | 2 +-
{core => src/core}/memory.cc | 20 +--
{core => src/core}/metrics.cc | 4 +-
{core => src/core}/posix.cc | 4 +-
{core => src/core}/prometheus.cc | 12 +-
{core => src/core}/reactor.cc | 58 ++++----
{core => src/core}/resource.cc | 12 +-
{core => src/core}/scollectd-impl.hh | 6 +-
{core => src/core}/scollectd.cc | 11 +-
.../core}/systemwide_memory_barrier.cc | 6 +-
{core => src/core}/thread.cc | 4 +-
{http => src/http}/api_docs.cc | 14 +-
{http => src/http}/common.cc | 2 +-
{http => src/http}/file_handler.cc | 12 +-
{http => src/http}/httpd.cc | 20 +--
{http => src/http}/json_path.cc | 2 +-
{http => src/http}/matcher.cc | 2 +-
{http => src/http}/mime_types.cc | 2 +-
{http => src/http}/reply.cc | 6 +-
{http => src/http}/routes.cc | 8 +-
{http => src/http}/transformers.cc | 2 +-
{json => src/json}/formatter.cc | 4 +-
{json => src/json}/json_elements.cc | 2 +-
{net => src/net}/arp.cc | 2 +-
{net => src/net}/config.cc | 4 +-
{net => src/net}/dhcp.cc | 8 +-
{net => src/net}/dns.cc | 16 +--
{net => src/net}/dpdk.cc | 34 ++---
{net => src/net}/ethernet.cc | 2 +-
{net => src/net}/inet_address.cc | 8 +-
{net => src/net}/ip.cc | 12 +-
{net => src/net}/ip_checksum.cc | 4 +-
{net => src/net}/native-stack-impl.hh | 4 +-
{net => src/net}/native-stack.cc | 24 ++--
{net => src/net}/net.cc | 8 +-
{net => src/net}/packet.cc | 4 +-
{net => src/net}/posix-stack.cc | 8 +-
{net => src/net}/proxy.cc | 4 +-
{net => src/net}/stack.cc | 4 +-
{net => src/net}/tcp.cc | 12 +-
{net => src/net}/tls.cc | 14 +-
{net => src/net}/udp.cc | 4 +-
{net => src/net}/virtio.cc | 30 ++--
{rpc => src/rpc}/lz4_compressor.cc | 4 +-
{rpc => src/rpc}/rpc.cc | 2 +-
{util => src/util}/alloc_failure_injector.cc | 8 +-
{util => src/util}/backtrace.cc | 4 +-
{util => src/util}/conversions.cc | 4 +-
{util => src/util}/log.cc | 10 +-
{util => src/util}/program-options.cc | 2 +-
tests/abort_source_test.cc | 8 +-
tests/alien_test.cc | 8 +-
tests/alloc_test.cc | 6 +-
tests/allocator_test.cc | 4 +-
tests/blkdiscard_test.cc | 8 +-
tests/checked_ptr_test.cc | 4 +-
tests/chunked_fifo_test.cc | 4 +-
tests/circular_buffer_fixed_capacity_test.cc | 2 +-
tests/circular_buffer_test.cc | 2 +-
tests/connect_test.cc | 4 +-
tests/defer_test.cc | 2 +-
tests/directory_test.cc | 8 +-
tests/distributed_test.cc | 10 +-
tests/dns_test.cc | 14 +-
tests/echotest.cc | 8 +-
tests/execution_stage_test.cc | 6 +-
tests/expiring_fifo_test.cc | 6 +-
tests/fair_queue_test.cc | 16 +--
tests/fileiotest.cc | 14 +-
tests/foreign_ptr_test.cc | 10 +-
tests/fstream_test.cc | 16 +--
tests/futures_test.cc | 16 +--
tests/httpd.cc | 26 ++--
tests/ip_test.cc | 10 +-
tests/json_formatter_test.cc | 12 +-
tests/l3_test.cc | 6 +-
tests/linecount.cc | 8 +-
tests/loopback_socket.hh | 18 +--
tests/lowres_clock_test.cc | 6 +-
tests/memcached/test_ascii_parser.cc | 11 +-
tests/mock_file.hh | 2 +-
tests/netconfig_test.cc | 2 +-
tests/noncopyable_function_test.cc | 2 +-
tests/output_stream_test.cc | 14 +-
tests/packet_test.cc | 2 +-
tests/perf/perf_fstream.cc | 8 +-
tests/perf/perf_tests.cc | 4 +-
tests/perf/perf_tests.hh | 4 +-
tests/program_options_test.cc | 2 +-
tests/queue_test.cc | 6 +-
tests/rpc.cc | 10 +-
tests/rpc_test.cc | 12 +-
tests/scheduling_group_demo.cc | 12 +-
tests/semaphore_test.cc | 18 +--
tests/shared_ptr_test.cc | 4 +-
tests/slab_test.cc | 2 +-
tests/smp_test.cc | 6 +-
tests/sstring_test.cc | 2 +-
tests/tcp_sctp_client.cc | 6 +-
tests/tcp_sctp_server.cc | 8 +-
tests/tcp_test.cc | 6 +-
tests/test-utils.cc | 6 +-
tests/test-utils.hh | 2 +-
tests/test_runner.cc | 6 +-
tests/test_runner.hh | 4 +-
tests/thread_context_switch.cc | 12 +-
tests/thread_test.cc | 16 +--
tests/timertest.cc | 6 +-
tests/tls_echo_server.cc | 8 +-
tests/tls_echo_server.hh | 16 +--
tests/tls_simple_client.cc | 10 +-
tests/tls_test.cc | 18 +--
tests/tuple_utils_test.cc | 2 +-
tests/udp_client.cc | 8 +-
tests/udp_server.cc | 6 +-
tests/udp_zero_copy.cc | 12 +-
tests/unwind_test.cc | 6 +-
tests/weak_ptr_test.cc | 2 +-
297 files changed, 1031 insertions(+), 1027 deletions(-)
rename {http => gen/http}/http_response_parser.rl (98%)
rename {http => gen/http}/request_parser.rl (97%)
rename {json => gen}/json2code.py (99%)
rename {proto => gen/proto}/metrics2.proto (100%)
diff --git a/apps/httpd/main.cc b/apps/httpd/main.cc
index 8c76cfaf..39f5ab28 100644
--- a/apps/httpd/main.cc
+++ b/apps/httpd/main.cc
@@ -19,12 +19,12 @@
* Copyright 2015 Cloudius Systems
*/

-#include "http/httpd.hh"
-#include "http/handlers.hh"
-#include "http/function_handlers.hh"
-#include "http/file_handler.hh"
-#include "apps/httpd/demo.json.hh"
-#include "http/api_docs.hh"
+#include <seastar/http/httpd.hh>
+#include <seastar/http/handlers.hh>
+#include <seastar/http/function_handlers.hh>
+#include <seastar/http/file_handler.hh>
+#include <seastar/apps/httpd/demo.json.hh>
+#include <seastar/http/api_docs.hh>

namespace bpo = boost::program_options;

diff --git a/apps/io_tester/io_tester.cc b/apps/io_tester/io_tester.cc
index 44c7c94c..621fe6fa 100644
--- a/apps/io_tester/io_tester.cc
+++ b/apps/io_tester/io_tester.cc
@@ -18,16 +18,16 @@
/*
* Copyright (C) 2017 ScyllaDB
*/
-#include "core/app-template.hh"
-#include "core/distributed.hh"
-#include "core/reactor.hh"
-#include "core/future.hh"
-#include "core/shared_ptr.hh"
-#include "core/file.hh"
-#include "core/sleep.hh"
-#include "core/align.hh"
-#include "core/timer.hh"
-#include "core/thread.hh"
+#include <seastar/core/app-template.hh>
+#include <seastar/core/distributed.hh>
+#include <seastar/core/reactor.hh>
+#include <seastar/core/future.hh>
+#include <seastar/core/shared_ptr.hh>
+#include <seastar/core/file.hh>
+#include <seastar/core/sleep.hh>
+#include <seastar/core/align.hh>
+#include <seastar/core/timer.hh>
+#include <seastar/core/thread.hh>
#include <chrono>
#include <vector>
#include <boost/range/irange.hpp>
diff --git a/apps/iotune/iotune.cc b/apps/iotune/iotune.cc
index f55d5243..b0f4a86a 100644
--- a/apps/iotune/iotune.cc
+++ b/apps/iotune/iotune.cc
@@ -36,17 +36,17 @@
#include <experimental/filesystem>
#include <wordexp.h>
#include <yaml-cpp/yaml.h>
-#include "core/thread.hh"
-#include "core/sstring.hh"
-#include "core/posix.hh"
-#include "core/resource.hh"
-#include "core/aligned_buffer.hh"
-#include "core/sharded.hh"
-#include "core/app-template.hh"
-#include "core/shared_ptr.hh"
-#include "core/fsqual.hh"
-#include "util/defer.hh"
-#include "util/log.hh"
+#include <seastar/core/thread.hh>
+#include <seastar/core/sstring.hh>
+#include <seastar/core/posix.hh>
+#include <seastar/core/resource.hh>
+#include <seastar/core/aligned_buffer.hh>
+#include <seastar/core/sharded.hh>
+#include <seastar/core/app-template.hh>
+#include <seastar/core/shared_ptr.hh>
+#include <seastar/core/fsqual.hh>
+#include <seastar/util/defer.hh>
+#include <seastar/util/log.hh>

using namespace seastar;
using namespace std::chrono_literals;
diff --git a/apps/memcached/ascii.rl b/apps/memcached/ascii.rl
index fe5ad0a9..3e0c3e46 100644
--- a/apps/memcached/ascii.rl
+++ b/apps/memcached/ascii.rl
@@ -19,7 +19,7 @@
* Copyright (C) 2014 Cloudius Systems, Ltd.
*/

-#include "core/ragel.hh"
+#include <seastar/core/ragel.hh>
#include "apps/memcached/memcached.hh"
#include <memory>
#include <algorithm>
diff --git a/apps/memcached/memcache.cc b/apps/memcached/memcache.cc
index 4914739f..beed98e8 100644
--- a/apps/memcached/memcache.cc
+++ b/apps/memcached/memcache.cc
@@ -26,22 +26,23 @@
#include <boost/optional.hpp>
#include <iomanip>
#include <sstream>
-#include "core/app-template.hh"
-#include "core/future-util.hh"
-#include "core/timer-set.hh"
-#include "core/shared_ptr.hh"
-#include "core/stream.hh"
-#include "core/memory.hh"
-#include "core/units.hh"
-#include "core/distributed.hh"
-#include "core/vector-data-sink.hh"
-#include "core/bitops.hh"
-#include "core/slab.hh"
-#include "core/align.hh"
-#include "net/api.hh"
-#include "net/packet-data-source.hh"
-#include "apps/memcached/ascii.hh"
-#include "memcached.hh"
+#include <seastar/core/app-template.hh>
+#include <seastar/core/future-util.hh>
+#include <seastar/core/timer-set.hh>
+#include <seastar/core/shared_ptr.hh>
+#include <seastar/core/stream.hh>
+#include <seastar/core/memory.hh>
+#include <seastar/core/units.hh>
+#include <seastar/core/distributed.hh>
+#include <seastar/core/vector-data-sink.hh>
+#include <seastar/core/bitops.hh>
+#include <seastar/core/slab.hh>
+#include <seastar/core/align.hh>
+#include <seastar/net/api.hh>
+#include <seastar/net/packet-data-source.hh>
+// These two paths are non-conventional due to limitations in `configure.py`.
+#include <seastar/apps/memcached/ascii.hh>
+#include "apps/memcached/memcached.hh"
#include <unistd.h>

#define PLATFORM "seastar"
diff --git a/apps/memcached/memcached.hh b/apps/memcached/memcached.hh
index c1e68cf1..9a587578 100644
--- a/apps/memcached/memcached.hh
+++ b/apps/memcached/memcached.hh
@@ -18,7 +18,7 @@

#pragma once

-#include "core/sstring.hh"
+#include <seastar/core/sstring.hh>

namespace memcache {

diff --git a/apps/seawreck/seawreck.cc b/apps/seawreck/seawreck.cc
index 96bea9fd..b6a4be39 100644
--- a/apps/seawreck/seawreck.cc
+++ b/apps/seawreck/seawreck.cc
@@ -19,14 +19,14 @@
* Copyright (C) 2015 Cloudius Systems, Ltd.
*/

-#include "http/http_response_parser.hh"
-#include "core/print.hh"
-#include "core/reactor.hh"
-#include "core/app-template.hh"
-#include "core/future-util.hh"
-#include "core/distributed.hh"
-#include "core/semaphore.hh"
-#include "core/future-util.hh"
+#include <seastar/http/http_response_parser.hh>
+#include <seastar/core/print.hh>
+#include <seastar/core/reactor.hh>
+#include <seastar/core/app-template.hh>
+#include <seastar/core/future-util.hh>
+#include <seastar/core/distributed.hh>
+#include <seastar/core/semaphore.hh>
+#include <seastar/core/future-util.hh>
#include <chrono>

using namespace seastar;
diff --git a/configure.py b/configure.py
index 5915ba17..a0727780 100755
--- a/configure.py
+++ b/configure.py
@@ -379,75 +379,75 @@ arg_parser.add_argument('--protoc-compiler', action = 'store', dest='protoc', de
args = arg_parser.parse_args()

libnet = [
- 'net/proxy.cc',
- 'net/virtio.cc',
- 'net/dpdk.cc',
- 'net/ip.cc',
- 'net/ethernet.cc',
- 'net/arp.cc',
- 'net/native-stack.cc',
- 'net/ip_checksum.cc',
- 'net/udp.cc',
- 'net/tcp.cc',
- 'net/dhcp.cc',
- 'net/tls.cc',
- 'net/dns.cc',
- 'net/config.cc',
+ 'src/net/proxy.cc',
+ 'src/net/virtio.cc',
+ 'src/net/dpdk.cc',
+ 'src/net/ip.cc',
+ 'src/net/ethernet.cc',
+ 'src/net/arp.cc',
+ 'src/net/native-stack.cc',
+ 'src/net/ip_checksum.cc',
+ 'src/net/udp.cc',
+ 'src/net/tcp.cc',
+ 'src/net/dhcp.cc',
+ 'src/net/tls.cc',
+ 'src/net/dns.cc',
+ 'src/net/config.cc',
]

core = [
- 'core/reactor.cc',
- 'core/alien.cc',
- 'core/execution_stage.cc',
- 'core/systemwide_memory_barrier.cc',
- 'core/fstream.cc',
- 'core/posix.cc',
- 'core/memory.cc',
- 'core/resource.cc',
- 'core/scollectd.cc',
- 'core/metrics.cc',
- 'core/app-template.cc',
- 'core/thread.cc',
- 'core/dpdk_rte.cc',
- 'core/fsqual.cc',
- 'core/linux-aio.cc',
- 'util/conversions.cc',
- 'util/program-options.cc',
- 'util/log.cc',
- 'util/backtrace.cc',
- 'util/alloc_failure_injector.cc',
- 'net/packet.cc',
- 'net/posix-stack.cc',
- 'net/net.cc',
- 'net/stack.cc',
- 'net/inet_address.cc',
- 'rpc/rpc.cc',
- 'rpc/lz4_compressor.cc',
- 'core/exception_hacks.cc',
- 'core/future-util.cc',
+ 'src/core/reactor.cc',
+ 'src/core/alien.cc',
+ 'src/core/execution_stage.cc',
+ 'src/core/systemwide_memory_barrier.cc',
+ 'src/core/fstream.cc',
+ 'src/core/posix.cc',
+ 'src/core/memory.cc',
+ 'src/core/resource.cc',
+ 'src/core/scollectd.cc',
+ 'src/core/metrics.cc',
+ 'src/core/app-template.cc',
+ 'src/core/thread.cc',
+ 'src/core/dpdk_rte.cc',
+ 'src/core/fsqual.cc',
+ 'src/core/linux-aio.cc',
+ 'src/util/conversions.cc',
+ 'src/util/program-options.cc',
+ 'src/util/log.cc',
+ 'src/util/backtrace.cc',
+ 'src/util/alloc_failure_injector.cc',
+ 'src/net/packet.cc',
+ 'src/net/posix-stack.cc',
+ 'src/net/net.cc',
+ 'src/net/stack.cc',
+ 'src/net/inet_address.cc',
+ 'src/rpc/rpc.cc',
+ 'src/rpc/lz4_compressor.cc',
+ 'src/core/exception_hacks.cc',
+ 'src/core/future-util.cc',
]

protobuf = [
- 'proto/metrics2.proto',
+ 'gen/proto/metrics2.proto',
]

prometheus = [
- 'core/prometheus.cc',
+ 'src/core/prometheus.cc',
]

-http = ['http/transformers.cc',
- 'http/json_path.cc',
- 'http/file_handler.cc',
- 'http/common.cc',
- 'http/routes.cc',
- 'json/json_elements.cc',
- 'json/formatter.cc',
- 'http/matcher.cc',
- 'http/mime_types.cc',
- 'http/httpd.cc',
- 'http/reply.cc',
- 'http/request_parser.rl',
- 'http/api_docs.cc',
+http = ['src/http/transformers.cc',
+ 'src/http/json_path.cc',
+ 'src/http/file_handler.cc',
+ 'src/http/common.cc',
+ 'src/http/routes.cc',
+ 'src/json/json_elements.cc',
+ 'src/json/formatter.cc',
+ 'src/http/matcher.cc',
+ 'src/http/mime_types.cc',
+ 'src/http/httpd.cc',
+ 'src/http/reply.cc',
+ 'gen/http/request_parser.rl',
+ 'src/http/api_docs.cc',
]

boost_test_lib = [
@@ -529,7 +529,7 @@ deps = {
'tests/tcp_sctp_client': ['tests/tcp_sctp_client.cc'] + core + libnet,
'tests/tls_test': ['tests/tls_test.cc'] + core + libnet,
'tests/fair_queue_test': ['tests/fair_queue_test.cc'] + core,
- 'apps/seawreck/seawreck': ['apps/seawreck/seawreck.cc', 'http/http_response_parser.rl'] + core + libnet,
+ 'apps/seawreck/seawreck': ['apps/seawreck/seawreck.cc', 'gen/http/http_response_parser.rl'] + core + libnet,
'apps/io_tester/io_tester': ['apps/io_tester/io_tester.cc'] + core,
'apps/iotune/iotune': ['apps/iotune/iotune.cc'] + core,
'tests/blkdiscard_test': ['tests/blkdiscard_test.cc'] + core,
@@ -869,10 +869,10 @@ with open(buildfile, 'w') as f:
command = /bin/echo -e $text > $out
description = GEN $out
rule swagger
- command = json/json2code.py -f $in -o $out
+ command = gen/json2code.py -f $in -o $out
description = SWAGGER $out
rule protobuf
- command = {protoc} --cpp_out=$outdir $in
+ command = {protoc} --cpp_out=$outdir $in && rm -r $outdir/proto && ln -s gen/proto $outdir/proto
description = PROTOC $out
rule copy_file
command = cp $in $out
@@ -895,7 +895,7 @@ with open(buildfile, 'w') as f:
elif modeval['sanitize']:
modeval['sanitize'] += ' -DSEASTAR_ASAN_ENABLED'
f.write(textwrap.dedent('''\
- cxxflags_{mode} = {sanitize} {opt} -I$full_builddir/{mode}/gen -I$full_builddir/{mode}/c-ares
+ cxxflags_{mode} = {sanitize} {opt} -I. -Itests -Iinclude -Isrc -I$full_builddir/{mode}/gen/seastar -I$full_builddir/{mode}/gen -I$full_builddir/{mode}/c-ares
libs_{mode} = {sanitize_libs} {libs}
rule cxx.{mode}
command = $cxx -MD -MT $out -MF $out.d $cxxflags_{mode} $cxxflags -c -o $out $in
@@ -935,7 +935,7 @@ with open(buildfile, 'w') as f:
objs = ['$builddir/' + mode + '/' + src.replace('.cc', '.o')
for src in srcs
if src.endswith('.cc')]
- objs += ['$builddir/' + mode + '/gen/' + src.replace('.proto', '.pb.o')
+ objs += ['$builddir/' + mode + '/gen/seastar/' + src.replace('gen/', '').replace('.proto', '.pb.o')
for src in srcs
if src.endswith('.proto')]
if binary.endswith('.pc'):
@@ -981,14 +981,14 @@ with open(buildfile, 'w') as f:
obj = '$builddir/' + mode + '/' + src.replace('.cc', '.o')
compiles[obj] = src
elif src.endswith('.proto'):
- hh = '$builddir/' + mode + '/gen/' + src.replace('.proto', '.pb.h')
+ hh = '$builddir/' + mode + '/gen/seastar/' + src.replace('gen/', '').replace('.proto', '.pb.h')
protobufs[hh] = src
compiles[hh.replace('.h', '.o')] = hh.replace('.h', '.cc')
elif src.endswith('.rl'):
- hh = '$builddir/' + mode + '/gen/' + src.replace('.rl', '.hh')
+ hh = '$builddir/' + mode + '/gen/seastar/' + src.replace('gen/', '').replace('.rl', '.hh')
ragels[hh] = src
elif src.endswith('.json'):
- hh = '$builddir/' + mode + '/gen/' + src + '.hh'
+ hh = '$builddir/' + mode + '/gen/seastar/' + src.replace('gen/', '') + '.hh'
swaggers[hh] = src
else:
raise Exception('No rule for ' + src)
@@ -1001,7 +1001,7 @@ with open(buildfile, 'w') as f:
f.write('build {}: ragel {}\n'.format(hh, src))
for hh in swaggers:
src = swaggers[hh]
- f.write('build {}: swagger {} | json/json2code.py\n'.format(hh,src))
+ f.write('build {}: swagger {} | gen/json2code.py\n'.format(hh,src))
for pb in protobufs:
src = protobufs[pb]
c_pb = pb.replace('.h','.cc')
diff --git a/http/http_response_parser.rl b/gen/http/http_response_parser.rl
similarity index 98%
rename from http/http_response_parser.rl
rename to gen/http/http_response_parser.rl
index 3b109fd0..9bc4af20 100644
--- a/http/http_response_parser.rl
+++ b/gen/http/http_response_parser.rl
@@ -19,7 +19,7 @@
* Copyright (C) 2015 Cloudius Systems, Ltd.
*/

-#include "core/ragel.hh"
+#include <seastar/core/ragel.hh>
#include <memory>
#include <unordered_map>

diff --git a/http/request_parser.rl b/gen/http/request_parser.rl
similarity index 97%
rename from http/request_parser.rl
rename to gen/http/request_parser.rl
index 91b522bb..53d91ce1 100644
--- a/http/request_parser.rl
+++ b/gen/http/request_parser.rl
@@ -21,10 +21,10 @@

#pragma once

-#include "core/ragel.hh"
+#include <seastar/core/ragel.hh>
#include <memory>
#include <unordered_map>
-#include "http/request.hh"
+#include <seastar/http/request.hh>

namespace seastar {

diff --git a/json/json2code.py b/gen/json2code.py
similarity index 99%
rename from json/json2code.py
rename to gen/json2code.py
index fff8821f..e6fc35ce 100755
--- a/json/json2code.py
+++ b/gen/json2code.py
@@ -329,8 +329,9 @@ def create_h_file(data, hfile_name, api_name, init_method, base_api):
else:
hfile = open(config.outdir + "/" + hfile_name, "w")
print_h_file_headers(hfile, api_name)
- add_include(hfile, ['"core/sstring.hh"', '"' + config.jsoninc +
- 'json_elements.hh"', '"http/json_path.hh"'])
+ add_include(hfile, ['<seastar/core/sstring.hh>',
+ '<seastar/json/json_elements.hh>',
+ '<seastar/http/json_path.hh>'])

add_include(hfile, ['<iostream>', '<boost/range/irange.hpp>'])
open_namespace(hfile, "seastar")
diff --git a/proto/metrics2.proto b/gen/proto/metrics2.proto
similarity index 100%
rename from proto/metrics2.proto
rename to gen/proto/metrics2.proto
diff --git a/core/abort_source.hh b/include/seastar/core/abort_source.hh
similarity index 98%
rename from core/abort_source.hh
rename to include/seastar/core/abort_source.hh
index e8248b57..90d33d5a 100644
--- a/core/abort_source.hh
+++ b/include/seastar/core/abort_source.hh
@@ -21,8 +21,8 @@

#pragma once

-#include "util/noncopyable_function.hh"
-#include "util/optimized_optional.hh"
+#include <seastar/util/noncopyable_function.hh>
+#include <seastar/util/optimized_optional.hh>

#include <boost/intrusive/list.hpp>

@@ -139,4 +139,4 @@ class abort_source {

/// @}

-}
\ No newline at end of file
+}
diff --git a/core/alien.hh b/include/seastar/core/alien.hh
similarity index 97%
rename from core/alien.hh
rename to include/seastar/core/alien.hh
index b2c41f84..3226eafe 100644
--- a/core/alien.hh
+++ b/include/seastar/core/alien.hh
@@ -29,10 +29,10 @@

#include <boost/lockfree/queue.hpp>

-#include "cacheline.hh"
-#include "sstring.hh"
-#include "metrics_registration.hh"
-#include "reactor.hh"
+#include <seastar/core/cacheline.hh>
+#include <seastar/core/sstring.hh>
+#include <seastar/core/metrics_registration.hh>
+#include <seastar/core/reactor.hh>

/// \file

diff --git a/core/align.hh b/include/seastar/core/align.hh
similarity index 100%
rename from core/align.hh
rename to include/seastar/core/align.hh
diff --git a/core/aligned_buffer.hh b/include/seastar/core/aligned_buffer.hh
similarity index 97%
rename from core/aligned_buffer.hh
rename to include/seastar/core/aligned_buffer.hh
index ad6e0db0..97a68f1f 100644
--- a/core/aligned_buffer.hh
+++ b/include/seastar/core/aligned_buffer.hh
@@ -22,7 +22,7 @@
#include <stdlib.h>
#include <memory>
#include <stdexcept>
-#include "print.hh"
+#include <seastar/core/print.hh>

namespace seastar {

diff --git a/core/app-template.hh b/include/seastar/core/app-template.hh
similarity index 97%
rename from core/app-template.hh
rename to include/seastar/core/app-template.hh
index c2eceb02..0e820bde 100644
--- a/core/app-template.hh
+++ b/include/seastar/core/app-template.hh
@@ -23,8 +23,8 @@
#include <boost/program_options.hpp>
#include <boost/optional.hpp>
#include <functional>
-#include <core/future.hh>
-#include <core/sstring.hh>
+#include <seastar/core/future.hh>
+#include <seastar/core/sstring.hh>
#include <chrono>

namespace seastar {
diff --git a/core/apply.hh b/include/seastar/core/apply.hh
similarity index 100%
rename from core/apply.hh
rename to include/seastar/core/apply.hh
diff --git a/core/array_map.hh b/include/seastar/core/array_map.hh
similarity index 100%
rename from core/array_map.hh
rename to include/seastar/core/array_map.hh
diff --git a/core/bitops.hh b/include/seastar/core/bitops.hh
similarity index 100%
rename from core/bitops.hh
rename to include/seastar/core/bitops.hh
diff --git a/core/bitset-iter.hh b/include/seastar/core/bitset-iter.hh
similarity index 100%
rename from core/bitset-iter.hh
rename to include/seastar/core/bitset-iter.hh
diff --git a/core/byteorder.hh b/include/seastar/core/byteorder.hh
similarity index 99%
rename from core/byteorder.hh
rename to include/seastar/core/byteorder.hh
index a3ac3f26..cc10a37c 100644
--- a/core/byteorder.hh
+++ b/include/seastar/core/byteorder.hh
@@ -23,7 +23,7 @@

#include <algorithm>
#include <endian.h>
-#include "unaligned.hh"
+#include <seastar/core/unaligned.hh>

namespace seastar {

diff --git a/core/cacheline.hh b/include/seastar/core/cacheline.hh
similarity index 100%
rename from core/cacheline.hh
rename to include/seastar/core/cacheline.hh
diff --git a/core/checked_ptr.hh b/include/seastar/core/checked_ptr.hh
similarity index 99%
rename from core/checked_ptr.hh
rename to include/seastar/core/checked_ptr.hh
index 701ca0c3..0d290a12 100644
--- a/core/checked_ptr.hh
+++ b/include/seastar/core/checked_ptr.hh
@@ -25,7 +25,7 @@
/// \brief Contains a seastar::checked_ptr class implementation.

#include <exception>
-#include "util/gcc6-concepts.hh"
+#include <seastar/util/gcc6-concepts.hh>

/// \namespace seastar
namespace seastar {
diff --git a/core/chunked_fifo.hh b/include/seastar/core/chunked_fifo.hh
similarity index 100%
rename from core/chunked_fifo.hh
rename to include/seastar/core/chunked_fifo.hh
diff --git a/core/circular_buffer.hh b/include/seastar/core/circular_buffer.hh
similarity index 99%
rename from core/circular_buffer.hh
rename to include/seastar/core/circular_buffer.hh
index 579b7be2..aabef681 100644
--- a/core/circular_buffer.hh
+++ b/include/seastar/core/circular_buffer.hh
@@ -21,8 +21,8 @@

#pragma once

-#include "transfer.hh"
-#include "bitops.hh"
+#include <seastar/core/transfer.hh>
+#include <seastar/core/bitops.hh>
#include <memory>
#include <algorithm>

diff --git a/core/circular_buffer_fixed_capacity.hh b/include/seastar/core/circular_buffer_fixed_capacity.hh
similarity index 100%
rename from core/circular_buffer_fixed_capacity.hh
rename to include/seastar/core/circular_buffer_fixed_capacity.hh
diff --git a/core/condition-variable.hh b/include/seastar/core/condition-variable.hh
similarity index 98%
rename from core/condition-variable.hh
rename to include/seastar/core/condition-variable.hh
index 9f948d91..bbc7173c 100644
--- a/core/condition-variable.hh
+++ b/include/seastar/core/condition-variable.hh
@@ -21,8 +21,8 @@

#pragma once

-#include "core/future-util.hh"
-#include "core/semaphore.hh"
+#include <seastar/core/future-util.hh>
+#include <seastar/core/semaphore.hh>

namespace seastar {

diff --git a/core/deleter.hh b/include/seastar/core/deleter.hh
similarity index 100%
rename from core/deleter.hh
rename to include/seastar/core/deleter.hh
diff --git a/core/distributed.hh b/include/seastar/core/distributed.hh
similarity index 96%
rename from core/distributed.hh
rename to include/seastar/core/distributed.hh
index 0c4b62f7..c2641f61 100644
--- a/core/distributed.hh
+++ b/include/seastar/core/distributed.hh
@@ -21,7 +21,7 @@

#pragma once

-#include "sharded.hh"
+#include <seastar/core/sharded.hh>

namespace seastar {

diff --git a/core/do_with.hh b/include/seastar/core/do_with.hh
similarity index 98%
rename from core/do_with.hh
rename to include/seastar/core/do_with.hh
index 223dc651..5f6bb670 100644
--- a/core/do_with.hh
+++ b/include/seastar/core/do_with.hh
@@ -21,8 +21,8 @@

#pragma once

-#include "apply.hh"
-#include "future.hh"
+#include <seastar/core/apply.hh>
+#include <seastar/core/future.hh>
#include <utility>
#include <memory>
#include <tuple>
diff --git a/core/dpdk_rte.hh b/include/seastar/core/dpdk_rte.hh
similarity index 100%
rename from core/dpdk_rte.hh
rename to include/seastar/core/dpdk_rte.hh
diff --git a/core/enum.hh b/include/seastar/core/enum.hh
similarity index 100%
rename from core/enum.hh
rename to include/seastar/core/enum.hh
diff --git a/core/exception_hacks.hh b/include/seastar/core/exception_hacks.hh
similarity index 100%
rename from core/exception_hacks.hh
rename to include/seastar/core/exception_hacks.hh
diff --git a/core/execution_stage.hh b/include/seastar/core/execution_stage.hh
similarity index 97%
rename from core/execution_stage.hh
rename to include/seastar/core/execution_stage.hh
index eba024ee..47b11c9e 100644
--- a/core/execution_stage.hh
+++ b/include/seastar/core/execution_stage.hh
@@ -21,18 +21,18 @@

#pragma once

-#include "future.hh"
-#include "chunked_fifo.hh"
-#include "function_traits.hh"
-#include "sstring.hh"
-#include "metrics.hh"
-#include "scheduling.hh"
-#include "util/reference_wrapper.hh"
-#include "util/gcc6-concepts.hh"
-#include "util/noncopyable_function.hh"
-#include "../util/tuple_utils.hh"
-#include "../util/defer.hh"
-#include "../fmt/fmt/format.h"
+#include <seastar/core/future.hh>
+#include <seastar/core/chunked_fifo.hh>
+#include <seastar/core/function_traits.hh>
+#include <seastar/core/sstring.hh>
+#include <seastar/core/metrics.hh>
+#include <seastar/core/scheduling.hh>
+#include <seastar/util/reference_wrapper.hh>
+#include <seastar/util/gcc6-concepts.hh>
+#include <seastar/util/noncopyable_function.hh>
+#include <seastar/util/tuple_utils.hh>
+#include <seastar/util/defer.hh>
+#include <fmt/format.h>
#include <vector>
#include <experimental/optional>
#include <boost/range/irange.hpp>
diff --git a/core/expiring_fifo.hh b/include/seastar/core/expiring_fifo.hh
similarity index 96%
rename from core/expiring_fifo.hh
rename to include/seastar/core/expiring_fifo.hh
index 63fe9625..f37d2944 100644
--- a/core/expiring_fifo.hh
+++ b/include/seastar/core/expiring_fifo.hh
@@ -21,13 +21,13 @@

#pragma once

-#include "future.hh"
-#include "chunked_fifo.hh"
+#include <seastar/core/future.hh>
+#include <seastar/core/chunked_fifo.hh>
#include <stdexcept>
#include <exception>
-#include "timer.hh"
-#include "future-util.hh"
-#include "lowres_clock.hh"
+#include <seastar/core/timer.hh>
+#include <seastar/core/future-util.hh>
+#include <seastar/core/lowres_clock.hh>

namespace seastar {

diff --git a/core/fair_queue.hh b/include/seastar/core/fair_queue.hh
similarity index 97%
rename from core/fair_queue.hh
rename to include/seastar/core/fair_queue.hh
index b5bfe4dc..a0c4d344 100644
--- a/core/fair_queue.hh
+++ b/include/seastar/core/fair_queue.hh
@@ -21,12 +21,12 @@
*/
#pragma once

-#include "future.hh"
-#include "semaphore.hh"
-#include "shared_ptr.hh"
-#include "print.hh"
-#include "circular_buffer.hh"
-#include "util/noncopyable_function.hh"
+#include <seastar/core/future.hh>
+#include <seastar/core/semaphore.hh>
+#include <seastar/core/shared_ptr.hh>
+#include <seastar/core/print.hh>
+#include <seastar/core/circular_buffer.hh>
+#include <seastar/util/noncopyable_function.hh>
#include <queue>
#include <type_traits>
#include <experimental/optional>
diff --git a/core/file.hh b/include/seastar/core/file.hh
similarity index 98%
rename from core/file.hh
rename to include/seastar/core/file.hh
index 006468d5..e7ba144d 100644
--- a/core/file.hh
+++ b/include/seastar/core/file.hh
@@ -21,12 +21,12 @@

#pragma once

-#include "stream.hh"
-#include "sstring.hh"
-#include "core/shared_ptr.hh"
-#include "core/align.hh"
-#include "core/future-util.hh"
-#include "core/fair_queue.hh"
+#include <seastar/core/stream.hh>
+#include <seastar/core/sstring.hh>
+#include <seastar/core/shared_ptr.hh>
+#include <seastar/core/align.hh>
+#include <seastar/core/future-util.hh>
+#include <seastar/core/fair_queue.hh>
#include <experimental/optional>
#include <system_error>
#include <sys/stat.h>
diff --git a/core/fsqual.hh b/include/seastar/core/fsqual.hh
similarity index 96%
rename from core/fsqual.hh
rename to include/seastar/core/fsqual.hh
index 2e4a32c4..24a3d1d7 100644
--- a/core/fsqual.hh
+++ b/include/seastar/core/fsqual.hh
@@ -21,7 +21,7 @@

#pragma once

-#include "sstring.hh"
+#include <seastar/core/sstring.hh>

namespace seastar {

diff --git a/core/fstream.hh b/include/seastar/core/fstream.hh
similarity index 97%
rename from core/fstream.hh
rename to include/seastar/core/fstream.hh
index e92622e9..9a9fdb68 100644
--- a/core/fstream.hh
+++ b/include/seastar/core/fstream.hh
@@ -30,9 +30,9 @@
// interface to files, while retaining the zero-copy characteristics of
// seastar files.

-#include "file.hh"
-#include "iostream.hh"
-#include "shared_ptr.hh"
+#include <seastar/core/file.hh>
+#include <seastar/core/iostream.hh>
+#include <seastar/core/shared_ptr.hh>

namespace seastar {

diff --git a/core/function_traits.hh b/include/seastar/core/function_traits.hh
similarity index 100%
rename from core/function_traits.hh
rename to include/seastar/core/function_traits.hh
diff --git a/core/future-util.hh b/include/seastar/core/future-util.hh
similarity index 99%
rename from core/future-util.hh
rename to include/seastar/core/future-util.hh
index a10c4604..9cf85f53 100644
--- a/core/future-util.hh
+++ b/include/seastar/core/future-util.hh
@@ -24,18 +24,18 @@

#pragma once

-#include "task.hh"
-#include "future.hh"
-#include "shared_ptr.hh"
-#include "do_with.hh"
-#include "timer.hh"
-#include "util/bool_class.hh"
+#include <seastar/core/task.hh>
+#include <seastar/core/future.hh>
+#include <seastar/core/shared_ptr.hh>
+#include <seastar/core/do_with.hh>
+#include <seastar/core/timer.hh>
+#include <seastar/util/bool_class.hh>
#include <tuple>
#include <iterator>
#include <vector>
#include <experimental/optional>
-#include "util/tuple_utils.hh"
-#include "util/noncopyable_function.hh"
+#include <seastar/util/tuple_utils.hh>
+#include <seastar/util/noncopyable_function.hh>

namespace seastar {

diff --git a/core/future.hh b/include/seastar/core/future.hh
similarity index 99%
rename from core/future.hh
rename to include/seastar/core/future.hh
index f13771df..036a0f2f 100644
--- a/core/future.hh
+++ b/include/seastar/core/future.hh
@@ -21,19 +21,19 @@

#pragma once

-#include "apply.hh"
-#include "task.hh"
-#include "preempt.hh"
-#include "thread_impl.hh"
+#include <seastar/core/apply.hh>
+#include <seastar/core/task.hh>
+#include <seastar/core/preempt.hh>
+#include <seastar/core/thread_impl.hh>
#include <stdexcept>
#include <atomic>
#include <memory>
#include <type_traits>
#include <assert.h>
#include <cstdlib>
-#include "function_traits.hh"
-#include "util/alloc_failure_injector.hh"
-#include "../util/gcc6-concepts.hh"
+#include <seastar/core/function_traits.hh>
+#include <seastar/util/alloc_failure_injector.hh>
+#include <seastar/util/gcc6-concepts.hh>

namespace seastar {

diff --git a/core/gate.hh b/include/seastar/core/gate.hh
similarity index 99%
rename from core/gate.hh
rename to include/seastar/core/gate.hh
index d3d25e99..a5eafcee 100644
--- a/core/gate.hh
+++ b/include/seastar/core/gate.hh
@@ -21,7 +21,7 @@

#pragma once

-#include "future.hh"
+#include <seastar/core/future.hh>
#include <experimental/optional>
#include <exception>

diff --git a/core/iostream-impl.hh b/include/seastar/core/iostream-impl.hh
similarity index 99%
rename from core/iostream-impl.hh
rename to include/seastar/core/iostream-impl.hh
index 991f71b0..df09ebeb 100644
--- a/core/iostream-impl.hh
+++ b/include/seastar/core/iostream-impl.hh
@@ -23,10 +23,10 @@

#pragma once

-#include "future-util.hh"
-#include "net/packet.hh"
-#include "core/future-util.hh"
-#include "util/variant_utils.hh"
+#include <seastar/core/future-util.hh>
+#include <seastar/net/packet.hh>
+#include <seastar/core/future-util.hh>
+#include <seastar/util/variant_utils.hh>

namespace seastar {

diff --git a/core/iostream.hh b/include/seastar/core/iostream.hh
similarity index 99%
rename from core/iostream.hh
rename to include/seastar/core/iostream.hh
index 66565f25..36881839 100644
--- a/core/iostream.hh
+++ b/include/seastar/core/iostream.hh
@@ -35,9 +35,9 @@

#pragma once

-#include "future.hh"
-#include "temporary_buffer.hh"
-#include "scattered_message.hh"
+#include <seastar/core/future.hh>
+#include <seastar/core/temporary_buffer.hh>
+#include <seastar/core/scattered_message.hh>

#include <boost/variant.hpp>

diff --git a/core/linux-aio.hh b/include/seastar/core/linux-aio.hh
similarity index 100%
rename from core/linux-aio.hh
rename to include/seastar/core/linux-aio.hh
diff --git a/core/lowres_clock.hh b/include/seastar/core/lowres_clock.hh
similarity index 98%
rename from core/lowres_clock.hh
rename to include/seastar/core/lowres_clock.hh
index 86d0cb17..5061edf8 100644
--- a/core/lowres_clock.hh
+++ b/include/seastar/core/lowres_clock.hh
@@ -21,8 +21,8 @@

#pragma once

-#include "cacheline.hh"
-#include "timer.hh"
+#include <seastar/core/cacheline.hh>
+#include <seastar/core/timer.hh>

#include <cstdint>

diff --git a/core/manual_clock.hh b/include/seastar/core/manual_clock.hh
similarity index 100%
rename from core/manual_clock.hh
rename to include/seastar/core/manual_clock.hh
diff --git a/core/memory.hh b/include/seastar/core/memory.hh
similarity index 99%
rename from core/memory.hh
rename to include/seastar/core/memory.hh
index abde7075..b998ad97 100644
--- a/core/memory.hh
+++ b/include/seastar/core/memory.hh
@@ -21,8 +21,8 @@

#pragma once

-#include "resource.hh"
-#include "bitops.hh"
+#include <seastar/core/resource.hh>
+#include <seastar/core/bitops.hh>
#include <new>
#include <functional>
#include <vector>
diff --git a/core/metrics.hh b/include/seastar/core/metrics.hh
similarity index 99%
rename from core/metrics.hh
rename to include/seastar/core/metrics.hh
index f8b4ec4c..d609af29 100644
--- a/core/metrics.hh
+++ b/include/seastar/core/metrics.hh
@@ -22,12 +22,12 @@
#pragma once

#include <functional>
-#include "sstring.hh"
-#include "core/shared_ptr.hh"
-#include "core/metrics_registration.hh"
+#include <seastar/core/sstring.hh>
+#include <seastar/core/shared_ptr.hh>
+#include <seastar/core/metrics_registration.hh>
#include <boost/lexical_cast.hpp>
#include <map>
-#include "core/metrics_types.hh"
+#include <seastar/core/metrics_types.hh>
#include <boost/variant.hpp>

/*! \file metrics.hh
diff --git a/core/metrics_api.hh b/include/seastar/core/metrics_api.hh
similarity index 99%
rename from core/metrics_api.hh
rename to include/seastar/core/metrics_api.hh
index 1ffd9165..5b08beb8 100644
--- a/core/metrics_api.hh
+++ b/include/seastar/core/metrics_api.hh
@@ -21,9 +21,9 @@

#pragma once

-#include "metrics.hh"
+#include <seastar/core/metrics.hh>
#include <unordered_map>
-#include "sharded.hh"
+#include <seastar/core/sharded.hh>
#include <boost/functional/hash.hpp>
/*!
* \file metrics_api.hh
diff --git a/core/metrics_registration.hh b/include/seastar/core/metrics_registration.hh
similarity index 100%
rename from core/metrics_registration.hh
rename to include/seastar/core/metrics_registration.hh
diff --git a/core/metrics_types.hh b/include/seastar/core/metrics_types.hh
similarity index 100%
rename from core/metrics_types.hh
rename to include/seastar/core/metrics_types.hh
diff --git a/core/pipe.hh b/include/seastar/core/pipe.hh
similarity index 99%
rename from core/pipe.hh
rename to include/seastar/core/pipe.hh
index 606916e1..e3e6abe6 100644
--- a/core/pipe.hh
+++ b/include/seastar/core/pipe.hh
@@ -21,8 +21,8 @@

#pragma once

-#include "future.hh"
-#include "queue.hh"
+#include <seastar/core/future.hh>
+#include <seastar/core/queue.hh>

#include <experimental/optional>

diff --git a/core/posix.hh b/include/seastar/core/posix.hh
similarity index 99%
rename from core/posix.hh
rename to include/seastar/core/posix.hh
index fe9e3d9f..f4fe8797 100644
--- a/core/posix.hh
+++ b/include/seastar/core/posix.hh
@@ -21,7 +21,7 @@

#pragma once

-#include "sstring.hh"
+#include <seastar/core/sstring.hh>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
@@ -43,7 +43,7 @@
#include <chrono>
#include <sys/uio.h>

-#include "net/socket_defs.hh"
+#include <seastar/net/socket_defs.hh>

namespace seastar {

diff --git a/core/preempt.hh b/include/seastar/core/preempt.hh
similarity index 100%
rename from core/preempt.hh
rename to include/seastar/core/preempt.hh
diff --git a/core/prefetch.hh b/include/seastar/core/prefetch.hh
similarity index 98%
rename from core/prefetch.hh
rename to include/seastar/core/prefetch.hh
index d11cfccc..73f9abd3 100644
--- a/core/prefetch.hh
+++ b/include/seastar/core/prefetch.hh
@@ -24,8 +24,8 @@
#include <atomic>
#include <boost/mpl/range_c.hpp>
#include <boost/mpl/for_each.hpp>
-#include "align.hh"
-#include "cacheline.hh"
+#include <seastar/core/align.hh>
+#include <seastar/core/cacheline.hh>

namespace seastar {

diff --git a/core/print.hh b/include/seastar/core/print.hh
similarity index 99%
rename from core/print.hh
rename to include/seastar/core/print.hh
index e601cfcb..bb2104c4 100644
--- a/core/print.hh
+++ b/include/seastar/core/print.hh
@@ -27,7 +27,7 @@
#include <iomanip>
#include <chrono>
#include <sstream>
-#include "core/sstring.hh"
+#include <seastar/core/sstring.hh>

#if 0
inline
diff --git a/core/prometheus.hh b/include/seastar/core/prometheus.hh
similarity index 97%
rename from core/prometheus.hh
rename to include/seastar/core/prometheus.hh
index f17eb3e4..f9a50353 100644
--- a/core/prometheus.hh
+++ b/include/seastar/core/prometheus.hh
@@ -21,7 +21,7 @@

#pragma once

-#include "http/httpd.hh"
+#include <seastar/http/httpd.hh>

namespace seastar {

diff --git a/core/queue.hh b/include/seastar/core/queue.hh
similarity index 98%
rename from core/queue.hh
rename to include/seastar/core/queue.hh
index ca21405b..7772090e 100644
--- a/core/queue.hh
+++ b/include/seastar/core/queue.hh
@@ -21,8 +21,8 @@

#pragma once

-#include "circular_buffer.hh"
-#include "future.hh"
+#include <seastar/core/circular_buffer.hh>
+#include <seastar/core/future.hh>
#include <queue>
#include <experimental/optional>

diff --git a/core/ragel.hh b/include/seastar/core/ragel.hh
similarity index 96%
rename from core/ragel.hh
rename to include/seastar/core/ragel.hh
index 4f212370..368f8733 100644
--- a/core/ragel.hh
+++ b/include/seastar/core/ragel.hh
@@ -21,14 +21,14 @@

#pragma once

-#include "sstring.hh"
-#include "temporary_buffer.hh"
-#include "util/eclipse.hh"
+#include <seastar/core/sstring.hh>
+#include <seastar/core/temporary_buffer.hh>
+#include <seastar/util/eclipse.hh>
#include <algorithm>
#include <memory>
#include <cassert>
#include <experimental/optional>
-#include "future.hh"
+#include <seastar/core/future.hh>

namespace seastar {

diff --git a/core/reactor.hh b/include/seastar/core/reactor.hh
similarity index 98%
rename from core/reactor.hh
rename to include/seastar/core/reactor.hh
index b0779ff1..d0eac6a2 100644
--- a/core/reactor.hh
+++ b/include/seastar/core/reactor.hh
@@ -21,11 +21,11 @@

#pragma once

-#include "seastar.hh"
-#include "iostream.hh"
-#include "aligned_buffer.hh"
-#include "cacheline.hh"
-#include "circular_buffer_fixed_capacity.hh"
+#include <seastar/core/seastar.hh>
+#include <seastar/core/iostream.hh>
+#include <seastar/core/aligned_buffer.hh>
+#include <seastar/core/cacheline.hh>
+#include <seastar/core/circular_buffer_fixed_capacity.hh>
#include <memory>
#include <type_traits>
#include <sys/epoll.h>
@@ -55,30 +55,30 @@
#include <boost/thread/barrier.hpp>
#include <boost/container/static_vector.hpp>
#include <set>
-#include "linux-aio.hh"
-#include "util/eclipse.hh"
-#include "future.hh"
-#include "posix.hh"
-#include "apply.hh"
-#include "sstring.hh"
-#include "net/api.hh"
-#include "temporary_buffer.hh"
-#include "circular_buffer.hh"
-#include "file.hh"
-#include "semaphore.hh"
-#include "fair_queue.hh"
-#include "core/scattered_message.hh"
-#include "core/enum.hh"
-#include "core/memory.hh"
-#include "core/thread_cputime_clock.hh"
+#include <seastar/core/linux-aio.hh>
+#include <seastar/util/eclipse.hh>
+#include <seastar/core/future.hh>
+#include <seastar/core/posix.hh>
+#include <seastar/core/apply.hh>
+#include <seastar/core/sstring.hh>
+#include <seastar/net/api.hh>
+#include <seastar/core/temporary_buffer.hh>
+#include <seastar/core/circular_buffer.hh>
+#include <seastar/core/file.hh>
+#include <seastar/core/semaphore.hh>
+#include <seastar/core/fair_queue.hh>
+#include <seastar/core/scattered_message.hh>
+#include <seastar/core/enum.hh>
+#include <seastar/core/memory.hh>
+#include <seastar/core/thread_cputime_clock.hh>
#include <boost/range/irange.hpp>
-#include "timer.hh"
-#include "condition-variable.hh"
-#include "util/log.hh"
-#include "lowres_clock.hh"
-#include "manual_clock.hh"
-#include "core/metrics_registration.hh"
-#include "scheduling.hh"
+#include <seastar/core/timer.hh>
+#include <seastar/core/condition-variable.hh>
+#include <seastar/util/log.hh>
+#include <seastar/core/lowres_clock.hh>
+#include <seastar/core/manual_clock.hh>
+#include <seastar/core/metrics_registration.hh>
+#include <seastar/core/scheduling.hh>

#ifdef HAVE_OSV
#include <osv/sched.hh>
diff --git a/core/report_exception.hh b/include/seastar/core/report_exception.hh
similarity index 100%
rename from core/report_exception.hh
rename to include/seastar/core/report_exception.hh
diff --git a/core/resource.hh b/include/seastar/core/resource.hh
similarity index 100%
rename from core/resource.hh
rename to include/seastar/core/resource.hh
diff --git a/core/rwlock.hh b/include/seastar/core/rwlock.hh
similarity index 99%
rename from core/rwlock.hh
rename to include/seastar/core/rwlock.hh
index 358e0d29..9228dd61 100644
--- a/core/rwlock.hh
+++ b/include/seastar/core/rwlock.hh
@@ -21,7 +21,7 @@

#pragma once

-#include "semaphore.hh"
+#include <seastar/core/semaphore.hh>

namespace seastar {

diff --git a/core/scattered_message.hh b/include/seastar/core/scattered_message.hh
similarity index 95%
rename from core/scattered_message.hh
rename to include/seastar/core/scattered_message.hh
index 3eaaec40..e6de90df 100644
--- a/core/scattered_message.hh
+++ b/include/seastar/core/scattered_message.hh
@@ -21,10 +21,10 @@

#pragma once

-#include "core/deleter.hh"
-#include "core/temporary_buffer.hh"
-#include "net/packet.hh"
-#include "sstring.hh"
+#include <seastar/core/deleter.hh>
+#include <seastar/core/temporary_buffer.hh>
+#include <seastar/net/packet.hh>
+#include <seastar/core/sstring.hh>
#include <memory>
#include <vector>
#include <experimental/string_view>
diff --git a/core/scheduling.hh b/include/seastar/core/scheduling.hh
similarity index 99%
rename from core/scheduling.hh
rename to include/seastar/core/scheduling.hh
index a7fd5fca..6a8f2b6b 100644
--- a/core/scheduling.hh
+++ b/include/seastar/core/scheduling.hh
@@ -21,7 +21,7 @@

#pragma once

-#include "sstring.hh"
+#include <seastar/core/sstring.hh>

/// \file

diff --git a/core/scollectd.hh b/include/seastar/core/scollectd.hh
similarity index 99%
rename from core/scollectd.hh
rename to include/seastar/core/scollectd.hh
index dd09cd8b..5f15667b 100644
--- a/core/scollectd.hh
+++ b/include/seastar/core/scollectd.hh
@@ -33,14 +33,14 @@
#include <chrono>
#include <boost/program_options.hpp>

-#include "future.hh"
-#include "net/byteorder.hh"
-#include "core/shared_ptr.hh"
-#include "core/sstring.hh"
-#include "core/print.hh"
-#include "util/log.hh"
-
-#include "core/metrics_api.hh"
+#include <seastar/core/future.hh>
+#include <seastar/net/byteorder.hh>
+#include <seastar/core/shared_ptr.hh>
+#include <seastar/core/sstring.hh>
+#include <seastar/core/print.hh>
+#include <seastar/util/log.hh>
+
+#include <seastar/core/metrics_api.hh>

namespace seastar {

diff --git a/core/scollectd_api.hh b/include/seastar/core/scollectd_api.hh
similarity index 90%
rename from core/scollectd_api.hh
rename to include/seastar/core/scollectd_api.hh
index 2e18b165..b1a0393f 100644
--- a/core/scollectd_api.hh
+++ b/include/seastar/core/scollectd_api.hh
@@ -4,8 +4,8 @@

#pragma once

-#include "core/scollectd.hh"
-#include "core/metrics_api.hh"
+#include <seastar/core/scollectd.hh>
+#include <seastar/core/metrics_api.hh>

namespace seastar {

diff --git a/core/seastar.hh b/include/seastar/core/seastar.hh
similarity index 99%
rename from core/seastar.hh
rename to include/seastar/core/seastar.hh
index 241dd214..7afbac95 100644
--- a/core/seastar.hh
+++ b/include/seastar/core/seastar.hh
@@ -41,8 +41,8 @@
/// continuations, also known as fibers
/// - \ref thread-module Support for traditional threaded execution

-#include "sstring.hh"
-#include "future.hh"
+#include <seastar/core/sstring.hh>
+#include <seastar/core/future.hh>

namespace seastar {

diff --git a/core/semaphore.hh b/include/seastar/core/semaphore.hh
similarity index 99%
rename from core/semaphore.hh
rename to include/seastar/core/semaphore.hh
index 8bb5a7d7..02c78aab 100644
--- a/core/semaphore.hh
+++ b/include/seastar/core/semaphore.hh
@@ -21,12 +21,12 @@

#pragma once

-#include "future.hh"
-#include "chunked_fifo.hh"
+#include <seastar/core/future.hh>
+#include <seastar/core/chunked_fifo.hh>
#include <stdexcept>
#include <exception>
-#include "timer.hh"
-#include "expiring_fifo.hh"
+#include <seastar/core/timer.hh>
+#include <seastar/core/expiring_fifo.hh>

namespace seastar {

diff --git a/core/sharded.hh b/include/seastar/core/sharded.hh
similarity index 99%
rename from core/sharded.hh
rename to include/seastar/core/sharded.hh
index 99433ec5..98b5934a 100644
--- a/core/sharded.hh
+++ b/include/seastar/core/sharded.hh
@@ -21,10 +21,10 @@

#pragma once

-#include "reactor.hh"
-#include "future-util.hh"
-#include "util/is_smart_ptr.hh"
-#include "do_with.hh"
+#include <seastar/core/reactor.hh>
+#include <seastar/core/future-util.hh>
+#include <seastar/util/is_smart_ptr.hh>
+#include <seastar/core/do_with.hh>
#include <boost/iterator/counting_iterator.hpp>

namespace seastar {
diff --git a/core/shared_future.hh b/include/seastar/core/shared_future.hh
similarity index 99%
rename from core/shared_future.hh
rename to include/seastar/core/shared_future.hh
index 1ce252b4..434e3bd7 100644
--- a/core/shared_future.hh
+++ b/include/seastar/core/shared_future.hh
@@ -22,8 +22,8 @@

#pragma once

-#include "future.hh"
-#include "expiring_fifo.hh"
+#include <seastar/core/future.hh>
+#include <seastar/core/expiring_fifo.hh>

/// \addtogroup future-module
/// @{
diff --git a/core/shared_mutex.hh b/include/seastar/core/shared_mutex.hh
similarity index 98%
rename from core/shared_mutex.hh
rename to include/seastar/core/shared_mutex.hh
index 5b57e415..b6ab6f02 100644
--- a/core/shared_mutex.hh
+++ b/include/seastar/core/shared_mutex.hh
@@ -21,8 +21,8 @@

#pragma once

-#include "future.hh"
-#include "circular_buffer.hh"
+#include <seastar/core/future.hh>
+#include <seastar/core/circular_buffer.hh>

namespace seastar {

diff --git a/core/shared_ptr.hh b/include/seastar/core/shared_ptr.hh
similarity index 99%
rename from core/shared_ptr.hh
rename to include/seastar/core/shared_ptr.hh
index 5be9c5e1..64f83f6a 100644
--- a/core/shared_ptr.hh
+++ b/include/seastar/core/shared_ptr.hh
@@ -21,13 +21,13 @@

#pragma once

-#include "shared_ptr_debug_helper.hh"
+#include <seastar/core/shared_ptr_debug_helper.hh>
#include <utility>
#include <type_traits>
#include <functional>
#include <iostream>
-#include "util/is_smart_ptr.hh"
-#include "util/indirect.hh"
+#include <seastar/util/is_smart_ptr.hh>
+#include <seastar/util/indirect.hh>

#include <boost/intrusive/parent_from_member.hpp>

diff --git a/core/shared_ptr_debug_helper.hh b/include/seastar/core/shared_ptr_debug_helper.hh
similarity index 100%
rename from core/shared_ptr_debug_helper.hh
rename to include/seastar/core/shared_ptr_debug_helper.hh
diff --git a/core/shared_ptr_incomplete.hh b/include/seastar/core/shared_ptr_incomplete.hh
similarity index 96%
rename from core/shared_ptr_incomplete.hh
rename to include/seastar/core/shared_ptr_incomplete.hh
index 270c6bf9..022c3611 100644
--- a/core/shared_ptr_incomplete.hh
+++ b/include/seastar/core/shared_ptr_incomplete.hh
@@ -21,7 +21,7 @@

#pragma once

-#include "shared_ptr.hh"
+#include <seastar/core/shared_ptr.hh>


/// \file Include this header files when using \c lw_shared_ptr<some_incomplete_type>, at the point
diff --git a/core/simple-stream.hh b/include/seastar/core/simple-stream.hh
similarity index 99%
rename from core/simple-stream.hh
rename to include/seastar/core/simple-stream.hh
index 939f3732..b5dd9b61 100644
--- a/core/simple-stream.hh
+++ b/include/seastar/core/simple-stream.hh
@@ -20,7 +20,7 @@
*/

#pragma once
-#include "core/sstring.hh"
+#include <seastar/core/sstring.hh>

namespace seastar {

diff --git a/core/slab.hh b/include/seastar/core/slab.hh
similarity index 99%
rename from core/slab.hh
rename to include/seastar/core/slab.hh
index 591bcff2..aa1264dc 100644
--- a/core/slab.hh
+++ b/include/seastar/core/slab.hh
@@ -29,9 +29,9 @@
#include <memory>
#include <vector>
#include <algorithm>
-#include "core/metrics.hh"
-#include "core/align.hh"
-#include "core/memory.hh"
+#include <seastar/core/metrics.hh>
+#include <seastar/core/align.hh>
+#include <seastar/core/memory.hh>

namespace seastar {

diff --git a/core/sleep.hh b/include/seastar/core/sleep.hh
similarity index 94%
rename from core/sleep.hh
rename to include/seastar/core/sleep.hh
index f7330453..ec1481dd 100644
--- a/core/sleep.hh
+++ b/include/seastar/core/sleep.hh
@@ -25,11 +25,11 @@
#include <chrono>
#include <functional>

-#include "core/abort_source.hh"
-#include "core/future.hh"
-#include "core/lowres_clock.hh"
-#include "core/reactor.hh"
-#include "core/shared_ptr.hh"
+#include <seastar/core/abort_source.hh>
+#include <seastar/core/future.hh>
+#include <seastar/core/lowres_clock.hh>
+#include <seastar/core/reactor.hh>
+#include <seastar/core/shared_ptr.hh>

namespace seastar {

@@ -91,4 +91,4 @@ future<> sleep_abortable(typename Clock::duration dur, abort_source& as);
extern template future<> sleep_abortable<steady_clock_type>(typename steady_clock_type::duration, abort_source&);
extern template future<> sleep_abortable<lowres_clock>(typename lowres_clock::duration, abort_source&);

-}
\ No newline at end of file
+}
diff --git a/core/sstring.hh b/include/seastar/core/sstring.hh
similarity index 99%
rename from core/sstring.hh
rename to include/seastar/core/sstring.hh
index dfc46796..e229feeb 100644
--- a/core/sstring.hh
+++ b/include/seastar/core/sstring.hh
@@ -34,7 +34,7 @@
#include <cstdio>
#include <type_traits>
#include <experimental/string_view>
-#include "core/temporary_buffer.hh"
+#include <seastar/core/temporary_buffer.hh>

namespace seastar {

diff --git a/core/stall_sampler.hh b/include/seastar/core/stall_sampler.hh
similarity index 94%
rename from core/stall_sampler.hh
rename to include/seastar/core/stall_sampler.hh
index f14cb1ad..424c170f 100644
--- a/core/stall_sampler.hh
+++ b/include/seastar/core/stall_sampler.hh
@@ -22,8 +22,8 @@

#pragma once

-#include "core/future.hh"
-#include "util/noncopyable_function.hh"
+#include <seastar/core/future.hh>
+#include <seastar/util/noncopyable_function.hh>

#include <chrono>
#include <iosfwd>
diff --git a/core/stream.hh b/include/seastar/core/stream.hh
similarity index 99%
rename from core/stream.hh
rename to include/seastar/core/stream.hh
index 51a4a06d..5ba998d6 100644
--- a/core/stream.hh
+++ b/include/seastar/core/stream.hh
@@ -21,7 +21,7 @@

#pragma once

-#include "future.hh"
+#include <seastar/core/future.hh>
#include <exception>
#include <functional>
#include <cassert>
diff --git a/core/systemwide_memory_barrier.hh b/include/seastar/core/systemwide_memory_barrier.hh
similarity index 100%
rename from core/systemwide_memory_barrier.hh
rename to include/seastar/core/systemwide_memory_barrier.hh
diff --git a/core/task.hh b/include/seastar/core/task.hh
similarity index 98%
rename from core/task.hh
rename to include/seastar/core/task.hh
index 16a148f0..5754796b 100644
--- a/core/task.hh
+++ b/include/seastar/core/task.hh
@@ -22,7 +22,7 @@
#pragma once

#include <memory>
-#include "scheduling.hh"
+#include <seastar/core/scheduling.hh>

namespace seastar {

diff --git a/core/temporary_buffer.hh b/include/seastar/core/temporary_buffer.hh
similarity index 99%
rename from core/temporary_buffer.hh
rename to include/seastar/core/temporary_buffer.hh
index 6b9457c8..2a38d9b1 100644
--- a/core/temporary_buffer.hh
+++ b/include/seastar/core/temporary_buffer.hh
@@ -21,8 +21,8 @@

#pragma once

-#include "deleter.hh"
-#include "util/eclipse.hh"
+#include <seastar/core/deleter.hh>
+#include <seastar/util/eclipse.hh>
#include <malloc.h>
#include <algorithm>

diff --git a/core/thread.hh b/include/seastar/core/thread.hh
similarity index 98%
rename from core/thread.hh
rename to include/seastar/core/thread.hh
index 3d163d43..f0a4b58e 100644
--- a/core/thread.hh
+++ b/include/seastar/core/thread.hh
@@ -22,13 +22,13 @@

#pragma once

-#include "thread_impl.hh"
-#include "future.hh"
-#include "do_with.hh"
-#include "future-util.hh"
-#include "timer.hh"
-#include "reactor.hh"
-#include "scheduling.hh"
+#include <seastar/core/thread_impl.hh>
+#include <seastar/core/future.hh>
+#include <seastar/core/do_with.hh>
+#include <seastar/core/future-util.hh>
+#include <seastar/core/timer.hh>
+#include <seastar/core/reactor.hh>
+#include <seastar/core/scheduling.hh>
#include <memory>
#include <setjmp.h>
#include <type_traits>
diff --git a/core/thread_cputime_clock.hh b/include/seastar/core/thread_cputime_clock.hh
similarity index 100%
rename from core/thread_cputime_clock.hh
rename to include/seastar/core/thread_cputime_clock.hh
diff --git a/core/thread_impl.hh b/include/seastar/core/thread_impl.hh
similarity index 98%
rename from core/thread_impl.hh
rename to include/seastar/core/thread_impl.hh
index ecd66253..67efc063 100644
--- a/core/thread_impl.hh
+++ b/include/seastar/core/thread_impl.hh
@@ -21,7 +21,7 @@
*/

#pragma once
-#include "preempt.hh"
+#include <seastar/core/preempt.hh>
#include <setjmp.h>
#include <ucontext.h>
#include <chrono>
diff --git a/core/timer-set.hh b/include/seastar/core/timer-set.hh
similarity index 99%
rename from core/timer-set.hh
rename to include/seastar/core/timer-set.hh
index a0c2c468..258bc5ee 100644
--- a/core/timer-set.hh
+++ b/include/seastar/core/timer-set.hh
@@ -18,7 +18,7 @@
#include <bitset>
#include <array>
#include <boost/intrusive/list.hpp>
-#include "bitset-iter.hh"
+#include <seastar/core/bitset-iter.hh>

namespace seastar {

diff --git a/core/timer.hh b/include/seastar/core/timer.hh
similarity index 97%
rename from core/timer.hh
rename to include/seastar/core/timer.hh
index 3fdb180b..90c7bb89 100644
--- a/core/timer.hh
+++ b/include/seastar/core/timer.hh
@@ -25,8 +25,8 @@
#include <experimental/optional>
#include <atomic>
#include <functional>
-#include "future.hh"
-#include "timer-set.hh"
+#include <seastar/core/future.hh>
+#include <seastar/core/timer-set.hh>

namespace seastar {

diff --git a/core/transfer.hh b/include/seastar/core/transfer.hh
similarity index 100%
rename from core/transfer.hh
rename to include/seastar/core/transfer.hh
diff --git a/core/unaligned.hh b/include/seastar/core/unaligned.hh
similarity index 100%
rename from core/unaligned.hh
rename to include/seastar/core/unaligned.hh
diff --git a/core/units.hh b/include/seastar/core/units.hh
similarity index 100%
rename from core/units.hh
rename to include/seastar/core/units.hh
diff --git a/core/vector-data-sink.hh b/include/seastar/core/vector-data-sink.hh
similarity index 97%
rename from core/vector-data-sink.hh
rename to include/seastar/core/vector-data-sink.hh
index 31019a3a..f66c5071 100644
--- a/core/vector-data-sink.hh
+++ b/include/seastar/core/vector-data-sink.hh
@@ -21,7 +21,7 @@

#pragma once

-#include "core/reactor.hh"
+#include <seastar/core/reactor.hh>

namespace seastar {

diff --git a/core/vla.hh b/include/seastar/core/vla.hh
similarity index 97%
rename from core/vla.hh
rename to include/seastar/core/vla.hh
index 4dd3161d..cb777657 100644
--- a/core/vla.hh
+++ b/include/seastar/core/vla.hh
@@ -25,7 +25,7 @@
#include <new>
#include <assert.h>
#include <type_traits>
-#include <core/reactor.hh>
+#include <seastar/core/reactor.hh>

namespace seastar {

diff --git a/core/weak_ptr.hh b/include/seastar/core/weak_ptr.hh
similarity index 100%
rename from core/weak_ptr.hh
rename to include/seastar/core/weak_ptr.hh
diff --git a/http/api_docs.hh b/include/seastar/http/api_docs.hh
similarity index 97%
rename from http/api_docs.hh
rename to include/seastar/http/api_docs.hh
index 40599ee7..7a7d314f 100644
--- a/http/api_docs.hh
+++ b/include/seastar/http/api_docs.hh
@@ -20,12 +20,12 @@
*/

#pragma once
-#include "json/json_elements.hh"
-#include "json/formatter.hh"
-#include "routes.hh"
-#include "transformers.hh"
+#include <seastar/json/json_elements.hh>
+#include <seastar/json/formatter.hh>
+#include <seastar/http/routes.hh>
+#include <seastar/http/transformers.hh>
#include <string>
-#include "util/noncopyable_function.hh"
+#include <seastar/util/noncopyable_function.hh>

namespace seastar {

diff --git a/http/common.hh b/include/seastar/http/common.hh
similarity index 97%
rename from http/common.hh
rename to include/seastar/http/common.hh
index eece409b..48077e91 100644
--- a/http/common.hh
+++ b/include/seastar/http/common.hh
@@ -22,7 +22,7 @@
#pragma once

#include <unordered_map>
-#include "core/sstring.hh"
+#include <seastar/core/sstring.hh>

namespace seastar {

diff --git a/http/exception.hh b/include/seastar/http/exception.hh
similarity index 97%
rename from http/exception.hh
rename to include/seastar/http/exception.hh
index febef346..2f6ed4af 100644
--- a/http/exception.hh
+++ b/include/seastar/http/exception.hh
@@ -21,8 +21,8 @@

#pragma once

-#include "reply.hh"
-#include "json/json_elements.hh"
+#include <seastar/http/reply.hh>
+#include <seastar/json/json_elements.hh>

namespace seastar {

diff --git a/http/file_handler.hh b/include/seastar/http/file_handler.hh
similarity index 98%
rename from http/file_handler.hh
rename to include/seastar/http/file_handler.hh
index 3f011c12..0de40a75 100644
--- a/http/file_handler.hh
+++ b/include/seastar/http/file_handler.hh
@@ -21,8 +21,8 @@

#pragma once

-#include "handlers.hh"
-#include "core/iostream.hh"
+#include <seastar/http/handlers.hh>
+#include <seastar/core/iostream.hh>

namespace seastar {

diff --git a/http/function_handlers.hh b/include/seastar/http/function_handlers.hh
similarity index 98%
rename from http/function_handlers.hh
rename to include/seastar/http/function_handlers.hh
index fc133a44..01fb5e14 100644
--- a/http/function_handlers.hh
+++ b/include/seastar/http/function_handlers.hh
@@ -21,9 +21,9 @@

#pragma once

-#include "handlers.hh"
+#include <seastar/http/handlers.hh>
#include <functional>
-#include "json/json_elements.hh"
+#include <seastar/json/json_elements.hh>

namespace seastar {

diff --git a/http/handlers.hh b/include/seastar/http/handlers.hh
similarity index 92%
rename from http/handlers.hh
rename to include/seastar/http/handlers.hh
index ea48ba9c..9f794de6 100644
--- a/http/handlers.hh
+++ b/include/seastar/http/handlers.hh
@@ -21,10 +21,10 @@

#pragma once

-#include "request.hh"
-#include "common.hh"
-#include "reply.hh"
-#include "core/future-util.hh"
+#include <seastar/http/request.hh>
+#include <seastar/http/common.hh>
+#include <seastar/http/reply.hh>
+#include <seastar/core/future-util.hh>

#include <unordered_map>

diff --git a/http/httpd.hh b/include/seastar/http/httpd.hh
similarity index 96%
rename from http/httpd.hh
rename to include/seastar/http/httpd.hh
index 753308d2..99b6f9b5 100644
--- a/http/httpd.hh
+++ b/include/seastar/http/httpd.hh
@@ -21,17 +21,17 @@

#pragma once

-#include "http/request_parser.hh"
-#include "http/request.hh"
-#include "core/reactor.hh"
-#include "core/sstring.hh"
+#include <seastar/http/request_parser.hh>
+#include <seastar/http/request.hh>
+#include <seastar/core/reactor.hh>
+#include <seastar/core/sstring.hh>
#include <experimental/string_view>
-#include "core/app-template.hh"
-#include "core/circular_buffer.hh"
-#include "core/distributed.hh"
-#include "core/queue.hh"
-#include "core/future-util.hh"
-#include "core/metrics_registration.hh"
+#include <seastar/core/app-template.hh>
+#include <seastar/core/circular_buffer.hh>
+#include <seastar/core/distributed.hh>
+#include <seastar/core/queue.hh>
+#include <seastar/core/future-util.hh>
+#include <seastar/core/metrics_registration.hh>
#include <iostream>
#include <algorithm>
#include <unordered_map>
@@ -41,7 +41,7 @@
#include <cctype>
#include <vector>
#include <boost/intrusive/list.hpp>
-#include "http/routes.hh"
+#include <seastar/http/routes.hh>

namespace seastar {

diff --git a/http/json_path.hh b/include/seastar/http/json_path.hh
similarity index 97%
rename from http/json_path.hh
rename to include/seastar/http/json_path.hh
index 40020304..95ac7e7d 100644
--- a/http/json_path.hh
+++ b/include/seastar/http/json_path.hh
@@ -24,10 +24,10 @@
#include <vector>
#include <unordered_map>
#include <tuple>
-#include "common.hh"
-#include "core/sstring.hh"
-#include "routes.hh"
-#include "function_handlers.hh"
+#include <seastar/http/common.hh>
+#include <seastar/core/sstring.hh>
+#include <seastar/http/routes.hh>
+#include <seastar/http/function_handlers.hh>

namespace seastar {

diff --git a/http/matcher.hh b/include/seastar/http/matcher.hh
similarity index 97%
rename from http/matcher.hh
rename to include/seastar/http/matcher.hh
index 5be29f0a..ab039763 100644
--- a/http/matcher.hh
+++ b/include/seastar/http/matcher.hh
@@ -21,9 +21,9 @@

#pragma once

-#include "common.hh"
+#include <seastar/http/common.hh>

-#include "core/sstring.hh"
+#include <seastar/core/sstring.hh>

namespace seastar {

diff --git a/http/matchrules.hh b/include/seastar/http/matchrules.hh
similarity index 95%
rename from http/matchrules.hh
rename to include/seastar/http/matchrules.hh
index 60f64efc..6907bbb6 100644
--- a/http/matchrules.hh
+++ b/include/seastar/http/matchrules.hh
@@ -21,11 +21,11 @@

#pragma once

-#include "handlers.hh"
-#include "matcher.hh"
-#include "common.hh"
+#include <seastar/http/handlers.hh>
+#include <seastar/http/matcher.hh>
+#include <seastar/http/common.hh>

-#include "core/sstring.hh"
+#include <seastar/core/sstring.hh>
#include <vector>

namespace seastar {
diff --git a/http/mime_types.hh b/include/seastar/http/mime_types.hh
similarity index 94%
rename from http/mime_types.hh
rename to include/seastar/http/mime_types.hh
index 184a9fe9..c5530f5a 100644
--- a/http/mime_types.hh
+++ b/include/seastar/http/mime_types.hh
@@ -10,7 +10,7 @@

#pragma once

-#include "core/sstring.hh"
+#include <seastar/core/sstring.hh>

namespace seastar {

diff --git a/http/reply.hh b/include/seastar/http/reply.hh
similarity index 96%
rename from http/reply.hh
rename to include/seastar/http/reply.hh
index bc60d6ef..bee1d929 100644
--- a/http/reply.hh
+++ b/include/seastar/http/reply.hh
@@ -31,12 +31,12 @@
//
#pragma once

-#include "core/sstring.hh"
+#include <seastar/core/sstring.hh>
#include <unordered_map>
-#include "http/mime_types.hh"
-#include "core/future-util.hh"
-#include "core/iostream.hh"
-#include "util/noncopyable_function.hh"
+#include <seastar/http/mime_types.hh>
+#include <seastar/core/future-util.hh>
+#include <seastar/core/iostream.hh>
+#include <seastar/util/noncopyable_function.hh>

namespace seastar {

diff --git a/http/request.hh b/include/seastar/http/request.hh
similarity index 97%
rename from http/request.hh
rename to include/seastar/http/request.hh
index 9c07139c..5807259a 100644
--- a/http/request.hh
+++ b/include/seastar/http/request.hh
@@ -30,11 +30,11 @@
//
#pragma once

-#include "core/sstring.hh"
+#include <seastar/core/sstring.hh>
#include <string>
#include <vector>
#include <strings.h>
-#include "common.hh"
+#include <seastar/http/common.hh>

namespace seastar {

diff --git a/http/routes.hh b/include/seastar/http/routes.hh
similarity index 97%
rename from http/routes.hh
rename to include/seastar/http/routes.hh
index 98fc5856..b51adb5f 100644
--- a/http/routes.hh
+++ b/include/seastar/http/routes.hh
@@ -21,15 +21,15 @@

#pragma once

-#include "matchrules.hh"
-#include "handlers.hh"
-#include "common.hh"
-#include "reply.hh"
+#include <seastar/http/matchrules.hh>
+#include <seastar/http/handlers.hh>
+#include <seastar/http/common.hh>
+#include <seastar/http/reply.hh>

#include <boost/program_options/variables_map.hpp>
#include <unordered_map>
#include <vector>
-#include "core/future-util.hh"
+#include <seastar/core/future-util.hh>

namespace seastar {

diff --git a/http/transformers.hh b/include/seastar/http/transformers.hh
similarity index 95%
rename from http/transformers.hh
rename to include/seastar/http/transformers.hh
index 7a4387b1..82732587 100644
--- a/http/transformers.hh
+++ b/include/seastar/http/transformers.hh
@@ -21,8 +21,8 @@

#pragma once

-#include "handlers.hh"
-#include "file_handler.hh"
+#include <seastar/http/handlers.hh>
+#include <seastar/http/file_handler.hh>

namespace seastar {

diff --git a/json/formatter.hh b/include/seastar/json/formatter.hh
similarity index 99%
rename from json/formatter.hh
rename to include/seastar/json/formatter.hh
index 6c01b126..dd1fc87e 100644
--- a/json/formatter.hh
+++ b/include/seastar/json/formatter.hh
@@ -27,8 +27,8 @@
#include <map>
#include <time.h>
#include <sstream>
-#include "core/sstring.hh"
-#include "core/iostream.hh"
+#include <seastar/core/sstring.hh>
+#include <seastar/core/iostream.hh>

namespace seastar {

diff --git a/json/json_elements.hh b/include/seastar/json/json_elements.hh
similarity index 98%
rename from json/json_elements.hh
rename to include/seastar/json/json_elements.hh
index e543620d..75551801 100644
--- a/json/json_elements.hh
+++ b/include/seastar/json/json_elements.hh
@@ -25,9 +25,9 @@
#include <vector>
#include <time.h>
#include <sstream>
-#include "formatter.hh"
-#include "core/sstring.hh"
-#include "core/iostream.hh"
+#include <seastar/json/formatter.hh>
+#include <seastar/core/sstring.hh>
+#include <seastar/core/iostream.hh>

namespace seastar {

diff --git a/net/api.hh b/include/seastar/net/api.hh
similarity index 97%
rename from net/api.hh
rename to include/seastar/net/api.hh
index e12cc53b..d75fb2d3 100644
--- a/net/api.hh
+++ b/include/seastar/net/api.hh
@@ -24,13 +24,13 @@
#include <memory>
#include <vector>
#include <cstring>
-#include "core/future.hh"
-#include "net/byteorder.hh"
-#include "net/socket_defs.hh"
-#include "net/packet.hh"
-#include "core/print.hh"
-#include "core/temporary_buffer.hh"
-#include "core/iostream.hh"
+#include <seastar/core/future.hh>
+#include <seastar/net/byteorder.hh>
+#include <seastar/net/socket_defs.hh>
+#include <seastar/net/packet.hh>
+#include <seastar/core/print.hh>
+#include <seastar/core/temporary_buffer.hh>
+#include <seastar/core/iostream.hh>
#include <sys/types.h>
#include <boost/variant.hpp>

diff --git a/net/arp.hh b/include/seastar/net/arp.hh
similarity index 98%
rename from net/arp.hh
rename to include/seastar/net/arp.hh
index 01277872..a1098274 100644
--- a/net/arp.hh
+++ b/include/seastar/net/arp.hh
@@ -22,11 +22,11 @@

#pragma once

-#include "net.hh"
-#include "core/reactor.hh"
-#include "core/byteorder.hh"
-#include "ethernet.hh"
-#include "core/print.hh"
+#include <seastar/net/net.hh>
+#include <seastar/core/reactor.hh>
+#include <seastar/core/byteorder.hh>
+#include <seastar/net/ethernet.hh>
+#include <seastar/core/print.hh>
#include <unordered_map>

namespace seastar {
diff --git a/net/byteorder.hh b/include/seastar/net/byteorder.hh
similarity index 98%
rename from net/byteorder.hh
rename to include/seastar/net/byteorder.hh
index 5587a48c..20342c3d 100644
--- a/net/byteorder.hh
+++ b/include/seastar/net/byteorder.hh
@@ -25,7 +25,7 @@
#include <iosfwd>
#include <utility>

-#include "core/unaligned.hh"
+#include <seastar/core/unaligned.hh>

namespace seastar {

diff --git a/net/config.hh b/include/seastar/net/config.hh
similarity index 100%
rename from net/config.hh
rename to include/seastar/net/config.hh
diff --git a/net/const.hh b/include/seastar/net/const.hh
similarity index 100%
rename from net/const.hh
rename to include/seastar/net/const.hh
diff --git a/net/dhcp.hh b/include/seastar/net/dhcp.hh
similarity index 97%
rename from net/dhcp.hh
rename to include/seastar/net/dhcp.hh
index cebefccf..b4685db6 100644
--- a/net/dhcp.hh
+++ b/include/seastar/net/dhcp.hh
@@ -21,8 +21,8 @@

#pragma once

-#include "ip.hh"
-#include "core/reactor.hh"
+#include <seastar/net/ip.hh>
+#include <seastar/core/reactor.hh>

namespace seastar {

diff --git a/net/dns.hh b/include/seastar/net/dns.hh
similarity index 95%
rename from net/dns.hh
rename to include/seastar/net/dns.hh
index 096b035e..9f2069ec 100644
--- a/net/dns.hh
+++ b/include/seastar/net/dns.hh
@@ -26,10 +26,10 @@
#include <memory>
#include <experimental/optional>

-#include "../core/future.hh"
-#include "../core/sstring.hh"
-#include "../core/shared_ptr.hh"
-#include "inet_address.hh"
+#include <seastar/core/future.hh>
+#include <seastar/core/sstring.hh>
+#include <seastar/core/shared_ptr.hh>
+#include <seastar/net/inet_address.hh>

namespace seastar {

diff --git a/net/dpdk.hh b/include/seastar/net/dpdk.hh
similarity index 94%
rename from net/dpdk.hh
rename to include/seastar/net/dpdk.hh
index aefa15cc..3c4c5d41 100644
--- a/net/dpdk.hh
+++ b/include/seastar/net/dpdk.hh
@@ -24,9 +24,9 @@
#ifdef SEASTAR_HAVE_DPDK

#include <memory>
-#include "config.hh"
-#include "net.hh"
-#include "core/sstring.hh"
+#include <seastar/net/config.hh>
+#include <seastar/net/net.hh>
+#include <seastar/core/sstring.hh>

namespace seastar {

diff --git a/net/ethernet.hh b/include/seastar/net/ethernet.hh
similarity index 97%
rename from net/ethernet.hh
rename to include/seastar/net/ethernet.hh
index 5259ed9f..e7a0c8c9 100644
--- a/net/ethernet.hh
+++ b/include/seastar/net/ethernet.hh
@@ -22,8 +22,8 @@
#pragma once

#include <array>
-#include "byteorder.hh"
-#include "core/print.hh"
+#include <seastar/net/byteorder.hh>
+#include <seastar/core/print.hh>

namespace seastar {

diff --git a/net/inet_address.hh b/include/seastar/net/inet_address.hh
similarity index 97%
rename from net/inet_address.hh
rename to include/seastar/net/inet_address.hh
index 6759563e..849820fd 100644
--- a/net/inet_address.hh
+++ b/include/seastar/net/inet_address.hh
@@ -27,8 +27,8 @@
#include <stdexcept>
#include <vector>

-#include "../core/future.hh"
-#include "../core/sstring.hh"
+#include <seastar/core/future.hh>
+#include <seastar/core/sstring.hh>

namespace seastar {
namespace net {
diff --git a/net/ip.hh b/include/seastar/net/ip.hh
similarity index 97%
rename from net/ip.hh
rename to include/seastar/net/ip.hh
index 9d6a68e1..abe10d22 100644
--- a/net/ip.hh
+++ b/include/seastar/net/ip.hh
@@ -30,17 +30,17 @@
#include <map>
#include <list>
#include <chrono>
-#include "core/array_map.hh"
-#include "byteorder.hh"
-#include "core/byteorder.hh"
-#include "arp.hh"
-#include "ip_checksum.hh"
-#include "const.hh"
-#include "packet-util.hh"
-#include "core/shared_ptr.hh"
-#include "toeplitz.hh"
-#include "net/udp.hh"
-#include "core/metrics_registration.hh"
+#include <seastar/core/array_map.hh>
+#include <seastar/net/byteorder.hh>
+#include <seastar/core/byteorder.hh>
+#include <seastar/net/arp.hh>
+#include <seastar/net/ip_checksum.hh>
+#include <seastar/net/const.hh>
+#include <seastar/net/packet-util.hh>
+#include <seastar/core/shared_ptr.hh>
+#include <seastar/net/toeplitz.hh>
+#include <seastar/net/udp.hh>
+#include <seastar/core/metrics_registration.hh>

namespace seastar {

diff --git a/net/ip_checksum.hh b/include/seastar/net/ip_checksum.hh
similarity index 98%
rename from net/ip_checksum.hh
rename to include/seastar/net/ip_checksum.hh
index 7d36388a..cb353914 100644
--- a/net/ip_checksum.hh
+++ b/include/seastar/net/ip_checksum.hh
@@ -21,7 +21,7 @@

#pragma once

-#include "packet.hh"
+#include <seastar/net/packet.hh>
#include <cstdint>
#include <cstddef>
#include <arpa/inet.h>
diff --git a/net/native-stack.hh b/include/seastar/net/native-stack.hh
similarity index 97%
rename from net/native-stack.hh
rename to include/seastar/net/native-stack.hh
index a31f9106..041c75f0 100644
--- a/net/native-stack.hh
+++ b/include/seastar/net/native-stack.hh
@@ -21,7 +21,7 @@

#pragma once

-#include "net/net.hh"
+#include <seastar/net/net.hh>
#include <boost/program_options.hpp>

namespace seastar {
diff --git a/net/net.hh b/include/seastar/net/net.hh
similarity index 96%
rename from net/net.hh
rename to include/seastar/net/net.hh
index 313b74dd..2bbba87e 100644
--- a/net/net.hh
+++ b/include/seastar/net/net.hh
@@ -21,15 +21,15 @@

#pragma once

-#include "core/reactor.hh"
-#include "core/deleter.hh"
-#include "core/queue.hh"
-#include "core/stream.hh"
-#include "core/metrics_registration.hh"
-#include "net/toeplitz.hh"
-#include "ethernet.hh"
-#include "packet.hh"
-#include "const.hh"
+#include <seastar/core/reactor.hh>
+#include <seastar/core/deleter.hh>
+#include <seastar/core/queue.hh>
+#include <seastar/core/stream.hh>
+#include <seastar/core/metrics_registration.hh>
+#include <seastar/net/toeplitz.hh>
+#include <seastar/net/ethernet.hh>
+#include <seastar/net/packet.hh>
+#include <seastar/net/const.hh>
#include <unordered_map>

namespace seastar {
diff --git a/net/packet-data-source.hh b/include/seastar/net/packet-data-source.hh
similarity index 95%
rename from net/packet-data-source.hh
rename to include/seastar/net/packet-data-source.hh
index 207f8ec8..0431e48f 100644
--- a/net/packet-data-source.hh
+++ b/include/seastar/net/packet-data-source.hh
@@ -17,8 +17,8 @@
*/
#pragma once

-#include "core/reactor.hh"
-#include "net/packet.hh"
+#include <seastar/core/reactor.hh>
+#include <seastar/net/packet.hh>

namespace seastar {

diff --git a/net/packet-util.hh b/include/seastar/net/packet-util.hh
similarity index 99%
rename from net/packet-util.hh
rename to include/seastar/net/packet-util.hh
index 1893f8df..2e9a5a13 100644
--- a/net/packet-util.hh
+++ b/include/seastar/net/packet-util.hh
@@ -21,7 +21,7 @@

#pragma once

-#include "net/packet.hh"
+#include <seastar/net/packet.hh>
#include <map>
#include <iostream>

diff --git a/net/packet.hh b/include/seastar/net/packet.hh
similarity index 99%
rename from net/packet.hh
rename to include/seastar/net/packet.hh
index 4741f557..4eca3860 100644
--- a/net/packet.hh
+++ b/include/seastar/net/packet.hh
@@ -21,9 +21,9 @@

#pragma once

-#include "core/deleter.hh"
-#include "core/temporary_buffer.hh"
-#include "const.hh"
+#include <seastar/core/deleter.hh>
+#include <seastar/core/temporary_buffer.hh>
+#include <seastar/net/const.hh>
#include <vector>
#include <cassert>
#include <algorithm>
diff --git a/net/posix-stack.hh b/include/seastar/net/posix-stack.hh
similarity index 98%
rename from net/posix-stack.hh
rename to include/seastar/net/posix-stack.hh
index bc1f39b8..42c5246a 100644
--- a/net/posix-stack.hh
+++ b/include/seastar/net/posix-stack.hh
@@ -21,9 +21,9 @@

#pragma once

-#include "core/reactor.hh"
-#include "core/sharded.hh"
-#include "stack.hh"
+#include <seastar/core/reactor.hh>
+#include <seastar/core/sharded.hh>
+#include <seastar/net/stack.hh>
#include <boost/program_options.hpp>

namespace seastar {
diff --git a/net/proxy.hh b/include/seastar/net/proxy.hh
similarity index 93%
rename from net/proxy.hh
rename to include/seastar/net/proxy.hh
index fb5bd42e..cd263242 100644
--- a/net/proxy.hh
+++ b/include/seastar/net/proxy.hh
@@ -18,8 +18,8 @@
#pragma once

#include <memory>
-#include "net.hh"
-#include "packet.hh"
+#include <seastar/net/net.hh>
+#include <seastar/net/packet.hh>

namespace seastar {

diff --git a/net/socket_defs.hh b/include/seastar/net/socket_defs.hh
similarity index 98%
rename from net/socket_defs.hh
rename to include/seastar/net/socket_defs.hh
index 0822ee08..1e8dc92f 100644
--- a/net/socket_defs.hh
+++ b/include/seastar/net/socket_defs.hh
@@ -23,7 +23,7 @@
#include <iosfwd>
#include <sys/socket.h>
#include <netinet/ip.h>
-#include "net/byteorder.hh"
+#include <seastar/net/byteorder.hh>

namespace seastar {

diff --git a/net/stack.hh b/include/seastar/net/stack.hh
similarity index 98%
rename from net/stack.hh
rename to include/seastar/net/stack.hh
index c5e5158a..11b65f70 100644
--- a/net/stack.hh
+++ b/include/seastar/net/stack.hh
@@ -21,7 +21,7 @@
#pragma once

#include <chrono>
-#include "api.hh"
+#include <seastar/net/api.hh>

namespace seastar {

diff --git a/net/tcp-stack.hh b/include/seastar/net/tcp-stack.hh
similarity index 97%
rename from net/tcp-stack.hh
rename to include/seastar/net/tcp-stack.hh
index c1a36b12..0deca237 100644
--- a/net/tcp-stack.hh
+++ b/include/seastar/net/tcp-stack.hh
@@ -23,7 +23,7 @@

#pragma once

-#include "core/future.hh"
+#include <seastar/core/future.hh>

namespace seastar {

diff --git a/net/tcp.hh b/include/seastar/net/tcp.hh
similarity index 99%
rename from net/tcp.hh
rename to include/seastar/net/tcp.hh
index 926855e7..e0e9d9d0 100644
--- a/net/tcp.hh
+++ b/include/seastar/net/tcp.hh
@@ -21,17 +21,17 @@

#pragma once

-#include "core/shared_ptr.hh"
-#include "core/queue.hh"
-#include "core/semaphore.hh"
-#include "core/print.hh"
-#include "core/byteorder.hh"
-#include "core/metrics.hh"
-#include "net.hh"
-#include "ip_checksum.hh"
-#include "ip.hh"
-#include "const.hh"
-#include "packet-util.hh"
+#include <seastar/core/shared_ptr.hh>
+#include <seastar/core/queue.hh>
+#include <seastar/core/semaphore.hh>
+#include <seastar/core/print.hh>
+#include <seastar/core/byteorder.hh>
+#include <seastar/core/metrics.hh>
+#include <seastar/net/net.hh>
+#include <seastar/net/ip_checksum.hh>
+#include <seastar/net/ip.hh>
+#include <seastar/net/const.hh>
+#include <seastar/net/packet-util.hh>
#include <unordered_map>
#include <map>
#include <functional>
diff --git a/net/tls.hh b/include/seastar/net/tls.hh
similarity index 98%
rename from net/tls.hh
rename to include/seastar/net/tls.hh
index 994fb9a9..b557add3 100644
--- a/net/tls.hh
+++ b/include/seastar/net/tls.hh
@@ -26,10 +26,10 @@

#include <boost/any.hpp>

-#include "core/future.hh"
-#include "core/sstring.hh"
-#include "core/shared_ptr.hh"
-#include "socket_defs.hh"
+#include <seastar/core/future.hh>
+#include <seastar/core/sstring.hh>
+#include <seastar/core/shared_ptr.hh>
+#include <seastar/net/socket_defs.hh>

namespace seastar {

diff --git a/net/toeplitz.hh b/include/seastar/net/toeplitz.hh
similarity index 100%
rename from net/toeplitz.hh
rename to include/seastar/net/toeplitz.hh
diff --git a/net/udp.hh b/include/seastar/net/udp.hh
similarity index 90%
rename from net/udp.hh
rename to include/seastar/net/udp.hh
index 9b45cf40..bd003e33 100644
--- a/net/udp.hh
+++ b/include/seastar/net/udp.hh
@@ -24,11 +24,11 @@

#include <unordered_map>
#include <assert.h>
-#include "core/reactor.hh"
-#include "core/shared_ptr.hh"
-#include "net/api.hh"
-#include "const.hh"
-#include "net.hh"
+#include <seastar/core/reactor.hh>
+#include <seastar/core/shared_ptr.hh>
+#include <seastar/net/api.hh>
+#include <seastar/net/const.hh>
+#include <seastar/net/net.hh>

namespace seastar {

diff --git a/net/virtio-interface.hh b/include/seastar/net/virtio-interface.hh
similarity index 100%
rename from net/virtio-interface.hh
rename to include/seastar/net/virtio-interface.hh
diff --git a/net/virtio.hh b/include/seastar/net/virtio.hh
similarity index 94%
rename from net/virtio.hh
rename to include/seastar/net/virtio.hh
index affe8155..4e530ef6 100644
--- a/net/virtio.hh
+++ b/include/seastar/net/virtio.hh
@@ -22,8 +22,8 @@
#pragma once

#include <memory>
-#include "net.hh"
-#include "core/sstring.hh"
+#include <seastar/net/net.hh>
+#include <seastar/core/sstring.hh>

namespace seastar {

diff --git a/rpc/lz4_compressor.hh b/include/seastar/rpc/lz4_compressor.hh
similarity index 95%
rename from rpc/lz4_compressor.hh
rename to include/seastar/rpc/lz4_compressor.hh
index d3fdd525..92738ddd 100644
--- a/rpc/lz4_compressor.hh
+++ b/include/seastar/rpc/lz4_compressor.hh
@@ -21,8 +21,8 @@

#pragma once

-#include "core/sstring.hh"
-#include "rpc/rpc_types.hh"
+#include <seastar/core/sstring.hh>
+#include <seastar/rpc/rpc_types.hh>
#include <lz4.h>

namespace seastar {
diff --git a/rpc/multi_algo_compressor_factory.hh b/include/seastar/rpc/multi_algo_compressor_factory.hh
similarity index 97%
rename from rpc/multi_algo_compressor_factory.hh
rename to include/seastar/rpc/multi_algo_compressor_factory.hh
index bc95ffde..7a4380dc 100644
--- a/rpc/multi_algo_compressor_factory.hh
+++ b/include/seastar/rpc/multi_algo_compressor_factory.hh
@@ -23,8 +23,8 @@

#include <boost/range/adaptor/transformed.hpp>
#include <boost/algorithm/string.hpp>
-#include "core/sstring.hh"
-#include "rpc_types.hh"
+#include <seastar/core/sstring.hh>
+#include <seastar/rpc/rpc_types.hh>

namespace seastar {

diff --git a/rpc/rpc.hh b/include/seastar/rpc/rpc.hh
similarity index 98%
rename from rpc/rpc.hh
rename to include/seastar/rpc/rpc.hh
index 7251da69..8258b591 100644
--- a/rpc/rpc.hh
+++ b/include/seastar/rpc/rpc.hh
@@ -24,19 +24,19 @@
#include <unordered_map>
#include <unordered_set>
#include <list>
-#include "core/future.hh"
-#include "net/api.hh"
-#include "core/reactor.hh"
-#include "core/iostream.hh"
-#include "core/shared_ptr.hh"
-#include "core/condition-variable.hh"
-#include "core/gate.hh"
-#include "rpc/rpc_types.hh"
-#include "core/byteorder.hh"
-#include "core/shared_future.hh"
-#include "core/queue.hh"
-#include "core/weak_ptr.hh"
-#include "../core/scheduling.hh"
+#include <seastar/core/future.hh>
+#include <seastar/net/api.hh>
+#include <seastar/core/reactor.hh>
+#include <seastar/core/iostream.hh>
+#include <seastar/core/shared_ptr.hh>
+#include <seastar/core/condition-variable.hh>
+#include <seastar/core/gate.hh>
+#include <seastar/rpc/rpc_types.hh>
+#include <seastar/core/byteorder.hh>
+#include <seastar/core/shared_future.hh>
+#include <seastar/core/queue.hh>
+#include <seastar/core/weak_ptr.hh>
+#include <seastar/core/scheduling.hh>

namespace seastar {

diff --git a/rpc/rpc_impl.hh b/include/seastar/rpc/rpc_impl.hh
similarity index 98%
rename from rpc/rpc_impl.hh
rename to include/seastar/rpc/rpc_impl.hh
index fb44b939..779b2f4e 100644
--- a/rpc/rpc_impl.hh
+++ b/include/seastar/rpc/rpc_impl.hh
@@ -21,16 +21,16 @@
#pragma once

#include <iostream>
-#include "core/function_traits.hh"
-#include "core/apply.hh"
-#include "core/shared_ptr.hh"
-#include "core/sstring.hh"
-#include "core/future-util.hh"
-#include "util/is_smart_ptr.hh"
-#include "core/simple-stream.hh"
+#include <seastar/core/function_traits.hh>
+#include <seastar/core/apply.hh>
+#include <seastar/core/shared_ptr.hh>
+#include <seastar/core/sstring.hh>
+#include <seastar/core/future-util.hh>
+#include <seastar/util/is_smart_ptr.hh>
+#include <seastar/core/simple-stream.hh>
#include <boost/range/numeric.hpp>
#include <boost/range/adaptor/transformed.hpp>
-#include "net/packet-data-source.hh"
+#include <seastar/net/packet-data-source.hh>

namespace seastar {

diff --git a/rpc/rpc_types.hh b/include/seastar/rpc/rpc_types.hh
similarity index 98%
rename from rpc/rpc_types.hh
rename to include/seastar/rpc/rpc_types.hh
index 85757295..09963f1e 100644
--- a/rpc/rpc_types.hh
+++ b/include/seastar/rpc/rpc_types.hh
@@ -21,19 +21,19 @@

#pragma once

-#include "net/api.hh"
+#include <seastar/net/api.hh>
#include <stdexcept>
#include <string>
#include <boost/any.hpp>
#include <boost/type.hpp>
#include <experimental/optional>
#include <boost/variant.hpp>
-#include "core/timer.hh"
-#include "core/simple-stream.hh"
-#include "core/lowres_clock.hh"
+#include <seastar/core/timer.hh>
+#include <seastar/core/simple-stream.hh>
+#include <seastar/core/lowres_clock.hh>
#include <boost/functional/hash.hpp>
#include <iostream>
-#include <core/sharded.hh>
+#include <seastar/core/sharded.hh>

namespace seastar {

diff --git a/util/alloc_failure_injector.hh b/include/seastar/util/alloc_failure_injector.hh
similarity index 98%
rename from util/alloc_failure_injector.hh
rename to include/seastar/util/alloc_failure_injector.hh
index a20ddfd7..908f9c0e 100644
--- a/util/alloc_failure_injector.hh
+++ b/include/seastar/util/alloc_failure_injector.hh
@@ -24,7 +24,7 @@
#include <limits>
#include <cstdint>
#include <functional>
-#include "noncopyable_function.hh"
+#include <seastar/util/noncopyable_function.hh>

namespace seastar {
namespace memory {
diff --git a/util/backtrace.hh b/include/seastar/util/backtrace.hh
similarity index 98%
rename from util/backtrace.hh
rename to include/seastar/util/backtrace.hh
index b5d3f452..17327990 100644
--- a/util/backtrace.hh
+++ b/include/seastar/util/backtrace.hh
@@ -25,8 +25,8 @@
#include <iosfwd>
#include <boost/container/static_vector.hpp>

-#include "core/sstring.hh"
-#include "core/print.hh"
+#include <seastar/core/sstring.hh>
+#include <seastar/core/print.hh>

namespace seastar {

diff --git a/util/bool_class.hh b/include/seastar/util/bool_class.hh
similarity index 100%
rename from util/bool_class.hh
rename to include/seastar/util/bool_class.hh
diff --git a/util/conversions.hh b/include/seastar/util/conversions.hh
similarity index 100%
rename from util/conversions.hh
rename to include/seastar/util/conversions.hh
diff --git a/util/defer.hh b/include/seastar/util/defer.hh
similarity index 100%
rename from util/defer.hh
rename to include/seastar/util/defer.hh
diff --git a/util/eclipse.hh b/include/seastar/util/eclipse.hh
similarity index 100%
rename from util/eclipse.hh
rename to include/seastar/util/eclipse.hh
diff --git a/util/function_input_iterator.hh b/include/seastar/util/function_input_iterator.hh
similarity index 100%
rename from util/function_input_iterator.hh
rename to include/seastar/util/function_input_iterator.hh
diff --git a/util/gcc6-concepts.hh b/include/seastar/util/gcc6-concepts.hh
similarity index 100%
rename from util/gcc6-concepts.hh
rename to include/seastar/util/gcc6-concepts.hh
diff --git a/util/indirect.hh b/include/seastar/util/indirect.hh
similarity index 100%
rename from util/indirect.hh
rename to include/seastar/util/indirect.hh
diff --git a/util/is_smart_ptr.hh b/include/seastar/util/is_smart_ptr.hh
similarity index 100%
rename from util/is_smart_ptr.hh
rename to include/seastar/util/is_smart_ptr.hh
diff --git a/util/lazy.hh b/include/seastar/util/lazy.hh
similarity index 100%
rename from util/lazy.hh
rename to include/seastar/util/lazy.hh
diff --git a/util/log-cli.hh b/include/seastar/util/log-cli.hh
similarity index 95%
rename from util/log-cli.hh
rename to include/seastar/util/log-cli.hh
index 2e481fa6..8262a22b 100644
--- a/util/log-cli.hh
+++ b/include/seastar/util/log-cli.hh
@@ -21,10 +21,10 @@

#pragma once

-#include "log.hh"
-#include "program-options.hh"
+#include <seastar/util/log.hh>
+#include <seastar/util/program-options.hh>

-#include "core/sstring.hh"
+#include <seastar/core/sstring.hh>

#include <boost/program_options.hpp>

diff --git a/util/log.hh b/include/seastar/util/log.hh
similarity index 99%
rename from util/log.hh
rename to include/seastar/util/log.hh
index 555ef5dc..27af26a0 100644
--- a/util/log.hh
+++ b/include/seastar/util/log.hh
@@ -20,7 +20,7 @@
*/
#pragma once

-#include "core/sstring.hh"
+#include <seastar/core/sstring.hh>
#include <unordered_map>
#include <exception>
#include <iosfwd>
diff --git a/util/noncopyable_function.hh b/include/seastar/util/noncopyable_function.hh
similarity index 100%
rename from util/noncopyable_function.hh
rename to include/seastar/util/noncopyable_function.hh
diff --git a/util/optimized_optional.hh b/include/seastar/util/optimized_optional.hh
similarity index 98%
rename from util/optimized_optional.hh
rename to include/seastar/util/optimized_optional.hh
index e410eb28..69f382fb 100644
--- a/util/optimized_optional.hh
+++ b/include/seastar/util/optimized_optional.hh
@@ -21,7 +21,7 @@

#pragma once

-#include "util/gcc6-concepts.hh"
+#include <seastar/util/gcc6-concepts.hh>

#include <experimental/optional>
#include <experimental/type_traits>
@@ -101,4 +101,4 @@ class optimized_optional {
}
};

-}
\ No newline at end of file
+}
diff --git a/util/print_safe.hh b/include/seastar/util/print_safe.hh
similarity index 100%
rename from util/print_safe.hh
rename to include/seastar/util/print_safe.hh
diff --git a/util/program-options.hh b/include/seastar/util/program-options.hh
similarity index 98%
rename from util/program-options.hh
rename to include/seastar/util/program-options.hh
index 26e5da3b..2d98ba50 100644
--- a/util/program-options.hh
+++ b/include/seastar/util/program-options.hh
@@ -21,7 +21,7 @@

#pragma once

-#include "core/sstring.hh"
+#include <seastar/core/sstring.hh>

#include <boost/any.hpp>
#include <boost/program_options.hpp>
diff --git a/util/reference_wrapper.hh b/include/seastar/util/reference_wrapper.hh
similarity index 100%
rename from util/reference_wrapper.hh
rename to include/seastar/util/reference_wrapper.hh
diff --git a/util/spinlock.hh b/include/seastar/util/spinlock.hh
similarity index 100%
rename from util/spinlock.hh
rename to include/seastar/util/spinlock.hh
diff --git a/util/transform_iterator.hh b/include/seastar/util/transform_iterator.hh
similarity index 100%
rename from util/transform_iterator.hh
rename to include/seastar/util/transform_iterator.hh
diff --git a/util/tuple_utils.hh b/include/seastar/util/tuple_utils.hh
similarity index 100%
rename from util/tuple_utils.hh
rename to include/seastar/util/tuple_utils.hh
diff --git a/util/variant_utils.hh b/include/seastar/util/variant_utils.hh
similarity index 100%
rename from util/variant_utils.hh
rename to include/seastar/util/variant_utils.hh
diff --git a/core/alien.cc b/src/core/alien.cc
similarity index 97%
rename from core/alien.cc
rename to src/core/alien.cc
index 5f60b95b..64ff10db 100644
--- a/core/alien.cc
+++ b/src/core/alien.cc
@@ -20,9 +20,9 @@
* Copyright (C) 2018 Red Hat
*/

-#include "alien.hh"
-#include "metrics.hh"
-#include "prefetch.hh"
+#include <seastar/core/alien.hh>
+#include <seastar/core/metrics.hh>
+#include <seastar/core/prefetch.hh>

namespace seastar {
namespace alien {
diff --git a/core/app-template.cc b/src/core/app-template.cc
similarity index 95%
rename from core/app-template.cc
rename to src/core/app-template.cc
index b7c31a35..ca861141 100644
--- a/core/app-template.cc
+++ b/src/core/app-template.cc
@@ -19,14 +19,14 @@
* Copyright (C) 2014 Cloudius Systems, Ltd.
*/

-#include "app-template.hh"
-#include "core/reactor.hh"
-#include "core/scollectd.hh"
-#include "core/metrics_api.hh"
+#include <seastar/core/app-template.hh>
+#include <seastar/core/reactor.hh>
+#include <seastar/core/scollectd.hh>
+#include <seastar/core/metrics_api.hh>
#include <boost/program_options.hpp>
-#include "core/print.hh"
-#include "util/log.hh"
-#include "util/log-cli.hh"
+#include <seastar/core/print.hh>
+#include <seastar/util/log.hh>
+#include <seastar/util/log-cli.hh>
#include <boost/program_options.hpp>
#include <boost/make_shared.hpp>
#include <fstream>
diff --git a/core/dpdk_rte.cc b/src/core/dpdk_rte.cc
similarity index 96%
rename from core/dpdk_rte.cc
rename to src/core/dpdk_rte.cc
index fba0b5af..af445b6f 100644
--- a/core/dpdk_rte.cc
+++ b/src/core/dpdk_rte.cc
@@ -18,9 +18,9 @@
#ifdef SEASTAR_HAVE_DPDK

#include <cinttypes>
-#include "net/dpdk.hh"
-#include "core/dpdk_rte.hh"
-#include "util/conversions.hh"
+#include <seastar/net/dpdk.hh>
+#include <seastar/core/dpdk_rte.hh>
+#include <seastar/util/conversions.hh>
#include <experimental/optional>
#include <rte_pci.h>

diff --git a/core/exception_hacks.cc b/src/core/exception_hacks.cc
similarity index 97%
rename from core/exception_hacks.cc
rename to src/core/exception_hacks.cc
index 71038181..bceff34d 100644
--- a/core/exception_hacks.cc
+++ b/src/core/exception_hacks.cc
@@ -57,9 +57,9 @@
#include <assert.h>
#include <vector>
#include <cstddef>
-#include "exception_hacks.hh"
-#include "reactor.hh"
-#include "util/backtrace.hh"
+#include <seastar/core/exception_hacks.hh>
+#include <seastar/core/reactor.hh>
+#include <seastar/util/backtrace.hh>

namespace seastar {
#ifndef SEASTAR_NO_EXCEPTION_HACK
diff --git a/core/execution_stage.cc b/src/core/execution_stage.cc
similarity index 98%
rename from core/execution_stage.cc
rename to src/core/execution_stage.cc
index 8d79ad0c..463fc0bf 100644
--- a/core/execution_stage.cc
+++ b/src/core/execution_stage.cc
@@ -19,8 +19,8 @@
* Copyright (C) 2018 ScyllaDB Ltd.
*/

-#include "execution_stage.hh"
-#include "print.hh"
+#include <seastar/core/execution_stage.hh>
+#include <seastar/core/print.hh>

namespace seastar {

diff --git a/core/file-impl.hh b/src/core/file-impl.hh
similarity index 99%
rename from core/file-impl.hh
rename to src/core/file-impl.hh
index 26460f8a..20af0072 100644
--- a/core/file-impl.hh
+++ b/src/core/file-impl.hh
@@ -21,8 +21,8 @@

#pragma once

-#include "file.hh"
-#include "shared_ptr.hh"
+#include <seastar/core/file.hh>
+#include <seastar/core/shared_ptr.hh>

#include <deque>
#include <atomic>
diff --git a/core/fsqual.cc b/src/core/fsqual.cc
similarity index 95%
rename from core/fsqual.cc
rename to src/core/fsqual.cc
index 8e5dd570..65d69a4d 100644
--- a/core/fsqual.cc
+++ b/src/core/fsqual.cc
@@ -19,9 +19,9 @@
* under the License.
*/

-#include "posix.hh"
-#include "util/defer.hh"
-#include "core/linux-aio.hh"
+#include <seastar/core/posix.hh>
+#include <seastar/util/defer.hh>
+#include <seastar/core/linux-aio.hh>
#include <sys/time.h>
#include <sys/resource.h>
#include <fcntl.h>
@@ -29,7 +29,7 @@
#include <unistd.h>
#include <cstdlib>
#include <type_traits>
-#include "fsqual.hh"
+#include <seastar/core/fsqual.hh>

namespace seastar {

diff --git a/core/fstream.cc b/src/core/fstream.cc
similarity index 99%
rename from core/fstream.cc
rename to src/core/fstream.cc
index 71a7a0ad..e582d162 100644
--- a/core/fstream.cc
+++ b/src/core/fstream.cc
@@ -19,11 +19,11 @@
* Copyright (C) 2015 Cloudius Systems, Ltd.
*/

-#include "fstream.hh"
-#include "align.hh"
-#include "circular_buffer.hh"
-#include "semaphore.hh"
-#include "reactor.hh"
+#include <seastar/core/fstream.hh>
+#include <seastar/core/align.hh>
+#include <seastar/core/circular_buffer.hh>
+#include <seastar/core/semaphore.hh>
+#include <seastar/core/reactor.hh>
#include <malloc.h>
#include <string.h>

diff --git a/core/future-util.cc b/src/core/future-util.cc
similarity index 98%
rename from core/future-util.cc
rename to src/core/future-util.cc
index 96d4aa13..bd36cac5 100644
--- a/core/future-util.cc
+++ b/src/core/future-util.cc
@@ -19,7 +19,7 @@
* Copyright (C) 2017 ScyllaDB
*/

-#include "core/sleep.hh"
+#include <seastar/core/sleep.hh>

namespace seastar {

@@ -68,4 +68,4 @@ future<> sleep_abortable(typename Clock::duration dur, abort_source& as) {
template future<> sleep_abortable<steady_clock_type>(typename steady_clock_type::duration, abort_source&);
template future<> sleep_abortable<lowres_clock>(typename lowres_clock::duration, abort_source&);

-}
\ No newline at end of file
+}
diff --git a/core/linux-aio.cc b/src/core/linux-aio.cc
similarity index 99%
rename from core/linux-aio.cc
rename to src/core/linux-aio.cc
index 1ddff279..2e297d3d 100644
--- a/core/linux-aio.cc
+++ b/src/core/linux-aio.cc
@@ -19,7 +19,7 @@
* Copyright (C) 2017 ScyllaDB
*/

-#include "linux-aio.hh"
+#include <seastar/core/linux-aio.hh>
#include <unistd.h>
#include <sys/syscall.h>
#include <atomic>
diff --git a/core/memory.cc b/src/core/memory.cc
similarity index 99%
rename from core/memory.cc
rename to src/core/memory.cc
index fcd1a551..fed7504d 100644
--- a/core/memory.cc
+++ b/src/core/memory.cc
@@ -52,10 +52,10 @@
// Spans have a size that is a power-of-two and are naturally aligned (aka buddy
// allocator)

-#include "cacheline.hh"
-#include "memory.hh"
-#include "reactor.hh"
-#include "util/alloc_failure_injector.hh"
+#include <seastar/core/cacheline.hh>
+#include <seastar/core/memory.hh>
+#include <seastar/core/reactor.hh>
+#include <seastar/util/alloc_failure_injector.hh>

namespace seastar {

@@ -77,10 +77,10 @@ disable_abort_on_alloc_failure_temporarily::~disable_abort_on_alloc_failure_temp

#ifndef SEASTAR_DEFAULT_ALLOCATOR

-#include "bitops.hh"
-#include "align.hh"
-#include "posix.hh"
-#include "shared_ptr.hh"
+#include <seastar/core/bitops.hh>
+#include <seastar/core/align.hh>
+#include <seastar/core/posix.hh>
+#include <seastar/core/shared_ptr.hh>
#include <new>
#include <cstdint>
#include <algorithm>
@@ -93,8 +93,8 @@ disable_abort_on_alloc_failure_temporarily::~disable_abort_on_alloc_failure_temp
#include <cstring>
#include <boost/intrusive/list.hpp>
#include <sys/mman.h>
-#include "util/defer.hh"
-#include "util/backtrace.hh"
+#include <seastar/util/defer.hh>
+#include <seastar/util/backtrace.hh>

#ifdef SEASTAR_HAVE_NUMA
#include <numaif.h>
diff --git a/core/metrics.cc b/src/core/metrics.cc
similarity index 99%
rename from core/metrics.cc
rename to src/core/metrics.cc
index c56e480a..6cb11571 100644
--- a/core/metrics.cc
+++ b/src/core/metrics.cc
@@ -19,8 +19,8 @@
* Copyright (C) 2016 ScyllaDB.
*/

-#include "metrics.hh"
-#include "metrics_api.hh"
+#include <seastar/core/metrics.hh>
+#include <seastar/core/metrics_api.hh>
#include <boost/range/algorithm.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/algorithm/string/replace.hpp>
diff --git a/core/posix.cc b/src/core/posix.cc
similarity index 98%
rename from core/posix.cc
rename to src/core/posix.cc
index 7dae9804..8e0de27e 100644
--- a/core/posix.cc
+++ b/src/core/posix.cc
@@ -19,8 +19,8 @@
* Copyright (C) 2014 Cloudius Systems, Ltd.
*/

-#include "posix.hh"
-#include "align.hh"
+#include <seastar/core/posix.hh>
+#include <seastar/core/align.hh>
#include <sys/mman.h>

namespace seastar {
diff --git a/core/prometheus.cc b/src/core/prometheus.cc
similarity index 99%
rename from core/prometheus.cc
rename to src/core/prometheus.cc
index cee22630..28a63c85 100644
--- a/core/prometheus.cc
+++ b/src/core/prometheus.cc
@@ -19,16 +19,16 @@
* Copyright (C) 2016 ScyllaDB
*/

-#include "prometheus.hh"
+#include <seastar/core/prometheus.hh>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/io/zero_copy_stream_impl_lite.h>
-#include "proto/metrics2.pb.h"
+#include <seastar/proto/metrics2.pb.h>
#include <sstream>

-#include "scollectd_api.hh"
-#include "scollectd-impl.hh"
-#include "metrics_api.hh"
-#include "http/function_handlers.hh"
+#include <seastar/core/scollectd_api.hh>
+#include "core/scollectd-impl.hh"
+#include <seastar/core/metrics_api.hh>
+#include <seastar/http/function_handlers.hh>
#include <boost/algorithm/string/replace.hpp>
#include <boost/range/algorithm_ext/erase.hpp>
#include <boost/algorithm/string.hpp>
diff --git a/core/reactor.cc b/src/core/reactor.cc
similarity index 99%
rename from core/reactor.cc
rename to src/core/reactor.cc
index c27eb7ce..183e481a 100644
--- a/core/reactor.cc
+++ b/src/core/reactor.cc
@@ -27,25 +27,25 @@
#include <sys/statfs.h>
#include <sys/time.h>
#include <sys/resource.h>
-#include "task.hh"
-#include "reactor.hh"
-#include "memory.hh"
-#include "core/posix.hh"
-#include "net/packet.hh"
-#include "net/stack.hh"
-#include "net/posix-stack.hh"
-#include "resource.hh"
-#include "print.hh"
-#include "scollectd-impl.hh"
-#include "util/conversions.hh"
-#include "core/future-util.hh"
-#include "thread.hh"
-#include "systemwide_memory_barrier.hh"
-#include "report_exception.hh"
-#include "core/stall_sampler.hh"
-#include "core/thread_cputime_clock.hh"
-#include "util/log.hh"
-#include "file-impl.hh"
+#include <seastar/core/task.hh>
+#include <seastar/core/reactor.hh>
+#include <seastar/core/memory.hh>
+#include <seastar/core/posix.hh>
+#include <seastar/net/packet.hh>
+#include <seastar/net/stack.hh>
+#include <seastar/net/posix-stack.hh>
+#include <seastar/core/resource.hh>
+#include <seastar/core/print.hh>
+#include "core/scollectd-impl.hh"
+#include <seastar/util/conversions.hh>
+#include <seastar/core/future-util.hh>
+#include <seastar/core/thread.hh>
+#include <seastar/core/systemwide_memory_barrier.hh>
+#include <seastar/core/report_exception.hh>
+#include <seastar/core/stall_sampler.hh>
+#include <seastar/core/thread_cputime_clock.hh>
+#include <seastar/util/log.hh>
+#include "core/file-impl.hh"
#include <cassert>
#include <unistd.h>
#include <fcntl.h>
@@ -73,11 +73,11 @@
#include <xfs/xfs.h>
#undef min
#ifdef SEASTAR_HAVE_DPDK
-#include <core/dpdk_rte.hh>
+#include <seastar/core/dpdk_rte.hh>
#include <rte_lcore.h>
#include <rte_launch.h>
#endif
-#include "prefetch.hh"
+#include <seastar/core/prefetch.hh>
#include <exception>
#include <regex>
#ifdef __GNUC__
@@ -94,9 +94,9 @@
#include <sys/utsname.h>
#include <linux/falloc.h>
#include <linux/magic.h>
-#include "util/backtrace.hh"
-#include "util/spinlock.hh"
-#include "util/print_safe.hh"
+#include <seastar/util/backtrace.hh>
+#include <seastar/util/spinlock.hh>
+#include <seastar/util/print_safe.hh>
#include <sys/sdt.h>

#ifdef HAVE_OSV
@@ -107,11 +107,11 @@
#include <xmmintrin.h>
#endif

-#include "util/defer.hh"
-#include "core/alien.hh"
-#include "core/metrics.hh"
-#include "execution_stage.hh"
-#include "exception_hacks.hh"
+#include <seastar/util/defer.hh>
+#include <seastar/core/alien.hh>
+#include <seastar/core/metrics.hh>
+#include <seastar/core/execution_stage.hh>
+#include <seastar/core/exception_hacks.hh>

#include <yaml-cpp/yaml.h>

diff --git a/core/resource.cc b/src/core/resource.cc
similarity index 98%
rename from core/resource.cc
rename to src/core/resource.cc
index b392afe5..9d4fe0d6 100644
--- a/core/resource.cc
+++ b/src/core/resource.cc
@@ -22,9 +22,9 @@
#include <boost/program_options.hpp>
#include <boost/algorithm/string.hpp>
#include <regex>
-#include "resource.hh"
-#include "core/align.hh"
-#include "core/print.hh"
+#include <seastar/core/resource.hh>
+#include <seastar/core/align.hh>
+#include <seastar/core/print.hh>

namespace seastar {

@@ -91,8 +91,8 @@ size_t calculate_memory(configuration c, size_t available_memory, float panic_fa

#ifdef SEASTAR_HAVE_HWLOC

-#include "util/defer.hh"
-#include "core/print.hh"
+#include <seastar/util/defer.hh>
+#include <seastar/core/print.hh>
#include <hwloc.h>
#include <unordered_map>
#include <boost/range/irange.hpp>
@@ -339,7 +339,7 @@ unsigned nr_processing_units() {

#else

-#include "resource.hh"
+#include <seastar/core/resource.hh>
#include <unistd.h>

namespace seastar {
diff --git a/core/scollectd-impl.hh b/src/core/scollectd-impl.hh
similarity index 95%
rename from core/scollectd-impl.hh
rename to src/core/scollectd-impl.hh
index bb21705f..75a7db34 100644
--- a/core/scollectd-impl.hh
+++ b/src/core/scollectd-impl.hh
@@ -21,9 +21,9 @@

#pragma once

-#include "core/scollectd.hh"
-#include "core/reactor.hh"
-#include "core/metrics_api.hh"
+#include <seastar/core/scollectd.hh>
+#include <seastar/core/reactor.hh>
+#include <seastar/core/metrics_api.hh>

namespace seastar {

diff --git a/core/scollectd.cc b/src/core/scollectd.cc
similarity index 99%
rename from core/scollectd.cc
rename to src/core/scollectd.cc
index edc268a5..76e9b61f 100644
--- a/core/scollectd.cc
+++ b/src/core/scollectd.cc
@@ -28,11 +28,12 @@
#include <iostream>
#include <unordered_map>

-#include "scollectd-impl.hh"
-#include "core/future-util.hh"
-#include "scollectd_api.hh"
-#include "core/metrics_api.hh"
-#include "core/byteorder.hh"
+#include <seastar/core/future-util.hh>
+#include <seastar/core/scollectd_api.hh>
+#include <seastar/core/metrics_api.hh>
+#include <seastar/core/byteorder.hh>
+
+#include "core/scollectd-impl.hh"

namespace seastar {

diff --git a/core/systemwide_memory_barrier.cc b/src/core/systemwide_memory_barrier.cc
similarity index 96%
rename from core/systemwide_memory_barrier.cc
rename to src/core/systemwide_memory_barrier.cc
index d65efea0..a227be5d 100644
--- a/core/systemwide_memory_barrier.cc
+++ b/src/core/systemwide_memory_barrier.cc
@@ -19,9 +19,9 @@
* Copyright 2015 Scylla DB
*/

-#include "systemwide_memory_barrier.hh"
-#include "cacheline.hh"
-#include "../util/log.hh"
+#include <seastar/core/systemwide_memory_barrier.hh>
+#include <seastar/core/cacheline.hh>
+#include <seastar/util/log.hh>
#include <sys/mman.h>
#include <unistd.h>
#include <cassert>
diff --git a/core/thread.cc b/src/core/thread.cc
similarity index 99%
rename from core/thread.cc
rename to src/core/thread.cc
index e4ac13cf..3d2407f4 100644
--- a/core/thread.cc
+++ b/src/core/thread.cc
@@ -20,8 +20,8 @@
* Copyright (C) 2015 Cloudius Systems, Ltd.
*/

-#include "thread.hh"
-#include "posix.hh"
+#include <seastar/core/thread.hh>
+#include <seastar/core/posix.hh>
#include <ucontext.h>
#include <algorithm>

diff --git a/http/api_docs.cc b/src/http/api_docs.cc
similarity index 89%
rename from http/api_docs.cc
rename to src/http/api_docs.cc
index 14c277ba..d74e7f1f 100644
--- a/http/api_docs.cc
+++ b/src/http/api_docs.cc
@@ -19,13 +19,13 @@
* Copyright 2015 Cloudius Systems
*/

-#include "api_docs.hh"
-#include "handlers.hh"
-#include "json/formatter.hh"
-#include "transformers.hh"
-#include "core/reactor.hh"
-#include "core/fstream.hh"
-#include "http/transformers.hh"
+#include <seastar/http/api_docs.hh>
+#include <seastar/http/handlers.hh>
+#include <seastar/json/formatter.hh>
+#include <seastar/http/transformers.hh>
+#include <seastar/core/reactor.hh>
+#include <seastar/core/fstream.hh>
+#include <seastar/http/transformers.hh>

using namespace std;

diff --git a/http/common.cc b/src/http/common.cc
similarity index 96%
rename from http/common.cc
rename to src/http/common.cc
index 1612e0ef..892135b0 100644
--- a/http/common.cc
+++ b/src/http/common.cc
@@ -19,7 +19,7 @@
* Copyright 2015 Cloudius Systems
*/

-#include "common.hh"
+#include <seastar/http/common.hh>

namespace seastar {

diff --git a/http/file_handler.cc b/src/http/file_handler.cc
similarity index 95%
rename from http/file_handler.cc
rename to src/http/file_handler.cc
index 730a52e0..1973379c 100644
--- a/http/file_handler.cc
+++ b/src/http/file_handler.cc
@@ -19,14 +19,14 @@
* Copyright 2015 Cloudius Systems
*/

-#include "file_handler.hh"
+#include <seastar/http/file_handler.hh>
#include <algorithm>
#include <iostream>
-#include "core/reactor.hh"
-#include "core/fstream.hh"
-#include "core/shared_ptr.hh"
-#include "core/app-template.hh"
-#include "exception.hh"
+#include <seastar/core/reactor.hh>
+#include <seastar/core/fstream.hh>
+#include <seastar/core/shared_ptr.hh>
+#include <seastar/core/app-template.hh>
+#include <seastar/http/exception.hh>

namespace seastar {

diff --git a/http/httpd.cc b/src/http/httpd.cc
similarity index 95%
rename from http/httpd.cc
rename to src/http/httpd.cc
index 1d5372e8..7439f37f 100644
--- a/http/httpd.cc
+++ b/src/http/httpd.cc
@@ -19,14 +19,14 @@
* Copyright 2015 Cloudius Systems
*/

-#include "core/reactor.hh"
-#include "core/sstring.hh"
-#include "core/app-template.hh"
-#include "core/circular_buffer.hh"
-#include "core/distributed.hh"
-#include "core/queue.hh"
-#include "core/future-util.hh"
-#include "core/metrics.hh"
+#include <seastar/core/reactor.hh>
+#include <seastar/core/sstring.hh>
+#include <seastar/core/app-template.hh>
+#include <seastar/core/circular_buffer.hh>
+#include <seastar/core/distributed.hh>
+#include <seastar/core/queue.hh>
+#include <seastar/core/future-util.hh>
+#include <seastar/core/metrics.hh>
#include <iostream>
#include <algorithm>
#include <unordered_map>
@@ -35,8 +35,8 @@
#include <limits>
#include <cctype>
#include <vector>
-#include "httpd.hh"
-#include "reply.hh"
+#include <seastar/http/httpd.hh>
+#include <seastar/http/reply.hh>

using namespace std::chrono_literals;

diff --git a/http/json_path.cc b/src/http/json_path.cc
similarity index 98%
rename from http/json_path.cc
rename to src/http/json_path.cc
index 8f04409b..125b0d9a 100644
--- a/http/json_path.cc
+++ b/src/http/json_path.cc
@@ -19,7 +19,7 @@
* Copyright 2015 Cloudius Systems
*/

-#include "json_path.hh"
+#include <seastar/http/json_path.hh>

namespace seastar {

diff --git a/http/matcher.cc b/src/http/matcher.cc
similarity index 98%
rename from http/matcher.cc
rename to src/http/matcher.cc
index 3dc706e4..a1b3bcde 100644
--- a/http/matcher.cc
+++ b/src/http/matcher.cc
@@ -19,7 +19,7 @@
* Copyright 2015 Cloudius Systems
*/

-#include "matcher.hh"
+#include <seastar/http/matcher.hh>

#include <iostream>

diff --git a/http/mime_types.cc b/src/http/mime_types.cc
similarity index 96%
rename from http/mime_types.cc
rename to src/http/mime_types.cc
index 73c66429..a9f5e6e9 100644
--- a/http/mime_types.cc
+++ b/src/http/mime_types.cc
@@ -8,7 +8,7 @@
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//

-#include "mime_types.hh"
+#include <seastar/http/mime_types.hh>

namespace seastar {

diff --git a/http/reply.cc b/src/http/reply.cc
similarity index 98%
rename from http/reply.cc
rename to src/http/reply.cc
index 8849e044..18278417 100644
--- a/http/reply.cc
+++ b/src/http/reply.cc
@@ -28,9 +28,9 @@
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
-#include "reply.hh"
-#include "core/print.hh"
-#include "httpd.hh"
+#include <seastar/http/reply.hh>
+#include <seastar/core/print.hh>
+#include <seastar/http/httpd.hh>

namespace seastar {

diff --git a/http/routes.cc b/src/http/routes.cc
similarity index 97%
rename from http/routes.cc
rename to src/http/routes.cc
index e1fc3852..41cac318 100644
--- a/http/routes.cc
+++ b/src/http/routes.cc
@@ -19,10 +19,10 @@
* Copyright 2015 Cloudius Systems
*/

-#include "routes.hh"
-#include "reply.hh"
-#include "exception.hh"
-#include "json_path.hh"
+#include <seastar/http/routes.hh>
+#include <seastar/http/reply.hh>
+#include <seastar/http/exception.hh>
+#include <seastar/http/json_path.hh>

namespace seastar {

diff --git a/http/transformers.cc b/src/http/transformers.cc
similarity index 99%
rename from http/transformers.cc
rename to src/http/transformers.cc
index 37af7c52..c8f01fdf 100644
--- a/http/transformers.cc
+++ b/src/http/transformers.cc
@@ -20,7 +20,7 @@
*/

#include <boost/algorithm/string/replace.hpp>
-#include "transformers.hh"
+#include <seastar/http/transformers.hh>
#include <experimental/string_view>
#include <list>

diff --git a/json/formatter.cc b/src/json/formatter.cc
similarity index 96%
rename from json/formatter.cc
rename to src/json/formatter.cc
index 7f42c06a..10e3ec48 100644
--- a/json/formatter.cc
+++ b/src/json/formatter.cc
@@ -19,8 +19,8 @@
* Copyright 2015 Cloudius Systems
*/

-#include "formatter.hh"
-#include "json_elements.hh"
+#include <seastar/json/formatter.hh>
+#include <seastar/json/json_elements.hh>
#include <cmath>

namespace seastar {
diff --git a/json/json_elements.cc b/src/json/json_elements.cc
similarity index 99%
rename from json/json_elements.cc
rename to src/json/json_elements.cc
index 9b7d5fb5..2d3afaaa 100644
--- a/json/json_elements.cc
+++ b/src/json/json_elements.cc
@@ -19,7 +19,7 @@
* Copyright 2015 Cloudius Systems
*/

-#include "json_elements.hh"
+#include <seastar/json/json_elements.hh>
#include <string.h>
#include <string>
#include <vector>
diff --git a/net/arp.cc b/src/net/arp.cc
similarity index 98%
rename from net/arp.cc
rename to src/net/arp.cc
index 9b8dc86a..aaed6f77 100644
--- a/net/arp.cc
+++ b/src/net/arp.cc
@@ -19,7 +19,7 @@
* Copyright (C) 2014 Cloudius Systems, Ltd.
*/

-#include "arp.hh"
+#include <seastar/net/arp.hh>

namespace seastar {

diff --git a/net/config.cc b/src/net/config.cc
similarity index 98%
rename from net/config.cc
rename to src/net/config.cc
index 5bd596e8..c5dd44ce 100644
--- a/net/config.cc
+++ b/src/net/config.cc
@@ -19,8 +19,8 @@
* Copyright 2017 Marek Waszkiewicz ( marek.was...@gmail.com )
*/

-#include "net/config.hh"
-#include "core/print.hh"
+#include <seastar/net/config.hh>
+#include <seastar/core/print.hh>
#include <boost/algorithm/cxx11/all_of.hpp>
#include <boost/algorithm/cxx11/none_of.hpp>
#include <boost/next_prior.hpp>
diff --git a/net/dhcp.cc b/src/net/dhcp.cc
similarity index 99%
rename from net/dhcp.cc
rename to src/net/dhcp.cc
index f1340913..a1a52ab7 100644
--- a/net/dhcp.cc
+++ b/src/net/dhcp.cc
@@ -24,10 +24,10 @@
#include <array>
#include <random>

-#include "dhcp.hh"
-#include "ip.hh"
-#include "udp.hh"
-#include "stack.hh"
+#include <seastar/net/dhcp.hh>
+#include <seastar/net/ip.hh>
+#include <seastar/net/udp.hh>
+#include <seastar/net/stack.hh>

namespace seastar {

diff --git a/net/dns.cc b/src/net/dns.cc
similarity index 99%
rename from net/dns.cc
rename to src/net/dns.cc
index 4fe23b91..faa5e713 100644
--- a/net/dns.cc
+++ b/src/net/dns.cc
@@ -24,14 +24,14 @@

#include <c-ares/ares.h>

-#include "ip.hh"
-#include "api.hh"
-#include "dns.hh"
-#include "core/sstring.hh"
-#include "core/timer.hh"
-#include "core/reactor.hh"
-#include "core/gate.hh"
-#include "util/log.hh"
+#include <seastar/net/ip.hh>
+#include <seastar/net/api.hh>
+#include <seastar/net/dns.hh>
+#include <seastar/core/sstring.hh>
+#include <seastar/core/timer.hh>
+#include <seastar/core/reactor.hh>
+#include <seastar/core/gate.hh>
+#include <seastar/util/log.hh>

namespace seastar {

diff --git a/net/dpdk.cc b/src/net/dpdk.cc
similarity index 99%
rename from net/dpdk.cc
rename to src/net/dpdk.cc
index b1af6f39..97e09853 100644
--- a/net/dpdk.cc
+++ b/src/net/dpdk.cc
@@ -21,28 +21,28 @@
#ifdef SEASTAR_HAVE_DPDK

#include <cinttypes>
-#include "core/posix.hh"
-#include "core/vla.hh"
-#include "virtio-interface.hh"
-#include "core/reactor.hh"
-#include "core/stream.hh"
-#include "core/circular_buffer.hh"
-#include "core/align.hh"
-#include "core/sstring.hh"
-#include "core/memory.hh"
-#include "core/metrics.hh"
-#include "util/function_input_iterator.hh"
-#include "util/transform_iterator.hh"
+#include <seastar/core/posix.hh>
+#include <seastar/core/vla.hh>
+#include <seastar/net/virtio-interface.hh>
+#include <seastar/core/reactor.hh>
+#include <seastar/core/stream.hh>
+#include <seastar/core/circular_buffer.hh>
+#include <seastar/core/align.hh>
+#include <seastar/core/sstring.hh>
+#include <seastar/core/memory.hh>
+#include <seastar/core/metrics.hh>
+#include <seastar/util/function_input_iterator.hh>
+#include <seastar/util/transform_iterator.hh>
#include <atomic>
#include <vector>
#include <queue>
#include <experimental/optional>
#include <boost/preprocessor.hpp>
-#include "ip.hh"
-#include "const.hh"
-#include "core/dpdk_rte.hh"
-#include "dpdk.hh"
-#include "toeplitz.hh"
+#include <seastar/net/ip.hh>
+#include <seastar/net/const.hh>
+#include <seastar/core/dpdk_rte.hh>
+#include <seastar/net/dpdk.hh>
+#include <seastar/net/toeplitz.hh>

#include <getopt.h>
#include <malloc.h>
diff --git a/net/ethernet.cc b/src/net/ethernet.cc
similarity index 97%
rename from net/ethernet.cc
rename to src/net/ethernet.cc
index c1dfa399..bbffeec0 100644
--- a/net/ethernet.cc
+++ b/src/net/ethernet.cc
@@ -19,7 +19,7 @@
* Copyright (C) 2014 Cloudius Systems, Ltd.
*/

-#include "ethernet.hh"
+#include <seastar/net/ethernet.hh>
#include <boost/algorithm/string.hpp>
#include <string>

diff --git a/net/inet_address.cc b/src/net/inet_address.cc
similarity index 96%
rename from net/inet_address.cc
rename to src/net/inet_address.cc
index 6bc12b90..d34f0f7c 100644
--- a/net/inet_address.cc
+++ b/src/net/inet_address.cc
@@ -22,10 +22,10 @@
#include <ostream>
#include <arpa/inet.h>

-#include "inet_address.hh"
-#include "socket_defs.hh"
-#include "dns.hh"
-#include "ip.hh"
+#include <seastar/net/inet_address.hh>
+#include <seastar/net/socket_defs.hh>
+#include <seastar/net/dns.hh>
+#include <seastar/net/ip.hh>

namespace seastar {

diff --git a/net/ip.cc b/src/net/ip.cc
similarity index 98%
rename from net/ip.cc
rename to src/net/ip.cc
index e3d9e61f..e9e668f4 100644
--- a/net/ip.cc
+++ b/src/net/ip.cc
@@ -20,12 +20,12 @@
*
*/

-#include "ip.hh"
-#include "core/print.hh"
-#include "core/future-util.hh"
-#include "core/shared_ptr.hh"
-#include "toeplitz.hh"
-#include "core/metrics.hh"
+#include <seastar/net/ip.hh>
+#include <seastar/core/print.hh>
+#include <seastar/core/future-util.hh>
+#include <seastar/core/shared_ptr.hh>
+#include <seastar/net/toeplitz.hh>
+#include <seastar/core/metrics.hh>

namespace seastar {

diff --git a/net/ip_checksum.cc b/src/net/ip_checksum.cc
similarity index 96%
rename from net/ip_checksum.cc
rename to src/net/ip_checksum.cc
index 3bee20ad..d2112f28 100644
--- a/net/ip_checksum.cc
+++ b/src/net/ip_checksum.cc
@@ -19,8 +19,8 @@
* Copyright (C) 2014 Cloudius Systems, Ltd.
*/

-#include "ip_checksum.hh"
-#include "net.hh"
+#include <seastar/net/ip_checksum.hh>
+#include <seastar/net/net.hh>
#include <arpa/inet.h>

namespace seastar {
diff --git a/net/native-stack-impl.hh b/src/net/native-stack-impl.hh
similarity index 99%
rename from net/native-stack-impl.hh
rename to src/net/native-stack-impl.hh
index f0113ce9..19f16da9 100644
--- a/net/native-stack-impl.hh
+++ b/src/net/native-stack-impl.hh
@@ -21,8 +21,8 @@

#pragma once

-#include "core/reactor.hh"
-#include "stack.hh"
+#include <seastar/core/reactor.hh>
+#include <seastar/net/stack.hh>

namespace seastar {

diff --git a/net/native-stack.cc b/src/net/native-stack.cc
similarity index 96%
rename from net/native-stack.cc
rename to src/net/native-stack.cc
index 8e346422..678e96e4 100644
--- a/net/native-stack.cc
+++ b/src/net/native-stack.cc
@@ -19,18 +19,18 @@
* Copyright (C) 2014 Cloudius Systems, Ltd.
*/

-#include "native-stack.hh"
-#include "native-stack-impl.hh"
-#include "net.hh"
-#include "ip.hh"
-#include "tcp-stack.hh"
-#include "tcp.hh"
-#include "udp.hh"
-#include "virtio.hh"
-#include "dpdk.hh"
-#include "proxy.hh"
-#include "dhcp.hh"
-#include "config.hh"
+#include <seastar/net/native-stack.hh>
+#include "net/native-stack-impl.hh"
+#include <seastar/net/net.hh>
+#include <seastar/net/ip.hh>
+#include <seastar/net/tcp-stack.hh>
+#include <seastar/net/tcp.hh>
+#include <seastar/net/udp.hh>
+#include <seastar/net/virtio.hh>
+#include <seastar/net/dpdk.hh>
+#include <seastar/net/proxy.hh>
+#include <seastar/net/dhcp.hh>
+#include <seastar/net/config.hh>
#include <memory>
#include <queue>
#include <fstream>
diff --git a/net/net.cc b/src/net/net.cc
similarity index 98%
rename from net/net.cc
rename to src/net/net.cc
index 8ba2ca92..67dac427 100644
--- a/net/net.cc
+++ b/src/net/net.cc
@@ -22,11 +22,11 @@

#include <boost/asio/ip/address_v4.hpp>
#include <boost/algorithm/string.hpp>
-#include "net.hh"
+#include <seastar/net/net.hh>
#include <utility>
-#include "toeplitz.hh"
-#include "core/metrics.hh"
-#include "inet_address.hh"
+#include <seastar/net/toeplitz.hh>
+#include <seastar/core/metrics.hh>
+#include <seastar/net/inet_address.hh>

namespace seastar {

diff --git a/net/packet.cc b/src/net/packet.cc
similarity index 98%
rename from net/packet.cc
rename to src/net/packet.cc
index 312e070b..e348e9a4 100644
--- a/net/packet.cc
+++ b/src/net/packet.cc
@@ -19,8 +19,8 @@
* Copyright (C) 2014 Cloudius Systems, Ltd.
*/

-#include "core/reactor.hh"
-#include "packet.hh"
+#include <seastar/core/reactor.hh>
+#include <seastar/net/packet.hh>
#include <iostream>
#include <algorithm>
#include <cctype>
diff --git a/net/posix-stack.cc b/src/net/posix-stack.cc
similarity index 99%
rename from net/posix-stack.cc
rename to src/net/posix-stack.cc
index 0baad9fc..cf7480dc 100644
--- a/net/posix-stack.cc
+++ b/src/net/posix-stack.cc
@@ -19,10 +19,10 @@
* Copyright (C) 2014 Cloudius Systems, Ltd.
*/

-#include "posix-stack.hh"
-#include "net.hh"
-#include "packet.hh"
-#include "api.hh"
+#include <seastar/net/posix-stack.hh>
+#include <seastar/net/net.hh>
+#include <seastar/net/packet.hh>
+#include <seastar/net/api.hh>
#include <netinet/tcp.h>
#include <netinet/sctp.h>

diff --git a/net/proxy.cc b/src/net/proxy.cc
similarity index 97%
rename from net/proxy.cc
rename to src/net/proxy.cc
index 32ef9c72..be85fe92 100644
--- a/net/proxy.cc
+++ b/src/net/proxy.cc
@@ -15,8 +15,8 @@
* specific language governing permissions and limitations
* under the License.
*/
-#include "core/reactor.hh"
-#include "proxy.hh"
+#include <seastar/core/reactor.hh>
+#include <seastar/net/proxy.hh>
#include <utility>

namespace seastar {
diff --git a/net/stack.cc b/src/net/stack.cc
similarity index 98%
rename from net/stack.cc
rename to src/net/stack.cc
index 1820f35b..0193d579 100644
--- a/net/stack.cc
+++ b/src/net/stack.cc
@@ -19,8 +19,8 @@
* Copyright 2015 Cloudius Systems
*/

-#include "stack.hh"
-#include "core/reactor.hh"
+#include <seastar/net/stack.hh>
+#include <seastar/core/reactor.hh>

namespace seastar {

diff --git a/net/tcp.cc b/src/net/tcp.cc
similarity index 96%
rename from net/tcp.cc
rename to src/net/tcp.cc
index 8d0edcb8..0f6d8724 100644
--- a/net/tcp.cc
+++ b/src/net/tcp.cc
@@ -19,12 +19,12 @@
* Copyright (C) 2014 Cloudius Systems, Ltd.
*/

-#include "tcp.hh"
-#include "tcp-stack.hh"
-#include "ip.hh"
-#include "core/align.hh"
-#include "core/future.hh"
-#include "native-stack-impl.hh"
+#include <seastar/net/tcp.hh>
+#include <seastar/net/tcp-stack.hh>
+#include <seastar/net/ip.hh>
+#include <seastar/core/align.hh>
+#include <seastar/core/future.hh>
+#include "net/native-stack-impl.hh"

namespace seastar {

diff --git a/net/tls.cc b/src/net/tls.cc
similarity index 99%
rename from net/tls.cc
rename to src/net/tls.cc
index 927eef4a..732091db 100644
--- a/net/tls.cc
+++ b/src/net/tls.cc
@@ -25,13 +25,13 @@
#include <experimental/optional>
#include <system_error>

-#include "core/reactor.hh"
-#include "core/thread.hh"
-#include "core/sstring.hh"
-#include "core/semaphore.hh"
-#include "core/timer.hh"
-#include "tls.hh"
-#include "stack.hh"
+#include <seastar/core/reactor.hh>
+#include <seastar/core/thread.hh>
+#include <seastar/core/sstring.hh>
+#include <seastar/core/semaphore.hh>
+#include <seastar/core/timer.hh>
+#include <seastar/net/tls.hh>
+#include <seastar/net/stack.hh>

namespace seastar {

diff --git a/net/udp.cc b/src/net/udp.cc
similarity index 99%
rename from net/udp.cc
rename to src/net/udp.cc
index 5e96d76e..48ab7c1b 100644
--- a/net/udp.cc
+++ b/src/net/udp.cc
@@ -19,8 +19,8 @@
* Copyright (C) 2014 Cloudius Systems, Ltd.
*/

-#include "ip.hh"
-#include "stack.hh"
+#include <seastar/net/ip.hh>
+#include <seastar/net/stack.hh>

namespace seastar {

diff --git a/net/virtio.cc b/src/net/virtio.cc
similarity index 98%
rename from net/virtio.cc
rename to src/net/virtio.cc
index fc9d9c6a..ae3e47b2 100644
--- a/net/virtio.cc
+++ b/src/net/virtio.cc
@@ -19,27 +19,27 @@
* Copyright (C) 2014 Cloudius Systems, Ltd.
*/

-#include "virtio.hh"
-#include "core/posix.hh"
-#include "core/future-util.hh"
-#include "core/vla.hh"
-#include "virtio-interface.hh"
-#include "core/reactor.hh"
-#include "core/stream.hh"
-#include "core/circular_buffer.hh"
-#include "core/align.hh"
-#include "core/metrics.hh"
-#include "util/function_input_iterator.hh"
-#include "util/transform_iterator.hh"
+#include <seastar/net/virtio.hh>
+#include <seastar/core/posix.hh>
+#include <seastar/core/future-util.hh>
+#include <seastar/core/vla.hh>
+#include <seastar/net/virtio-interface.hh>
+#include <seastar/core/reactor.hh>
+#include <seastar/core/stream.hh>
+#include <seastar/core/circular_buffer.hh>
+#include <seastar/core/align.hh>
+#include <seastar/core/metrics.hh>
+#include <seastar/util/function_input_iterator.hh>
+#include <seastar/util/transform_iterator.hh>
#include <atomic>
#include <vector>
#include <queue>
#include <fcntl.h>
#include <linux/vhost.h>
#include <linux/if_tun.h>
-#include "ip.hh"
-#include "const.hh"
-#include "net/native-stack.hh"
+#include <seastar/net/ip.hh>
+#include <seastar/net/const.hh>
+#include <seastar/net/native-stack.hh>

#ifdef HAVE_OSV
#include <osv/virtio-assign.hh>
diff --git a/rpc/lz4_compressor.cc b/src/rpc/lz4_compressor.cc
similarity index 97%
rename from rpc/lz4_compressor.cc
rename to src/rpc/lz4_compressor.cc
index 2cca3b9e..2089c399 100644
--- a/rpc/lz4_compressor.cc
+++ b/src/rpc/lz4_compressor.cc
@@ -19,8 +19,8 @@
* Copyright (C) 2016 Scylladb, Ltd.
*/

-#include "lz4_compressor.hh"
-#include "core/byteorder.hh"
+#include <seastar/rpc/lz4_compressor.hh>
+#include <seastar/core/byteorder.hh>

namespace seastar {

diff --git a/rpc/rpc.cc b/src/rpc/rpc.cc
similarity index 99%
rename from rpc/rpc.cc
rename to src/rpc/rpc.cc
index f4a1de1e..a8e0067c 100644
--- a/rpc/rpc.cc
+++ b/src/rpc/rpc.cc
@@ -1,4 +1,4 @@
-#include "rpc.hh"
+#include <seastar/rpc/rpc.hh>
#include <boost/range/adaptor/map.hpp>

namespace seastar {
diff --git a/util/alloc_failure_injector.cc b/src/util/alloc_failure_injector.cc
similarity index 90%
rename from util/alloc_failure_injector.cc
rename to src/util/alloc_failure_injector.cc
index 8d551dc1..36b7a03a 100644
--- a/util/alloc_failure_injector.cc
+++ b/src/util/alloc_failure_injector.cc
@@ -19,10 +19,10 @@
* Copyright 2017 ScyllaDB
*/

-#include "util/alloc_failure_injector.hh"
-#include "util/backtrace.hh"
-#include "util/log.hh"
-#include "util/defer.hh"
+#include <seastar/util/alloc_failure_injector.hh>
+#include <seastar/util/backtrace.hh>
+#include <seastar/util/log.hh>
+#include <seastar/util/defer.hh>

namespace seastar {
namespace memory {
diff --git a/util/backtrace.cc b/src/util/backtrace.cc
similarity index 97%
rename from util/backtrace.cc
rename to src/util/backtrace.cc
index 4d8b6f1e..33e4fc79 100644
--- a/util/backtrace.cc
+++ b/src/util/backtrace.cc
@@ -18,7 +18,7 @@
/*
* Copyright 2017 ScyllaDB
*/
-#include "backtrace.hh"
+#include <seastar/util/backtrace.hh>

#include <link.h>
#include <sys/types.h>
@@ -27,7 +27,7 @@
#include <errno.h>
#include <string.h>

-#include "core/print.hh"
+#include <seastar/core/print.hh>


namespace seastar {
diff --git a/util/conversions.cc b/src/util/conversions.cc
similarity index 95%
rename from util/conversions.cc
rename to src/util/conversions.cc
index 94310d0d..62abdc1d 100644
--- a/util/conversions.cc
+++ b/src/util/conversions.cc
@@ -22,8 +22,8 @@
#ifndef CONVERSIONS_CC_
#define CONVERSIONS_CC_

-#include "conversions.hh"
-#include "core/print.hh"
+#include <seastar/util/conversions.hh>
+#include <seastar/core/print.hh>
#include <boost/lexical_cast.hpp>
#include <cctype>

diff --git a/util/log.cc b/src/util/log.cc
similarity index 98%
rename from util/log.cc
rename to src/util/log.cc
index 9280252d..4d6d48fa 100644
--- a/util/log.cc
+++ b/src/util/log.cc
@@ -19,13 +19,13 @@
* Copyright (C) 2015 Cloudius Systems, Ltd.
*/

-#include "fmt/time.h"
+#include <fmt/time.h>

-#include "log.hh"
-#include "log-cli.hh"
+#include <seastar/util/log.hh>
+#include <seastar/util/log-cli.hh>

-#include "core/array_map.hh"
-#include "core/reactor.hh"
+#include <seastar/core/array_map.hh>
+#include <seastar/core/reactor.hh>

#include <boost/any.hpp>
#include <boost/lexical_cast.hpp>
diff --git a/util/program-options.cc b/src/util/program-options.cc
similarity index 98%
rename from util/program-options.cc
rename to src/util/program-options.cc
index e3e868c8..db297363 100644
--- a/util/program-options.cc
+++ b/src/util/program-options.cc
@@ -20,7 +20,7 @@
* Copyright (C) 2017 ScyllaDB
*/

-#include "program-options.hh"
+#include <seastar/util/program-options.hh>

#include <regex>

diff --git a/tests/abort_source_test.cc b/tests/abort_source_test.cc
index 275f35c7..6164f3d2 100644
--- a/tests/abort_source_test.cc
+++ b/tests/abort_source_test.cc
@@ -19,10 +19,10 @@
* Copyright (C) 2017 ScyllaDB
*/

-#include "tests/test-utils.hh"
+#include "test-utils.hh"

-#include "core/gate.hh"
-#include "core/sleep.hh"
+#include <seastar/core/gate.hh>
+#include <seastar/core/sleep.hh>

using namespace seastar;
using namespace std::chrono_literals;
@@ -74,4 +74,4 @@ SEASTAR_TEST_CASE(test_sleep_abortable) {
});
as->request_abort();
return f.finally([as = std::move(as)] { });
-}
\ No newline at end of file
+}
diff --git a/tests/alien_test.cc b/tests/alien_test.cc
index ef91cf8d..0026d2c2 100644
--- a/tests/alien_test.cc
+++ b/tests/alien_test.cc
@@ -22,10 +22,10 @@

#include <future>
#include <numeric>
-#include "core/alien.hh"
-#include "core/app-template.hh"
-#include "core/posix.hh"
-#include "core/reactor.hh"
+#include <seastar/core/alien.hh>
+#include <seastar/core/app-template.hh>
+#include <seastar/core/posix.hh>
+#include <seastar/core/reactor.hh>

using namespace seastar;

diff --git a/tests/alloc_test.cc b/tests/alloc_test.cc
index 3216c6a9..d881fa08 100644
--- a/tests/alloc_test.cc
+++ b/tests/alloc_test.cc
@@ -19,9 +19,9 @@
* Copyright (C) 2015 Cloudius Systems, Ltd.
*/

-#include "tests/test-utils.hh"
-#include "core/memory.hh"
-#include "core/reactor.hh"
+#include "test-utils.hh"
+#include <seastar/core/memory.hh>
+#include <seastar/core/reactor.hh>
#include <vector>

using namespace seastar;
diff --git a/tests/allocator_test.cc b/tests/allocator_test.cc
index 052c9d14..ca5be72a 100644
--- a/tests/allocator_test.cc
+++ b/tests/allocator_test.cc
@@ -19,8 +19,8 @@
* Copyright 2014 Cloudius Systems
*/

-#include "core/memory.hh"
-#include "core/timer.hh"
+#include <seastar/core/memory.hh>
+#include <seastar/core/timer.hh>
#include <random>
#include <cmath>
#include <iostream>
diff --git a/tests/blkdiscard_test.cc b/tests/blkdiscard_test.cc
index 8d0d17c0..70074148 100644
--- a/tests/blkdiscard_test.cc
+++ b/tests/blkdiscard_test.cc
@@ -20,10 +20,10 @@
*/

#include <algorithm>
-#include "core/app-template.hh"
-#include "core/future-util.hh"
-#include "core/file.hh"
-#include "core/reactor.hh"
+#include <seastar/core/app-template.hh>
+#include <seastar/core/future-util.hh>
+#include <seastar/core/file.hh>
+#include <seastar/core/reactor.hh>

using namespace seastar;

diff --git a/tests/checked_ptr_test.cc b/tests/checked_ptr_test.cc
index 43aa378d..d4de8908 100644
--- a/tests/checked_ptr_test.cc
+++ b/tests/checked_ptr_test.cc
@@ -23,8 +23,8 @@
#define BOOST_TEST_MODULE core

#include <boost/test/included/unit_test.hpp>
-#include "core/checked_ptr.hh"
-#include "core/weak_ptr.hh"
+#include <seastar/core/checked_ptr.hh>
+#include <seastar/core/weak_ptr.hh>

using namespace seastar;

diff --git a/tests/chunked_fifo_test.cc b/tests/chunked_fifo_test.cc
index 631eaff5..584a3da9 100644
--- a/tests/chunked_fifo_test.cc
+++ b/tests/chunked_fifo_test.cc
@@ -23,11 +23,11 @@
#define BOOST_TEST_MODULE core

#include <boost/test/included/unit_test.hpp>
-#include "core/chunked_fifo.hh"
+#include <seastar/core/chunked_fifo.hh>
#include <stdlib.h>
#include <chrono>
#include <deque>
-#include "core/circular_buffer.hh"
+#include <seastar/core/circular_buffer.hh>

using namespace seastar;

diff --git a/tests/circular_buffer_fixed_capacity_test.cc b/tests/circular_buffer_fixed_capacity_test.cc
index 304f70b1..43b84ed9 100644
--- a/tests/circular_buffer_fixed_capacity_test.cc
+++ b/tests/circular_buffer_fixed_capacity_test.cc
@@ -25,7 +25,7 @@
#include <boost/test/included/unit_test.hpp>
#include <deque>
#include <random>
-#include "../core/circular_buffer_fixed_capacity.hh"
+#include <seastar/core/circular_buffer_fixed_capacity.hh>

#include <boost/range/algorithm/sort.hpp>
#include <boost/range/algorithm/equal.hpp>
diff --git a/tests/circular_buffer_test.cc b/tests/circular_buffer_test.cc
index d8fe6ab4..9de0af36 100644
--- a/tests/circular_buffer_test.cc
+++ b/tests/circular_buffer_test.cc
@@ -26,7 +26,7 @@
#include <stdlib.h>
#include <chrono>
#include <deque>
-#include "core/circular_buffer.hh"
+#include <seastar/core/circular_buffer.hh>

using namespace seastar;

diff --git a/tests/connect_test.cc b/tests/connect_test.cc
index 10c6acc2..9d62c75c 100644
--- a/tests/connect_test.cc
+++ b/tests/connect_test.cc
@@ -1,6 +1,6 @@
-#include "tests/test-utils.hh"
+#include "test-utils.hh"

-#include "net/ip.hh"
+#include <seastar/net/ip.hh>

#include <random>

diff --git a/tests/defer_test.cc b/tests/defer_test.cc
index 1f21c2d9..b7924569 100644
--- a/tests/defer_test.cc
+++ b/tests/defer_test.cc
@@ -22,7 +22,7 @@
#define BOOST_TEST_MODULE core

#include <boost/test/included/unit_test.hpp>
-#include "util/defer.hh"
+#include <seastar/util/defer.hh>

using namespace seastar;

diff --git a/tests/directory_test.cc b/tests/directory_test.cc
index cc6d71d2..b76dae67 100644
--- a/tests/directory_test.cc
+++ b/tests/directory_test.cc
@@ -20,10 +20,10 @@
*/


-#include "core/reactor.hh"
-#include "core/app-template.hh"
-#include "core/print.hh"
-#include "core/shared_ptr.hh"
+#include <seastar/core/reactor.hh>
+#include <seastar/core/app-template.hh>
+#include <seastar/core/print.hh>
+#include <seastar/core/shared_ptr.hh>

using namespace seastar;

diff --git a/tests/distributed_test.cc b/tests/distributed_test.cc
index bc0a1e4f..4c1a14c3 100644
--- a/tests/distributed_test.cc
+++ b/tests/distributed_test.cc
@@ -20,11 +20,11 @@
* Copyright (C) 2015 Cloudius Systems, Ltd.
*/

-#include "core/app-template.hh"
-#include "core/distributed.hh"
-#include "core/future-util.hh"
-#include "core/sleep.hh"
-#include "core/thread.hh"
+#include <seastar/core/app-template.hh>
+#include <seastar/core/distributed.hh>
+#include <seastar/core/future-util.hh>
+#include <seastar/core/sleep.hh>
+#include <seastar/core/thread.hh>

using namespace seastar;

diff --git a/tests/dns_test.cc b/tests/dns_test.cc
index 2999d0ea..3811b4a6 100644
--- a/tests/dns_test.cc
+++ b/tests/dns_test.cc
@@ -22,14 +22,14 @@
#include <vector>
#include <algorithm>

-#include "core/do_with.hh"
+#include <seastar/core/do_with.hh>
#include "test-utils.hh"
-#include "core/sstring.hh"
-#include "core/reactor.hh"
-#include "core/do_with.hh"
-#include "core/future-util.hh"
-#include "net/dns.hh"
-#include "net/inet_address.hh"
+#include <seastar/core/sstring.hh>
+#include <seastar/core/reactor.hh>
+#include <seastar/core/do_with.hh>
+#include <seastar/core/future-util.hh>
+#include <seastar/net/dns.hh>
+#include <seastar/net/inet_address.hh>

using namespace seastar;
using namespace seastar::net;
diff --git a/tests/echotest.cc b/tests/echotest.cc
index e549187f..220e463d 100644
--- a/tests/echotest.cc
+++ b/tests/echotest.cc
@@ -20,10 +20,10 @@
*
*/

-#include "net/virtio.hh"
-#include "net/dpdk.hh"
-#include "core/reactor.hh"
-#include "net/ip.hh"
+#include <seastar/net/virtio.hh>
+#include <seastar/net/dpdk.hh>
+#include <seastar/core/reactor.hh>
+#include <seastar/net/ip.hh>
#include <iostream>
#include <utility>
#include <algorithm>
diff --git a/tests/execution_stage_test.cc b/tests/execution_stage_test.cc
index d1ed4eca..4e842aa0 100644
--- a/tests/execution_stage_test.cc
+++ b/tests/execution_stage_test.cc
@@ -24,10 +24,10 @@
#include <vector>
#include <chrono>

-#include "core/thread.hh"
+#include <seastar/core/thread.hh>
#include "test-utils.hh"
-#include "core/execution_stage.hh"
-#include "../core/sleep.hh"
+#include <seastar/core/execution_stage.hh>
+#include <seastar/core/sleep.hh>

using namespace std::chrono_literals;

diff --git a/tests/expiring_fifo_test.cc b/tests/expiring_fifo_test.cc
index ea40bba8..b6a277cf 100644
--- a/tests/expiring_fifo_test.cc
+++ b/tests/expiring_fifo_test.cc
@@ -20,10 +20,10 @@
* Copyright (C) 2016 ScyllaDB
*/

-#include "core/thread.hh"
+#include <seastar/core/thread.hh>
#include "test-utils.hh"
-#include "core/future-util.hh"
-#include "core/expiring_fifo.hh"
+#include <seastar/core/future-util.hh>
+#include <seastar/core/expiring_fifo.hh>
#include <boost/range/irange.hpp>

using namespace seastar;
diff --git a/tests/fair_queue_test.cc b/tests/fair_queue_test.cc
index 29460bb0..8514fd75 100644
--- a/tests/fair_queue_test.cc
+++ b/tests/fair_queue_test.cc
@@ -20,15 +20,15 @@
* Copyright (C) 2016 ScyllaDB
*/

-#include "core/thread.hh"
-#include "core/do_with.hh"
+#include <seastar/core/thread.hh>
+#include <seastar/core/do_with.hh>
#include "test-utils.hh"
-#include "core/sstring.hh"
-#include "core/reactor.hh"
-#include "core/fair_queue.hh"
-#include "core/do_with.hh"
-#include "core/future-util.hh"
-#include "core/sleep.hh"
+#include <seastar/core/sstring.hh>
+#include <seastar/core/reactor.hh>
+#include <seastar/core/fair_queue.hh>
+#include <seastar/core/do_with.hh>
+#include <seastar/core/future-util.hh>
+#include <seastar/core/sleep.hh>
#include <boost/range/irange.hpp>
#include <random>
#include <chrono>
diff --git a/tests/fileiotest.cc b/tests/fileiotest.cc
index da6efd58..1d2d630e 100644
--- a/tests/fileiotest.cc
+++ b/tests/fileiotest.cc
@@ -19,14 +19,14 @@
* Copyright (C) 2014-2015 Cloudius Systems, Ltd.
*/

-#include "tests/test-utils.hh"
+#include "test-utils.hh"

-#include "core/semaphore.hh"
-#include "core/condition-variable.hh"
-#include "core/file.hh"
-#include "core/reactor.hh"
-#include "core/thread.hh"
-#include "core/stall_sampler.hh"
+#include <seastar/core/semaphore.hh>
+#include <seastar/core/condition-variable.hh>
+#include <seastar/core/file.hh>
+#include <seastar/core/reactor.hh>
+#include <seastar/core/thread.hh>
+#include <seastar/core/stall_sampler.hh>

using namespace seastar;

diff --git a/tests/foreign_ptr_test.cc b/tests/foreign_ptr_test.cc
index 82d17198..0f28db13 100644
--- a/tests/foreign_ptr_test.cc
+++ b/tests/foreign_ptr_test.cc
@@ -19,12 +19,12 @@
* Copyright (C) 2015 Cloudius Systems, Ltd.
*/

-#include "tests/test-utils.hh"
+#include "test-utils.hh"

-#include "core/distributed.hh"
-#include "core/shared_ptr.hh"
-#include "core/thread.hh"
-#include "core/sleep.hh"
+#include <seastar/core/distributed.hh>
+#include <seastar/core/shared_ptr.hh>
+#include <seastar/core/thread.hh>
+#include <seastar/core/sleep.hh>

using namespace seastar;

diff --git a/tests/fstream_test.cc b/tests/fstream_test.cc
index ad9d6d65..ebb2d732 100644
--- a/tests/fstream_test.cc
+++ b/tests/fstream_test.cc
@@ -22,15 +22,15 @@
#include <algorithm>
#include <iostream>
#include <numeric>
-#include "core/reactor.hh"
-#include "core/fstream.hh"
-#include "core/shared_ptr.hh"
-#include "core/app-template.hh"
-#include "core/do_with.hh"
-#include "core/seastar.hh"
+#include <seastar/core/reactor.hh>
+#include <seastar/core/fstream.hh>
+#include <seastar/core/shared_ptr.hh>
+#include <seastar/core/app-template.hh>
+#include <seastar/core/do_with.hh>
+#include <seastar/core/seastar.hh>
#include "test-utils.hh"
-#include "core/thread.hh"
-#include "util/defer.hh"
+#include <seastar/core/thread.hh>
+#include <seastar/util/defer.hh>
#include <random>
#include <boost/range/adaptor/transformed.hpp>
#include <boost/algorithm/cxx11/any_of.hpp>
diff --git a/tests/futures_test.cc b/tests/futures_test.cc
index 9e2f1a94..fa59fd77 100644
--- a/tests/futures_test.cc
+++ b/tests/futures_test.cc
@@ -19,14 +19,14 @@
* Copyright (C) 2014 Cloudius Systems, Ltd.
*/

-#include "tests/test-utils.hh"
-
-#include "core/shared_ptr.hh"
-#include "core/future-util.hh"
-#include "core/sleep.hh"
-#include "core/do_with.hh"
-#include "core/shared_future.hh"
-#include "core/thread.hh"
+#include "test-utils.hh"
+
+#include <seastar/core/shared_ptr.hh>
+#include <seastar/core/future-util.hh>
+#include <seastar/core/sleep.hh>
+#include <seastar/core/do_with.hh>
+#include <seastar/core/shared_future.hh>
+#include <seastar/core/thread.hh>
#include <boost/iterator/counting_iterator.hpp>

using namespace seastar;
diff --git a/tests/httpd.cc b/tests/httpd.cc
index d0b43d2e..3e6f1046 100644
--- a/tests/httpd.cc
+++ b/tests/httpd.cc
@@ -2,21 +2,21 @@
* Copyright 2015 Cloudius Systems
*/

-#include "http/httpd.hh"
-#include "http/handlers.hh"
-#include "http/matcher.hh"
-#include "http/matchrules.hh"
-#include "json/formatter.hh"
-#include "http/routes.hh"
-#include "http/exception.hh"
-#include "http/transformers.hh"
-#include "core/future-util.hh"
-#include "tests/test-utils.hh"
+#include <seastar/http/httpd.hh>
+#include <seastar/http/handlers.hh>
+#include <seastar/http/matcher.hh>
+#include <seastar/http/matchrules.hh>
+#include <seastar/json/formatter.hh>
+#include <seastar/http/routes.hh>
+#include <seastar/http/exception.hh>
+#include <seastar/http/transformers.hh>
+#include <seastar/core/future-util.hh>
+#include "test-utils.hh"
#include "loopback_socket.hh"
#include <boost/algorithm/string.hpp>
-#include "core/thread.hh"
-#include "util/noncopyable_function.hh"
-#include "http/json_path.hh"
+#include <seastar/core/thread.hh>
+#include <seastar/util/noncopyable_function.hh>
+#include <seastar/http/json_path.hh>
#include <sstream>

using namespace seastar;
diff --git a/tests/ip_test.cc b/tests/ip_test.cc
index b1a7eff2..02c88fdc 100644
--- a/tests/ip_test.cc
+++ b/tests/ip_test.cc
@@ -19,11 +19,11 @@
* Copyright (C) 2014 Cloudius Systems, Ltd.
*/

-#include "net/arp.hh"
-#include "net/ip.hh"
-#include "net/net.hh"
-#include "core/reactor.hh"
-#include "net/virtio.hh"
+#include <seastar/net/arp.hh>
+#include <seastar/net/ip.hh>
+#include <seastar/net/net.hh>
+#include <seastar/core/reactor.hh>
+#include <seastar/net/virtio.hh>

using namespace seastar;
using namespace net;
diff --git a/tests/json_formatter_test.cc b/tests/json_formatter_test.cc
index 5c272b06..f4834f8e 100644
--- a/tests/json_formatter_test.cc
+++ b/tests/json_formatter_test.cc
@@ -21,13 +21,13 @@
*/
#include <vector>

-#include "core/do_with.hh"
+#include <seastar/core/do_with.hh>
#include "test-utils.hh"
-#include "core/sstring.hh"
-#include "core/reactor.hh"
-#include "core/do_with.hh"
-#include "core/future-util.hh"
-#include "json/formatter.hh"
+#include <seastar/core/sstring.hh>
+#include <seastar/core/reactor.hh>
+#include <seastar/core/do_with.hh>
+#include <seastar/core/future-util.hh>
+#include <seastar/json/formatter.hh>

using namespace seastar;
using namespace json;
diff --git a/tests/l3_test.cc b/tests/l3_test.cc
index 883ee516..c30d735d 100644
--- a/tests/l3_test.cc
+++ b/tests/l3_test.cc
@@ -19,9 +19,9 @@
* Copyright (C) 2014 Cloudius Systems, Ltd.
*/

-#include "net/net.hh"
-#include "core/reactor.hh"
-#include "net/virtio.hh"
+#include <seastar/net/net.hh>
+#include <seastar/core/reactor.hh>
+#include <seastar/net/virtio.hh>

using namespace seastar;
using namespace net;
diff --git a/tests/linecount.cc b/tests/linecount.cc
index 6332da89..46a95209 100644
--- a/tests/linecount.cc
+++ b/tests/linecount.cc
@@ -22,10 +22,10 @@
// Demonstration of file_input_stream. Don't expect stellar performance
// since no read-ahead or caching is done yet.

-#include "core/fstream.hh"
-#include "core/app-template.hh"
-#include "core/shared_ptr.hh"
-#include "core/reactor.hh"
+#include <seastar/core/fstream.hh>
+#include <seastar/core/app-template.hh>
+#include <seastar/core/shared_ptr.hh>
+#include <seastar/core/reactor.hh>
#include <algorithm>

using namespace seastar;
diff --git a/tests/loopback_socket.hh b/tests/loopback_socket.hh
index 87e4a5bb..888b0692 100644
--- a/tests/loopback_socket.hh
+++ b/tests/loopback_socket.hh
@@ -22,15 +22,15 @@
#pragma once

#include <system_error>
-#include "core/iostream.hh"
-#include "core/circular_buffer.hh"
-#include "core/shared_ptr.hh"
-#include "core/queue.hh"
-#include "core/future-util.hh"
-#include "core/do_with.hh"
-#include "net/stack.hh"
-#include "core/reactor.hh"
-#include "core/sharded.hh"
+#include <seastar/core/iostream.hh>
+#include <seastar/core/circular_buffer.hh>
+#include <seastar/core/shared_ptr.hh>
+#include <seastar/core/queue.hh>
+#include <seastar/core/future-util.hh>
+#include <seastar/core/do_with.hh>
+#include <seastar/net/stack.hh>
+#include <seastar/core/reactor.hh>
+#include <seastar/core/sharded.hh>

namespace seastar {

diff --git a/tests/lowres_clock_test.cc b/tests/lowres_clock_test.cc
index 4512dffe..74ac3cf6 100644
--- a/tests/lowres_clock_test.cc
+++ b/tests/lowres_clock_test.cc
@@ -21,9 +21,9 @@

#include "test-utils.hh"

-#include <core/do_with.hh>
-#include <core/lowres_clock.hh>
-#include <core/sleep.hh>
+#include <seastar/core/do_with.hh>
+#include <seastar/core/lowres_clock.hh>
+#include <seastar/core/sleep.hh>

#include <ctime>

diff --git a/tests/memcached/test_ascii_parser.cc b/tests/memcached/test_ascii_parser.cc
index 4c27291f..a839df90 100644
--- a/tests/memcached/test_ascii_parser.cc
+++ b/tests/memcached/test_ascii_parser.cc
@@ -21,11 +21,12 @@

#include <iostream>
#include <limits>
-#include "tests/test-utils.hh"
-#include "core/shared_ptr.hh"
-#include "net/packet-data-source.hh"
-#include "apps/memcached/ascii.hh"
-#include "core/future-util.hh"
+#include "test-utils.hh"
+#include <seastar/core/shared_ptr.hh>
+#include <seastar/net/packet-data-source.hh>
+// Non-conventional path due to limitations of `configure.py`.
+#include <seastar/apps/memcached/ascii.hh>
+#include <seastar/core/future-util.hh>

using namespace seastar;
using namespace net;
diff --git a/tests/mock_file.hh b/tests/mock_file.hh
index 248e4b43..de9d5297 100644
--- a/tests/mock_file.hh
+++ b/tests/mock_file.hh
@@ -24,7 +24,7 @@
#include <boost/range/numeric.hpp>

#include "test-utils.hh"
-#include "core/file.hh"
+#include <seastar/core/file.hh>

namespace seastar {

diff --git a/tests/netconfig_test.cc b/tests/netconfig_test.cc
index b90586fc..ec26135f 100644
--- a/tests/netconfig_test.cc
+++ b/tests/netconfig_test.cc
@@ -21,7 +21,7 @@

#define BOOST_TEST_MODULE core

-#include "net/config.hh"
+#include <seastar/net/config.hh>
#include <boost/test/included/unit_test.hpp>
#include <exception>
#include <sstream>
diff --git a/tests/noncopyable_function_test.cc b/tests/noncopyable_function_test.cc
index 407820c2..dc19d752 100644
--- a/tests/noncopyable_function_test.cc
+++ b/tests/noncopyable_function_test.cc
@@ -23,7 +23,7 @@
#define BOOST_TEST_MODULE core

#include <boost/test/included/unit_test.hpp>
-#include "util/noncopyable_function.hh"
+#include <seastar/util/noncopyable_function.hh>

using namespace seastar;

diff --git a/tests/output_stream_test.cc b/tests/output_stream_test.cc
index e2e43950..ddb61acd 100644
--- a/tests/output_stream_test.cc
+++ b/tests/output_stream_test.cc
@@ -19,13 +19,13 @@
* Copyright (C) 2014 Cloudius Systems, Ltd.
*/

-#include "core/app-template.hh"
-#include "core/shared_ptr.hh"
-#include "core/reactor.hh"
-#include "core/vector-data-sink.hh"
-#include "core/future-util.hh"
-#include "core/sstring.hh"
-#include "net/packet.hh"
+#include <seastar/core/app-template.hh>
+#include <seastar/core/shared_ptr.hh>
+#include <seastar/core/reactor.hh>
+#include <seastar/core/vector-data-sink.hh>
+#include <seastar/core/future-util.hh>
+#include <seastar/core/sstring.hh>
+#include <seastar/net/packet.hh>
#include "test-utils.hh"
#include <vector>

diff --git a/tests/packet_test.cc b/tests/packet_test.cc
index 6fcbd6fb..a0bdd291 100644
--- a/tests/packet_test.cc
+++ b/tests/packet_test.cc
@@ -23,7 +23,7 @@
#define BOOST_TEST_MODULE core

#include <boost/test/included/unit_test.hpp>
-#include "net/packet.hh"
+#include <seastar/net/packet.hh>
#include <array>

using namespace seastar;
diff --git a/tests/perf/perf_fstream.cc b/tests/perf/perf_fstream.cc
index 19fc8318..7e8cd6f1 100644
--- a/tests/perf/perf_fstream.cc
+++ b/tests/perf/perf_fstream.cc
@@ -19,10 +19,10 @@
* Copyright (C) 2016 ScyllaDB
*/

-#include "../../core/reactor.hh"
-#include "../../core/fstream.hh"
-#include "../../core/file.hh"
-#include "../../core/app-template.hh"
+#include <seastar/core/reactor.hh>
+#include <seastar/core/fstream.hh>
+#include <seastar/core/file.hh>
+#include <seastar/core/app-template.hh>

using namespace seastar;
using namespace std::chrono_literals;
diff --git a/tests/perf/perf_tests.cc b/tests/perf/perf_tests.cc
index bd6e56a4..3a24a332 100644
--- a/tests/perf/perf_tests.cc
+++ b/tests/perf/perf_tests.cc
@@ -29,8 +29,8 @@

#include <fmt/ostream.h>

-#include "core/app-template.hh"
-#include "core/thread.hh"
+#include <seastar/core/app-template.hh>
+#include <seastar/core/thread.hh>

namespace perf_tests {
namespace internal {
diff --git a/tests/perf/perf_tests.hh b/tests/perf/perf_tests.hh
index 729b78f6..643ec236 100644
--- a/tests/perf/perf_tests.hh
+++ b/tests/perf/perf_tests.hh
@@ -26,8 +26,8 @@

#include <fmt/format.h>

-#include "core/future.hh"
-#include "core/future-util.hh"
+#include <seastar/core/future.hh>
+#include <seastar/core/future-util.hh>


using namespace seastar;
diff --git a/tests/program_options_test.cc b/tests/program_options_test.cc
index b47f057f..408752d5 100644
--- a/tests/program_options_test.cc
+++ b/tests/program_options_test.cc
@@ -21,7 +21,7 @@

#define BOOST_TEST_MODULE core

-#include "util/program-options.hh"
+#include <seastar/util/program-options.hh>

#include <boost/program_options.hpp>
#include <boost/test/included/unit_test.hpp>
diff --git a/tests/queue_test.cc b/tests/queue_test.cc
index 0072b9f0..82762992 100644
--- a/tests/queue_test.cc
+++ b/tests/queue_test.cc
@@ -20,9 +20,9 @@
*/

#include "test-utils.hh"
-#include "core/queue.hh"
-#include "core/thread.hh"
-#include "core/sleep.hh"
+#include <seastar/core/queue.hh>
+#include <seastar/core/thread.hh>
+#include <seastar/core/sleep.hh>

using namespace seastar;
using namespace std::chrono_literals;
diff --git a/tests/rpc.cc b/tests/rpc.cc
index 5bfbcbbc..9330c6e0 100644
--- a/tests/rpc.cc
+++ b/tests/rpc.cc
@@ -19,11 +19,11 @@
* Copyright 2015 Cloudius Systems
*/
#include <cmath>
-#include "core/reactor.hh"
-#include "core/app-template.hh"
-#include "rpc/rpc.hh"
-#include "core/sleep.hh"
-#include "rpc/lz4_compressor.hh"
+#include <seastar/core/reactor.hh>
+#include <seastar/core/app-template.hh>
+#include <seastar/rpc/rpc.hh>
+#include <seastar/core/sleep.hh>
+#include <seastar/rpc/lz4_compressor.hh>

using namespace seastar;

diff --git a/tests/rpc_test.cc b/tests/rpc_test.cc
index 3eadffa9..8735b084 100644
--- a/tests/rpc_test.cc
+++ b/tests/rpc_test.cc
@@ -21,13 +21,13 @@


#include "loopback_socket.hh"
-#include "rpc/rpc.hh"
-#include "rpc/rpc_types.hh"
-#include "rpc/lz4_compressor.hh"
-#include "rpc/multi_algo_compressor_factory.hh"
+#include <seastar/rpc/rpc.hh>
+#include <seastar/rpc/rpc_types.hh>
+#include <seastar/rpc/lz4_compressor.hh>
+#include <seastar/rpc/multi_algo_compressor_factory.hh>
#include "test-utils.hh"
-#include "core/thread.hh"
-#include "core/sleep.hh"
+#include <seastar/core/thread.hh>
+#include <seastar/core/sleep.hh>

using namespace seastar;

diff --git a/tests/scheduling_group_demo.cc b/tests/scheduling_group_demo.cc
index 2725d299..043ad534 100644
--- a/tests/scheduling_group_demo.cc
+++ b/tests/scheduling_group_demo.cc
@@ -20,12 +20,12 @@
*/


-#include "../core/app-template.hh"
-#include "../core/future.hh"
-#include "../core/scheduling.hh"
-#include "../core/thread.hh"
-#include "../core/future-util.hh"
-#include "../core/reactor.hh"
+#include <seastar/core/app-template.hh>
+#include <seastar/core/future.hh>
+#include <seastar/core/scheduling.hh>
+#include <seastar/core/thread.hh>
+#include <seastar/core/future-util.hh>
+#include <seastar/core/reactor.hh>
#include <chrono>
#include <cmath>

diff --git a/tests/semaphore_test.cc b/tests/semaphore_test.cc
index c98542f4..bf4beb05 100644
--- a/tests/semaphore_test.cc
+++ b/tests/semaphore_test.cc
@@ -20,16 +20,16 @@
* Copyright (C) 2015 Cloudius Systems, Ltd.
*/

-#include "core/thread.hh"
-#include "core/do_with.hh"
+#include <seastar/core/thread.hh>
+#include <seastar/core/do_with.hh>
#include "test-utils.hh"
-#include "core/sstring.hh"
-#include "core/reactor.hh"
-#include "core/semaphore.hh"
-#include "core/do_with.hh"
-#include "core/future-util.hh"
-#include "core/sleep.hh"
-#include "core/shared_mutex.hh"
+#include <seastar/core/sstring.hh>
+#include <seastar/core/reactor.hh>
+#include <seastar/core/semaphore.hh>
+#include <seastar/core/do_with.hh>
+#include <seastar/core/future-util.hh>
+#include <seastar/core/sleep.hh>
+#include <seastar/core/shared_mutex.hh>
#include <boost/range/irange.hpp>

using namespace seastar;
diff --git a/tests/shared_ptr_test.cc b/tests/shared_ptr_test.cc
index c5308328..8de9d296 100644
--- a/tests/shared_ptr_test.cc
+++ b/tests/shared_ptr_test.cc
@@ -25,8 +25,8 @@
#include <boost/test/included/unit_test.hpp>
#include <set>
#include <unordered_map>
-#include "core/sstring.hh"
-#include "core/shared_ptr.hh"
+#include <seastar/core/sstring.hh>
+#include <seastar/core/shared_ptr.hh>

using namespace seastar;

diff --git a/tests/slab_test.cc b/tests/slab_test.cc
index fc44efc3..7588dd79 100644
--- a/tests/slab_test.cc
+++ b/tests/slab_test.cc
@@ -23,7 +23,7 @@

#include <iostream>
#include <assert.h>
-#include "core/slab.hh"
+#include <seastar/core/slab.hh>

using namespace seastar;

diff --git a/tests/smp_test.cc b/tests/smp_test.cc
index 7a374e59..eef1e6bd 100644
--- a/tests/smp_test.cc
+++ b/tests/smp_test.cc
@@ -19,9 +19,9 @@
* Copyright (C) 2014 Cloudius Systems, Ltd.
*/

-#include "core/reactor.hh"
-#include "core/app-template.hh"
-#include "core/print.hh"
+#include <seastar/core/reactor.hh>
+#include <seastar/core/app-template.hh>
+#include <seastar/core/print.hh>

using namespace seastar;

diff --git a/tests/sstring_test.cc b/tests/sstring_test.cc
index 4cfec4c8..46f15964 100644
--- a/tests/sstring_test.cc
+++ b/tests/sstring_test.cc
@@ -22,7 +22,7 @@
#define BOOST_TEST_MODULE core

#include <boost/test/included/unit_test.hpp>
-#include "core/sstring.hh"
+#include <seastar/core/sstring.hh>
#include <list>

using namespace seastar;
diff --git a/tests/tcp_sctp_client.cc b/tests/tcp_sctp_client.cc
index 212550cd..a0f1fd10 100644
--- a/tests/tcp_sctp_client.cc
+++ b/tests/tcp_sctp_client.cc
@@ -19,9 +19,9 @@
* Copyright (C) 2014 Cloudius Systems, Ltd.
*/

-#include "core/app-template.hh"
-#include "core/future-util.hh"
-#include "core/distributed.hh"
+#include <seastar/core/app-template.hh>
+#include <seastar/core/future-util.hh>
+#include <seastar/core/distributed.hh>

using namespace seastar;
using namespace net;
diff --git a/tests/tcp_sctp_server.cc b/tests/tcp_sctp_server.cc
index bed494b3..f8231e17 100644
--- a/tests/tcp_sctp_server.cc
+++ b/tests/tcp_sctp_server.cc
@@ -19,10 +19,10 @@
* Copyright 2014 Cloudius Systems
*/

-#include "core/reactor.hh"
-#include "core/app-template.hh"
-#include "core/temporary_buffer.hh"
-#include "core/distributed.hh"
+#include <seastar/core/reactor.hh>
+#include <seastar/core/app-template.hh>
+#include <seastar/core/temporary_buffer.hh>
+#include <seastar/core/distributed.hh>
#include <vector>
#include <iostream>

diff --git a/tests/tcp_test.cc b/tests/tcp_test.cc
index 8c7df5d7..93750834 100644
--- a/tests/tcp_test.cc
+++ b/tests/tcp_test.cc
@@ -19,9 +19,9 @@
* Copyright (C) 2014 Cloudius Systems, Ltd.
*/

-#include "net/ip.hh"
-#include "net/virtio.hh"
-#include "net/tcp.hh"
+#include <seastar/net/ip.hh>
+#include <seastar/net/virtio.hh>
+#include <seastar/net/tcp.hh>

using namespace seastar;
using namespace net;
diff --git a/tests/test-utils.cc b/tests/test-utils.cc
index 958b86ed..5fc14f22 100644
--- a/tests/test-utils.cc
+++ b/tests/test-utils.cc
@@ -28,9 +28,9 @@

#include <thread>

-#include "tests/test-utils.hh"
-#include "core/future.hh"
-#include "core/app-template.hh"
+#include "test-utils.hh"
+#include <seastar/core/future.hh>
+#include <seastar/core/app-template.hh>
#include <boost/test/included/unit_test.hpp>

namespace seastar {
diff --git a/tests/test-utils.hh b/tests/test-utils.hh
index 4448bad0..de5e4b0e 100644
--- a/tests/test-utils.hh
+++ b/tests/test-utils.hh
@@ -25,7 +25,7 @@

#include <boost/test/unit_test.hpp>

-#include "core/future.hh"
+#include <seastar/core/future.hh>
#include "test_runner.hh"

namespace seastar {
diff --git a/tests/test_runner.cc b/tests/test_runner.cc
index 6b9b8bcf..55e6f15d 100644
--- a/tests/test_runner.cc
+++ b/tests/test_runner.cc
@@ -21,9 +21,9 @@

#include <iostream>

-#include "core/app-template.hh"
-#include "core/future-util.hh"
-#include "core/reactor.hh"
+#include <seastar/core/app-template.hh>
+#include <seastar/core/future-util.hh>
+#include <seastar/core/reactor.hh>
#include "test_runner.hh"

namespace seastar {
diff --git a/tests/test_runner.hh b/tests/test_runner.hh
index 55f6c439..02132e61 100644
--- a/tests/test_runner.hh
+++ b/tests/test_runner.hh
@@ -24,8 +24,8 @@
#include <memory>
#include <functional>
#include <atomic>
-#include "core/future.hh"
-#include "core/posix.hh"
+#include <seastar/core/future.hh>
+#include <seastar/core/posix.hh>
#include "exchanger.hh"

namespace seastar {
diff --git a/tests/thread_context_switch.cc b/tests/thread_context_switch.cc
index 9f786698..9cfccf55 100644
--- a/tests/thread_context_switch.cc
+++ b/tests/thread_context_switch.cc
@@ -21,12 +21,12 @@
*/

#include <experimental/optional>
-#include "core/thread.hh"
-#include "core/semaphore.hh"
-#include "core/app-template.hh"
-#include "core/do_with.hh"
-#include "core/distributed.hh"
-#include "core/sleep.hh"
+#include <seastar/core/thread.hh>
+#include <seastar/core/semaphore.hh>
+#include <seastar/core/app-template.hh>
+#include <seastar/core/do_with.hh>
+#include <seastar/core/distributed.hh>
+#include <seastar/core/sleep.hh>

using namespace seastar;
using namespace std::chrono_literals;
diff --git a/tests/thread_test.cc b/tests/thread_test.cc
index 43e7965e..cf7198cb 100644
--- a/tests/thread_test.cc
+++ b/tests/thread_test.cc
@@ -20,15 +20,15 @@
* Copyright (C) 2015 Cloudius Systems, Ltd.
*/

-#include "core/thread.hh"
-#include "core/do_with.hh"
+#include <seastar/core/thread.hh>
+#include <seastar/core/do_with.hh>
#include "test-utils.hh"
-#include "core/sstring.hh"
-#include "core/reactor.hh"
-#include "core/semaphore.hh"
-#include "core/do_with.hh"
-#include "core/future-util.hh"
-#include "core/sleep.hh"
+#include <seastar/core/sstring.hh>
+#include <seastar/core/reactor.hh>
+#include <seastar/core/semaphore.hh>
+#include <seastar/core/do_with.hh>
+#include <seastar/core/future-util.hh>
+#include <seastar/core/sleep.hh>

using namespace seastar;
using namespace std::chrono_literals;
diff --git a/tests/timertest.cc b/tests/timertest.cc
index 3a898906..dfd43841 100644
--- a/tests/timertest.cc
+++ b/tests/timertest.cc
@@ -19,9 +19,9 @@
* Copyright (C) 2014 Cloudius Systems, Ltd.
*/

-#include "core/app-template.hh"
-#include "core/reactor.hh"
-#include "core/print.hh"
+#include <seastar/core/app-template.hh>
+#include <seastar/core/reactor.hh>
+#include <seastar/core/print.hh>
#include <chrono>

using namespace seastar;
diff --git a/tests/tls_echo_server.cc b/tests/tls_echo_server.cc
index 7accc535..1ca0efbb 100644
--- a/tests/tls_echo_server.cc
+++ b/tests/tls_echo_server.cc
@@ -19,10 +19,10 @@
* Copyright 2015 Cloudius Systems
*/
#include <cmath>
-#include "core/reactor.hh"
-#include "core/app-template.hh"
-#include "core/sleep.hh"
-#include "net/dns.hh"
+#include <seastar/core/reactor.hh>
+#include <seastar/core/app-template.hh>
+#include <seastar/core/sleep.hh>
+#include <seastar/net/dns.hh>
#include "tls_echo_server.hh"

using namespace seastar;
diff --git a/tests/tls_echo_server.hh b/tests/tls_echo_server.hh
index 8181c173..e9e09ac6 100644
--- a/tests/tls_echo_server.hh
+++ b/tests/tls_echo_server.hh
@@ -20,14 +20,14 @@
*/
#pragma once

-#include "core/do_with.hh"
-#include "core/sstring.hh"
-#include "core/reactor.hh"
-#include "core/do_with.hh"
-#include "core/future-util.hh"
-#include "core/sharded.hh"
-#include "core/gate.hh"
-#include "net/tls.hh"
+#include <seastar/core/do_with.hh>
+#include <seastar/core/sstring.hh>
+#include <seastar/core/reactor.hh>
+#include <seastar/core/do_with.hh>
+#include <seastar/core/future-util.hh>
+#include <seastar/core/sharded.hh>
+#include <seastar/core/gate.hh>
+#include <seastar/net/tls.hh>

using namespace seastar;

diff --git a/tests/tls_simple_client.cc b/tests/tls_simple_client.cc
index 5f087ecd..ea598e48 100644
--- a/tests/tls_simple_client.cc
+++ b/tests/tls_simple_client.cc
@@ -20,11 +20,11 @@
*/
#include <cmath>

-#include "core/shared_ptr.hh"
-#include "core/reactor.hh"
-#include "core/app-template.hh"
-#include "core/sleep.hh"
-#include "net/dns.hh"
+#include <seastar/core/shared_ptr.hh>
+#include <seastar/core/reactor.hh>
+#include <seastar/core/app-template.hh>
+#include <seastar/core/sleep.hh>
+#include <seastar/net/dns.hh>
#include "tls_echo_server.hh"

using namespace seastar;
diff --git a/tests/tls_test.cc b/tests/tls_test.cc
index 09723332..668e47b5 100644
--- a/tests/tls_test.cc
+++ b/tests/tls_test.cc
@@ -20,16 +20,16 @@
* Copyright (C) 2015 Cloudius Systems, Ltd.
*/

-#include "core/do_with.hh"
+#include <seastar/core/do_with.hh>
#include "test-utils.hh"
-#include "core/sstring.hh"
-#include "core/reactor.hh"
-#include "core/do_with.hh"
-#include "core/future-util.hh"
-#include "core/sharded.hh"
-#include "core/thread.hh"
-#include "core/gate.hh"
-#include "net/tls.hh"
+#include <seastar/core/sstring.hh>
+#include <seastar/core/reactor.hh>
+#include <seastar/core/do_with.hh>
+#include <seastar/core/future-util.hh>
+#include <seastar/core/sharded.hh>
+#include <seastar/core/thread.hh>
+#include <seastar/core/gate.hh>
+#include <seastar/net/tls.hh>

#if 0
#include <gnutls/gnutls.h>
diff --git a/tests/tuple_utils_test.cc b/tests/tuple_utils_test.cc
index ebf878a0..6a278f01 100644
--- a/tests/tuple_utils_test.cc
+++ b/tests/tuple_utils_test.cc
@@ -21,7 +21,7 @@

#define BOOST_TEST_MODULE core

-#include <util/tuple_utils.hh>
+#include <seastar/util/tuple_utils.hh>

#include <boost/test/included/unit_test.hpp>

diff --git a/tests/udp_client.cc b/tests/udp_client.cc
index 5f01d0cf..9310ea54 100644
--- a/tests/udp_client.cc
+++ b/tests/udp_client.cc
@@ -19,10 +19,10 @@
* Copyright (C) 2014 Cloudius Systems, Ltd.
*/

-#include "core/app-template.hh"
-#include "core/future-util.hh"
-#include "core/reactor.hh"
-#include "net/api.hh"
+#include <seastar/core/app-template.hh>
+#include <seastar/core/future-util.hh>
+#include <seastar/core/reactor.hh>
+#include <seastar/net/api.hh>

using namespace seastar;
using namespace net;
diff --git a/tests/udp_server.cc b/tests/udp_server.cc
index 6586577f..76eebd3e 100644
--- a/tests/udp_server.cc
+++ b/tests/udp_server.cc
@@ -19,9 +19,9 @@
* Copyright (C) 2014 Cloudius Systems, Ltd.
*/

-#include "core/distributed.hh"
-#include "core/app-template.hh"
-#include "core/future-util.hh"
+#include <seastar/core/distributed.hh>
+#include <seastar/core/app-template.hh>
+#include <seastar/core/future-util.hh>

using namespace seastar;
using namespace net;
diff --git a/tests/udp_zero_copy.cc b/tests/udp_zero_copy.cc
index f4ed0a66..5cf20bff 100644
--- a/tests/udp_zero_copy.cc
+++ b/tests/udp_zero_copy.cc
@@ -19,12 +19,12 @@
* Copyright (C) 2014 Cloudius Systems, Ltd.
*/

-#include "core/app-template.hh"
-#include "core/future-util.hh"
-#include "core/scattered_message.hh"
-#include "core/vector-data-sink.hh"
-#include "core/shared_ptr.hh"
-#include "core/units.hh"
+#include <seastar/core/app-template.hh>
+#include <seastar/core/future-util.hh>
+#include <seastar/core/scattered_message.hh>
+#include <seastar/core/vector-data-sink.hh>
+#include <seastar/core/shared_ptr.hh>
+#include <seastar/core/units.hh>
#include <random>
#include <iomanip>

diff --git a/tests/unwind_test.cc b/tests/unwind_test.cc
index b79a3e3b..b2f2e7f5 100644
--- a/tests/unwind_test.cc
+++ b/tests/unwind_test.cc
@@ -23,9 +23,9 @@

#include <boost/test/included/unit_test.hpp>
#include <pthread.h>
-#include "util/defer.hh"
-#include "core/posix.hh"
-#include "util/backtrace.hh"
+#include <seastar/util/defer.hh>
+#include <seastar/core/posix.hh>
+#include <seastar/util/backtrace.hh>

using namespace seastar;

diff --git a/tests/weak_ptr_test.cc b/tests/weak_ptr_test.cc
index 04e4a26d..98fdee18 100644
--- a/tests/weak_ptr_test.cc
+++ b/tests/weak_ptr_test.cc
@@ -23,7 +23,7 @@
#define BOOST_TEST_MODULE core

#include <boost/test/included/unit_test.hpp>
-#include "core/weak_ptr.hh"
+#include <seastar/core/weak_ptr.hh>

using namespace seastar;

--
2.17.1

Jesse Haber-Kucharsky

<jhaberku@scylladb.com>
unread,
Aug 3, 2018, 6:15:26 PM8/3/18
to seastar-dev@googlegroups.com, Jesse Haber-Kucharsky
These tests require manual intervention to run and are not unit tests.

By moving these to the `demo` directory, we can be more clear about
which tests should gate merges/releases and act accordingly.

Signed-off-by: Jesse Haber-Kucharsky <jhab...@scylladb.com>
---
configure.py | 60 ++++++++++++-------------
{test => demo}/blkdiscard_test.cc | 0
{test => demo}/echotest.cc | 0
{test => demo}/ip_test.cc | 0
{test => demo}/l3_test.cc | 0
{test => demo}/linecount.cc | 0
{test => demo}/rpc.cc | 0
{test => demo}/scheduling_group_demo.cc | 0
{test => demo}/tcp_sctp_client.cc | 0
{test => demo}/tcp_sctp_server.cc | 0
{test => demo}/tcp_test.cc | 0
{test => demo}/tls_echo_server.cc | 0
{test => demo}/tls_echo_server.hh | 0
{test => demo}/tls_simple_client.cc | 0
{test => demo}/udp_client.cc | 0
{test => demo}/udp_server.cc | 0
{test => demo}/udp_zero_copy.cc | 0
17 files changed, 30 insertions(+), 30 deletions(-)
rename {test => demo}/blkdiscard_test.cc (100%)
rename {test => demo}/echotest.cc (100%)
rename {test => demo}/ip_test.cc (100%)
rename {test => demo}/l3_test.cc (100%)
rename {test => demo}/linecount.cc (100%)
rename {test => demo}/rpc.cc (100%)
rename {test => demo}/scheduling_group_demo.cc (100%)
rename {test => demo}/tcp_sctp_client.cc (100%)
rename {test => demo}/tcp_sctp_server.cc (100%)
rename {test => demo}/tcp_test.cc (100%)
rename {test => demo}/tls_echo_server.cc (100%)
rename {test => demo}/tls_echo_server.hh (100%)
rename {test => demo}/tls_simple_client.cc (100%)
rename {test => demo}/udp_client.cc (100%)
rename {test => demo}/udp_server.cc (100%)
rename {test => demo}/udp_zero_copy.cc (100%)

diff --git a/configure.py b/configure.py
index 90651258..cd28c675 100755
--- a/configure.py
+++ b/configure.py
@@ -249,38 +249,38 @@ perf_tests = [
tests = [
'test/file_io_test',
'test/directory_test',
- 'test/linecount',
- 'test/echotest',
- 'test/l3_test',
- 'test/ip_test',
+ 'demo/linecount',
+ 'demo/echotest',
+ 'demo/l3_test',
+ 'demo/ip_test',
'test/timer_test',
- 'test/tcp_test',
+ 'demo/tcp_test',
'test/futures_test',
'test/alloc_test',
'test/foreign_ptr_test',
'test/smp_test',
'test/thread_test',
'test/thread_context_switch_test',
- 'test/udp_server',
- 'test/udp_client',
- 'test/blkdiscard_test',
+ 'demo/udp_server',
+ 'demo/udp_client',
+ 'demo/blkdiscard_test',
'test/sstring_test',
'test/unwind_test',
'test/defer_test',
'test/httpd_test',
'test/memcached/memcached_ascii_parser_test',
- 'test/tcp_sctp_server',
- 'test/tcp_sctp_client',
+ 'demo/tcp_sctp_server',
+ 'demo/tcp_sctp_client',
'test/allocator_test',
'test/output_stream_test',
- 'test/udp_zero_copy',
+ 'demo/udp_zero_copy',
'test/shared_ptr_test',
'test/weak_ptr_test',
'test/checked_ptr_test',
'test/slab_test',
'test/fstream_test',
'test/distributed_test',
- 'test/rpc',
+ 'demo/rpc',
'test/semaphore_test',
'test/expiring_fifo_test',
'test/packet_test',
@@ -297,8 +297,8 @@ tests = [
'test/lowres_clock_test',
'test/program_options_test',
'test/tuple_utils_test',
- 'test/tls_echo_server',
- 'test/tls_simple_client',
+ 'demo/tls_echo_server',
+ 'demo/tls_simple_client',
'test/circular_buffer_fixed_capacity_test',
'test/noncopyable_function_test',
'test/netconfig_test',
@@ -312,7 +312,7 @@ apps = [
'app/io_tester/io_tester',
'app/memcached/memcached',
'app/iotune/iotune',
- 'test/scheduling_group_demo',
+ 'demo/scheduling_group_demo',
]

extralibs = {
@@ -509,11 +509,11 @@ deps = {
'test/memcached/memcached_ascii_parser_test': ['test/memcached/test_ascii_parser.cc'] + memcache_base,
'test/file_io_test': ['test/fileiotest.cc'] + core,
'test/directory_test': ['test/directory_test.cc'] + core,
- 'test/linecount': ['test/linecount.cc'] + core,
- 'test/echotest': ['test/echotest.cc'] + core + libnet,
- 'test/l3_test': ['test/l3_test.cc'] + core + libnet,
- 'test/ip_test': ['test/ip_test.cc'] + core + libnet,
- 'test/tcp_test': ['test/tcp_test.cc'] + core + libnet,
+ 'demo/linecount': ['demo/linecount.cc'] + core,
+ 'demo/echotest': ['demo/echotest.cc'] + core + libnet,
+ 'demo/l3_test': ['demo/l3_test.cc'] + core + libnet,
+ 'demo/ip_test': ['demo/ip_test.cc'] + core + libnet,
+ 'demo/tcp_test': ['demo/tcp_test.cc'] + core + libnet,
'test/timer_test': ['test/timertest.cc'] + core,
'test/futures_test': ['test/futures_test.cc'] + core,
'test/alloc_test': ['test/alloc_test.cc'] + core,
@@ -523,30 +523,30 @@ deps = {
'test/smp_test': ['test/smp_test.cc'] + core,
'test/thread_test': ['test/thread_test.cc'] + core,
'test/thread_context_switch_test': ['test/thread_context_switch.cc'] + core,
- 'test/udp_server': ['test/udp_server.cc'] + core + libnet,
- 'test/udp_client': ['test/udp_client.cc'] + core + libnet,
- 'test/tcp_sctp_server': ['test/tcp_sctp_server.cc'] + core + libnet,
- 'test/tcp_sctp_client': ['test/tcp_sctp_client.cc'] + core + libnet,
+ 'demo/udp_server': ['demo/udp_server.cc'] + core + libnet,
+ 'demo/udp_client': ['demo/udp_client.cc'] + core + libnet,
+ 'demo/tcp_sctp_server': ['demo/tcp_sctp_server.cc'] + core + libnet,
+ 'demo/tcp_sctp_client': ['demo/tcp_sctp_client.cc'] + core + libnet,
'test/tls_test': ['test/tls_test.cc'] + core + libnet,
'test/fair_queue_test': ['test/fair_queue_test.cc'] + core,
'app/seawreck/seawreck': ['app/seawreck/seawreck.cc', 'gen/http/http_response_parser.rl'] + core + libnet,
'app/io_tester/io_tester': ['app/io_tester/io_tester.cc'] + core,
'app/iotune/iotune': ['app/iotune/iotune.cc'] + core,
- 'test/blkdiscard_test': ['test/blkdiscard_test.cc'] + core,
+ 'demo/blkdiscard_test': ['demo/blkdiscard_test.cc'] + core,
'test/sstring_test': ['test/sstring_test.cc'] + core,
'test/unwind_test': ['test/unwind_test.cc'] + core,
'test/defer_test': ['test/defer_test.cc'] + core,
'test/httpd_test': ['test/httpd.cc'] + http + core,
'test/allocator_test': ['test/allocator_test.cc'] + core,
'test/output_stream_test': ['test/output_stream_test.cc'] + core + libnet,
- 'test/udp_zero_copy': ['test/udp_zero_copy.cc'] + core + libnet,
+ 'demo/udp_zero_copy': ['demo/udp_zero_copy.cc'] + core + libnet,
'test/shared_ptr_test': ['test/shared_ptr_test.cc'] + core,
'test/weak_ptr_test': ['test/weak_ptr_test.cc'] + core,
'test/checked_ptr_test': ['test/checked_ptr_test.cc'] + core,
'test/slab_test': ['test/slab_test.cc'] + core,
'test/fstream_test': ['test/fstream_test.cc'] + core,
'test/distributed_test': ['test/distributed_test.cc'] + core,
- 'test/rpc': ['test/rpc.cc'] + core + libnet,
+ 'demo/rpc': ['demo/rpc.cc'] + core + libnet,
'test/rpc_test': ['test/rpc_test.cc'] + core + libnet,
'test/packet_test': ['test/packet_test.cc'] + core + libnet,
'test/connect_test': ['test/connect_test.cc'] + core + libnet,
@@ -559,10 +559,10 @@ deps = {
'test/lowres_clock_test': ['test/lowres_clock_test.cc'] + core,
'test/program_options_test': ['test/program_options_test.cc'] + core,
'test/tuple_utils_test': ['test/tuple_utils_test.cc'],
- 'test/tls_echo_server': ['test/tls_echo_server.cc'] + core + libnet,
- 'test/tls_simple_client': ['test/tls_simple_client.cc'] + core + libnet,
+ 'demo/tls_echo_server': ['demo/tls_echo_server.cc'] + core + libnet,
+ 'demo/tls_simple_client': ['demo/tls_simple_client.cc'] + core + libnet,
'test/circular_buffer_fixed_capacity_test': ['test/circular_buffer_fixed_capacity_test.cc'],
- 'test/scheduling_group_demo': ['test/scheduling_group_demo.cc'] + core,
+ 'demo/scheduling_group_demo': ['demo/scheduling_group_demo.cc'] + core,
'test/noncopyable_function_test': ['test/noncopyable_function_test.cc'],
'test/netconfig_test': ['test/netconfig_test.cc'] + core + libnet,
'test/abort_source_test': ['test/abort_source_test.cc'] + core,
diff --git a/test/blkdiscard_test.cc b/demo/blkdiscard_test.cc
similarity index 100%
rename from test/blkdiscard_test.cc
rename to demo/blkdiscard_test.cc
diff --git a/test/echotest.cc b/demo/echotest.cc
similarity index 100%
rename from test/echotest.cc
rename to demo/echotest.cc
diff --git a/test/ip_test.cc b/demo/ip_test.cc
similarity index 100%
rename from test/ip_test.cc
rename to demo/ip_test.cc
diff --git a/test/l3_test.cc b/demo/l3_test.cc
similarity index 100%
rename from test/l3_test.cc
rename to demo/l3_test.cc
diff --git a/test/linecount.cc b/demo/linecount.cc
similarity index 100%
rename from test/linecount.cc
rename to demo/linecount.cc
diff --git a/test/rpc.cc b/demo/rpc.cc
similarity index 100%
rename from test/rpc.cc
rename to demo/rpc.cc
diff --git a/test/scheduling_group_demo.cc b/demo/scheduling_group_demo.cc
similarity index 100%
rename from test/scheduling_group_demo.cc
rename to demo/scheduling_group_demo.cc
diff --git a/test/tcp_sctp_client.cc b/demo/tcp_sctp_client.cc
similarity index 100%
rename from test/tcp_sctp_client.cc
rename to demo/tcp_sctp_client.cc
diff --git a/test/tcp_sctp_server.cc b/demo/tcp_sctp_server.cc
similarity index 100%
rename from test/tcp_sctp_server.cc
rename to demo/tcp_sctp_server.cc
diff --git a/test/tcp_test.cc b/demo/tcp_test.cc
similarity index 100%
rename from test/tcp_test.cc
rename to demo/tcp_test.cc
diff --git a/test/tls_echo_server.cc b/demo/tls_echo_server.cc
similarity index 100%
rename from test/tls_echo_server.cc
rename to demo/tls_echo_server.cc
diff --git a/test/tls_echo_server.hh b/demo/tls_echo_server.hh
similarity index 100%
rename from test/tls_echo_server.hh
rename to demo/tls_echo_server.hh
diff --git a/test/tls_simple_client.cc b/demo/tls_simple_client.cc
similarity index 100%
rename from test/tls_simple_client.cc
rename to demo/tls_simple_client.cc
diff --git a/test/udp_client.cc b/demo/udp_client.cc
similarity index 100%
rename from test/udp_client.cc
rename to demo/udp_client.cc
diff --git a/test/udp_server.cc b/demo/udp_server.cc
similarity index 100%
rename from test/udp_server.cc
rename to demo/udp_server.cc
diff --git a/test/udp_zero_copy.cc b/demo/udp_zero_copy.cc
similarity index 100%
rename from test/udp_zero_copy.cc
rename to demo/udp_zero_copy.cc
--
2.17.1

Jesse Haber-Kucharsky

<jhaberku@scylladb.com>
unread,
Aug 3, 2018, 6:15:26 PM8/3/18
to seastar-dev@googlegroups.com, Jesse Haber-Kucharsky
The previous naming scheme used an inconsistent mix of plural and
singular names.

Singular names are more conventional in C and C++.

Signed-off-by: Jesse Haber-Kucharsky <jhab...@scylladb.com>
---
{apps => app}/httpd/demo.json | 0
{apps => app}/httpd/main.cc | 2 +-
{apps => app}/io_tester/conf.yaml | 0
{apps => app}/io_tester/io_tester.cc | 0
{apps => app}/iotune/iotune.cc | 0
{apps => app}/memcached/ascii.rl | 2 +-
{apps => app}/memcached/memcache.cc | 4 +-
{apps => app}/memcached/memcached.hh | 0
{apps => app}/seawreck/seawreck.cc | 0
configure.py | 308 +++++++++---------
{licenses => license}/dpdk.txt | 0
{licenses => license}/freebsd.txt | 0
{scripts => script}/dpdk_nic_bind.py | 0
{scripts => script}/perftune.py | 0
{scripts => script}/perftune.yaml | 0
{scripts => script}/posix_net_conf.sh | 0
{scripts => script}/run_with_dpdk.sh | 0
{scripts => script}/seastar-addr2line | 0
{scripts => script}/seastar-cpu-map.sh | 0
{scripts => script}/tap.sh | 0
test.py | 8 +-
{tests => test}/abort_source_test.cc | 0
{tests => test}/alien_test.cc | 0
{tests => test}/alloc_test.cc | 0
{tests => test}/allocator_test.cc | 0
{tests => test}/blkdiscard_test.cc | 0
{tests => test}/catest.key | 0
{tests => test}/catest.pem | 0
{tests => test}/checked_ptr_test.cc | 0
{tests => test}/chunked_fifo_test.cc | 0
.../circular_buffer_fixed_capacity_test.cc | 0
{tests => test}/circular_buffer_test.cc | 0
{tests => test}/connect_test.cc | 0
{tests => test}/defer_test.cc | 0
{tests => test}/directory_test.cc | 0
{tests => test}/distributed_test.cc | 0
{tests => test}/dns_test.cc | 0
{tests => test}/echotest.cc | 0
{tests => test}/exchanger.hh | 0
{tests => test}/execution_stage_test.cc | 0
{tests => test}/expiring_fifo_test.cc | 0
{tests => test}/fair_queue_test.cc | 0
{tests => test}/fileiotest.cc | 0
{tests => test}/foreign_ptr_test.cc | 0
{tests => test}/fstream_test.cc | 0
{tests => test}/futures_test.cc | 0
{tests => test}/httpd.cc | 0
{tests => test}/ip_test.cc | 0
{tests => test}/json_formatter_test.cc | 0
{tests => test}/l3_test.cc | 0
{tests => test}/linecount.cc | 0
{tests => test}/loopback_socket.hh | 0
{tests => test}/lowres_clock_test.cc | 0
{tests => test}/memcached/test.py | 0
.../memcached/test_ascii_parser.cc | 2 +-
{tests => test}/memcached/test_memcached.py | 0
{tests => test}/mkcert.gmk | 0
{tests => test}/mock_file.hh | 0
{tests => test}/netconfig_test.cc | 0
{tests => test}/noncopyable_function_test.cc | 0
{tests => test}/output_stream_test.cc | 0
{tests => test}/packet_test.cc | 0
{tests => test}/perf/perf-tests.md | 0
{tests => test}/perf/perf_fstream.cc | 0
{tests => test}/perf/perf_future_util.cc | 0
{tests => test}/perf/perf_tests.cc | 0
{tests => test}/perf/perf_tests.hh | 0
{tests => test}/program_options_test.cc | 0
{tests => test}/queue_test.cc | 0
{tests => test}/rpc.cc | 0
{tests => test}/rpc_test.cc | 0
{tests => test}/scheduling_group_demo.cc | 0
{tests => test}/semaphore_test.cc | 0
{tests => test}/shared_ptr_test.cc | 0
{tests => test}/slab_test.cc | 0
{tests => test}/smp_test.cc | 0
{tests => test}/sstring_test.cc | 0
{tests => test}/tcp_sctp_client.cc | 0
{tests => test}/tcp_sctp_server.cc | 0
{tests => test}/tcp_test.cc | 0
{tests => test}/test-utils.cc | 0
{tests => test}/test-utils.hh | 0
{tests => test}/test.crl | 0
{tests => test}/test.crt | 0
{tests => test}/test.csr | 0
{tests => test}/test.key | 0
{tests => test}/test_runner.cc | 0
{tests => test}/test_runner.hh | 0
{tests => test}/thread_context_switch.cc | 0
{tests => test}/thread_test.cc | 0
{tests => test}/timertest.cc | 0
{tests => test}/tls-ca-bundle.pem | 0
{tests => test}/tls_echo_server.cc | 0
{tests => test}/tls_echo_server.hh | 0
{tests => test}/tls_simple_client.cc | 0
{tests => test}/tls_test.cc | 32 +-
{tests => test}/tuple_utils_test.cc | 0
{tests => test}/udp_client.cc | 0
{tests => test}/udp_server.cc | 0
{tests => test}/udp_zero_copy.cc | 0
{tests => test}/unwind_test.cc | 0
{tests => test}/weak_ptr_test.cc | 0
102 files changed, 179 insertions(+), 179 deletions(-)
rename {apps => app}/httpd/demo.json (100%)
rename {apps => app}/httpd/main.cc (98%)
rename {apps => app}/io_tester/conf.yaml (100%)
rename {apps => app}/io_tester/io_tester.cc (100%)
rename {apps => app}/iotune/iotune.cc (100%)
rename {apps => app}/memcached/ascii.rl (99%)
rename {apps => app}/memcached/memcache.cc (99%)
rename {apps => app}/memcached/memcached.hh (100%)
rename {apps => app}/seawreck/seawreck.cc (100%)
rename {licenses => license}/dpdk.txt (100%)
rename {licenses => license}/freebsd.txt (100%)
rename {scripts => script}/dpdk_nic_bind.py (100%)
rename {scripts => script}/perftune.py (100%)
rename {scripts => script}/perftune.yaml (100%)
rename {scripts => script}/posix_net_conf.sh (100%)
rename {scripts => script}/run_with_dpdk.sh (100%)
rename {scripts => script}/seastar-addr2line (100%)
rename {scripts => script}/seastar-cpu-map.sh (100%)
rename {scripts => script}/tap.sh (100%)
rename {tests => test}/abort_source_test.cc (100%)
rename {tests => test}/alien_test.cc (100%)
rename {tests => test}/alloc_test.cc (100%)
rename {tests => test}/allocator_test.cc (100%)
rename {tests => test}/blkdiscard_test.cc (100%)
rename {tests => test}/catest.key (100%)
rename {tests => test}/catest.pem (100%)
rename {tests => test}/checked_ptr_test.cc (100%)
rename {tests => test}/chunked_fifo_test.cc (100%)
rename {tests => test}/circular_buffer_fixed_capacity_test.cc (100%)
rename {tests => test}/circular_buffer_test.cc (100%)
rename {tests => test}/connect_test.cc (100%)
rename {tests => test}/defer_test.cc (100%)
rename {tests => test}/directory_test.cc (100%)
rename {tests => test}/distributed_test.cc (100%)
rename {tests => test}/dns_test.cc (100%)
rename {tests => test}/echotest.cc (100%)
rename {tests => test}/exchanger.hh (100%)
rename {tests => test}/execution_stage_test.cc (100%)
rename {tests => test}/expiring_fifo_test.cc (100%)
rename {tests => test}/fair_queue_test.cc (100%)
rename {tests => test}/fileiotest.cc (100%)
rename {tests => test}/foreign_ptr_test.cc (100%)
rename {tests => test}/fstream_test.cc (100%)
rename {tests => test}/futures_test.cc (100%)
rename {tests => test}/httpd.cc (100%)
rename {tests => test}/ip_test.cc (100%)
rename {tests => test}/json_formatter_test.cc (100%)
rename {tests => test}/l3_test.cc (100%)
rename {tests => test}/linecount.cc (100%)
rename {tests => test}/loopback_socket.hh (100%)
rename {tests => test}/lowres_clock_test.cc (100%)
rename {tests => test}/memcached/test.py (100%)
rename {tests => test}/memcached/test_ascii_parser.cc (99%)
rename {tests => test}/memcached/test_memcached.py (100%)
rename {tests => test}/mkcert.gmk (100%)
rename {tests => test}/mock_file.hh (100%)
rename {tests => test}/netconfig_test.cc (100%)
rename {tests => test}/noncopyable_function_test.cc (100%)
rename {tests => test}/output_stream_test.cc (100%)
rename {tests => test}/packet_test.cc (100%)
rename {tests => test}/perf/perf-tests.md (100%)
rename {tests => test}/perf/perf_fstream.cc (100%)
rename {tests => test}/perf/perf_future_util.cc (100%)
rename {tests => test}/perf/perf_tests.cc (100%)
rename {tests => test}/perf/perf_tests.hh (100%)
rename {tests => test}/program_options_test.cc (100%)
rename {tests => test}/queue_test.cc (100%)
rename {tests => test}/rpc.cc (100%)
rename {tests => test}/rpc_test.cc (100%)
rename {tests => test}/scheduling_group_demo.cc (100%)
rename {tests => test}/semaphore_test.cc (100%)
rename {tests => test}/shared_ptr_test.cc (100%)
rename {tests => test}/slab_test.cc (100%)
rename {tests => test}/smp_test.cc (100%)
rename {tests => test}/sstring_test.cc (100%)
rename {tests => test}/tcp_sctp_client.cc (100%)
rename {tests => test}/tcp_sctp_server.cc (100%)
rename {tests => test}/tcp_test.cc (100%)
rename {tests => test}/test-utils.cc (100%)
rename {tests => test}/test-utils.hh (100%)
rename {tests => test}/test.crl (100%)
rename {tests => test}/test.crt (100%)
rename {tests => test}/test.csr (100%)
rename {tests => test}/test.key (100%)
rename {tests => test}/test_runner.cc (100%)
rename {tests => test}/test_runner.hh (100%)
rename {tests => test}/thread_context_switch.cc (100%)
rename {tests => test}/thread_test.cc (100%)
rename {tests => test}/timertest.cc (100%)
rename {tests => test}/tls-ca-bundle.pem (100%)
rename {tests => test}/tls_echo_server.cc (100%)
rename {tests => test}/tls_echo_server.hh (100%)
rename {tests => test}/tls_simple_client.cc (100%)
rename {tests => test}/tls_test.cc (92%)
rename {tests => test}/tuple_utils_test.cc (100%)
rename {tests => test}/udp_client.cc (100%)
rename {tests => test}/udp_server.cc (100%)
rename {tests => test}/udp_zero_copy.cc (100%)
rename {tests => test}/unwind_test.cc (100%)
rename {tests => test}/weak_ptr_test.cc (100%)

diff --git a/apps/httpd/demo.json b/app/httpd/demo.json
similarity index 100%
rename from apps/httpd/demo.json
rename to app/httpd/demo.json
diff --git a/apps/httpd/main.cc b/app/httpd/main.cc
similarity index 98%
rename from apps/httpd/main.cc
rename to app/httpd/main.cc
index 39f5ab28..bdbf960f 100644
--- a/apps/httpd/main.cc
+++ b/app/httpd/main.cc
@@ -23,7 +23,7 @@
#include <seastar/http/handlers.hh>
#include <seastar/http/function_handlers.hh>
#include <seastar/http/file_handler.hh>
-#include <seastar/apps/httpd/demo.json.hh>
+#include <seastar/app/httpd/demo.json.hh>
#include <seastar/http/api_docs.hh>

namespace bpo = boost::program_options;
diff --git a/apps/io_tester/conf.yaml b/app/io_tester/conf.yaml
similarity index 100%
rename from apps/io_tester/conf.yaml
rename to app/io_tester/conf.yaml
diff --git a/apps/io_tester/io_tester.cc b/app/io_tester/io_tester.cc
similarity index 100%
rename from apps/io_tester/io_tester.cc
rename to app/io_tester/io_tester.cc
diff --git a/apps/iotune/iotune.cc b/app/iotune/iotune.cc
similarity index 100%
rename from apps/iotune/iotune.cc
rename to app/iotune/iotune.cc
diff --git a/apps/memcached/ascii.rl b/app/memcached/ascii.rl
similarity index 99%
rename from apps/memcached/ascii.rl
rename to app/memcached/ascii.rl
index 3e0c3e46..44163f57 100644
--- a/apps/memcached/ascii.rl
+++ b/app/memcached/ascii.rl
@@ -20,7 +20,7 @@
*/

#include <seastar/core/ragel.hh>
-#include "apps/memcached/memcached.hh"
+#include "app/memcached/memcached.hh"
#include <memory>
#include <algorithm>
#include <functional>
diff --git a/apps/memcached/memcache.cc b/app/memcached/memcache.cc
similarity index 99%
rename from apps/memcached/memcache.cc
rename to app/memcached/memcache.cc
index beed98e8..437a47a1 100644
--- a/apps/memcached/memcache.cc
+++ b/app/memcached/memcache.cc
@@ -41,8 +41,8 @@
#include <seastar/net/api.hh>
#include <seastar/net/packet-data-source.hh>
// These two paths are non-conventional due to limitations in `configure.py`.
-#include <seastar/apps/memcached/ascii.hh>
-#include "apps/memcached/memcached.hh"
+#include <seastar/app/memcached/ascii.hh>
+#include "app/memcached/memcached.hh"
#include <unistd.h>

#define PLATFORM "seastar"
diff --git a/apps/memcached/memcached.hh b/app/memcached/memcached.hh
similarity index 100%
rename from apps/memcached/memcached.hh
rename to app/memcached/memcached.hh
diff --git a/apps/seawreck/seawreck.cc b/app/seawreck/seawreck.cc
similarity index 100%
rename from apps/seawreck/seawreck.cc
rename to app/seawreck/seawreck.cc
diff --git a/configure.py b/configure.py
index a0727780..90651258 100755
--- a/configure.py
+++ b/configure.py
@@ -243,80 +243,80 @@ modes = {
}

perf_tests = [
- 'tests/perf/perf_future_util',
+ 'test/perf/perf_future_util',
]

tests = [
- 'tests/file_io_test',
- 'tests/directory_test',
- 'tests/linecount',
- 'tests/echotest',
- 'tests/l3_test',
- 'tests/ip_test',
- 'tests/timer_test',
- 'tests/tcp_test',
- 'tests/futures_test',
- 'tests/alloc_test',
- 'tests/foreign_ptr_test',
- 'tests/smp_test',
- 'tests/thread_test',
- 'tests/thread_context_switch_test',
- 'tests/udp_server',
- 'tests/udp_client',
- 'tests/blkdiscard_test',
- 'tests/sstring_test',
- 'tests/unwind_test',
- 'tests/defer_test',
- 'tests/httpd_test',
- 'tests/memcached/memcached_ascii_parser_test',
- 'tests/tcp_sctp_server',
- 'tests/tcp_sctp_client',
- 'tests/allocator_test',
- 'tests/output_stream_test',
- 'tests/udp_zero_copy',
- 'tests/shared_ptr_test',
- 'tests/weak_ptr_test',
- 'tests/checked_ptr_test',
- 'tests/slab_test',
- 'tests/fstream_test',
- 'tests/distributed_test',
- 'tests/rpc',
- 'tests/semaphore_test',
- 'tests/expiring_fifo_test',
- 'tests/packet_test',
- 'tests/tls_test',
- 'tests/fair_queue_test',
- 'tests/rpc_test',
- 'tests/connect_test',
- 'tests/chunked_fifo_test',
- 'tests/circular_buffer_test',
- 'tests/perf/perf_fstream',
- 'tests/json_formatter_test',
- 'tests/dns_test',
- 'tests/execution_stage_test',
- 'tests/lowres_clock_test',
- 'tests/program_options_test',
- 'tests/tuple_utils_test',
- 'tests/tls_echo_server',
- 'tests/tls_simple_client',
- 'tests/circular_buffer_fixed_capacity_test',
- 'tests/noncopyable_function_test',
- 'tests/netconfig_test',
- 'tests/abort_source_test',
- 'tests/alien_test',
+ 'test/file_io_test',
+ 'test/directory_test',
+ 'test/linecount',
+ 'test/echotest',
+ 'test/l3_test',
+ 'test/ip_test',
+ 'test/timer_test',
+ 'test/tcp_test',
+ 'test/futures_test',
+ 'test/alloc_test',
+ 'test/foreign_ptr_test',
+ 'test/smp_test',
+ 'test/thread_test',
+ 'test/thread_context_switch_test',
+ 'test/udp_server',
+ 'test/udp_client',
+ 'test/blkdiscard_test',
+ 'test/sstring_test',
+ 'test/unwind_test',
+ 'test/defer_test',
+ 'test/httpd_test',
+ 'test/memcached/memcached_ascii_parser_test',
+ 'test/tcp_sctp_server',
+ 'test/tcp_sctp_client',
+ 'test/allocator_test',
+ 'test/output_stream_test',
+ 'test/udp_zero_copy',
+ 'test/shared_ptr_test',
+ 'test/weak_ptr_test',
+ 'test/checked_ptr_test',
+ 'test/slab_test',
+ 'test/fstream_test',
+ 'test/distributed_test',
+ 'test/rpc',
+ 'test/semaphore_test',
+ 'test/expiring_fifo_test',
+ 'test/packet_test',
+ 'test/tls_test',
+ 'test/fair_queue_test',
+ 'test/rpc_test',
+ 'test/connect_test',
+ 'test/chunked_fifo_test',
+ 'test/circular_buffer_test',
+ 'test/perf/perf_fstream',
+ 'test/json_formatter_test',
+ 'test/dns_test',
+ 'test/execution_stage_test',
+ 'test/lowres_clock_test',
+ 'test/program_options_test',
+ 'test/tuple_utils_test',
+ 'test/tls_echo_server',
+ 'test/tls_simple_client',
+ 'test/circular_buffer_fixed_capacity_test',
+ 'test/noncopyable_function_test',
+ 'test/netconfig_test',
+ 'test/abort_source_test',
+ 'test/alien_test',
] + perf_tests

apps = [
- 'apps/httpd/httpd',
- 'apps/seawreck/seawreck',
- 'apps/io_tester/io_tester',
- 'apps/memcached/memcached',
- 'apps/iotune/iotune',
- 'tests/scheduling_group_demo',
+ 'app/httpd/httpd',
+ 'app/seawreck/seawreck',
+ 'app/io_tester/io_tester',
+ 'app/memcached/memcached',
+ 'app/iotune/iotune',
+ 'test/scheduling_group_demo',
]

extralibs = {
- 'apps/io_tester/io_tester': [ '-lyaml-cpp' ]
+ 'app/io_tester/io_tester': [ '-lyaml-cpp' ]
}

all_artifacts = apps + tests + ['libseastar.a', 'seastar.pc', 'fmt/fmt/libfmt.a']
@@ -451,8 +451,8 @@ http = ['src/http/transformers.cc',
]

boost_test_lib = [
- 'tests/test-utils.cc',
- 'tests/test_runner.cc',
+ 'test/test-utils.cc',
+ 'test/test_runner.cc',
]


@@ -497,106 +497,106 @@ if args.staticcxx or args.static:
defines.append("NO_EXCEPTION_INTERCEPT");

memcache_base = [
- 'apps/memcached/ascii.rl'
+ 'app/memcached/ascii.rl'
] + libnet + core

deps = {
'libseastar.a' : core + libnet + http + protobuf + prometheus,
'seastar.pc': [],
'fmt/fmt/libfmt.a': [],
- 'apps/httpd/httpd': ['apps/httpd/demo.json', 'apps/httpd/main.cc'] + http + libnet + core,
- 'apps/memcached/memcached': ['apps/memcached/memcache.cc'] + memcache_base,
- 'tests/memcached/memcached_ascii_parser_test': ['tests/memcached/test_ascii_parser.cc'] + memcache_base,
- 'tests/file_io_test': ['tests/fileiotest.cc'] + core,
- 'tests/directory_test': ['tests/directory_test.cc'] + core,
- 'tests/linecount': ['tests/linecount.cc'] + core,
- 'tests/echotest': ['tests/echotest.cc'] + core + libnet,
- 'tests/l3_test': ['tests/l3_test.cc'] + core + libnet,
- 'tests/ip_test': ['tests/ip_test.cc'] + core + libnet,
- 'tests/tcp_test': ['tests/tcp_test.cc'] + core + libnet,
- 'tests/timer_test': ['tests/timertest.cc'] + core,
- 'tests/futures_test': ['tests/futures_test.cc'] + core,
- 'tests/alloc_test': ['tests/alloc_test.cc'] + core,
- 'tests/foreign_ptr_test': ['tests/foreign_ptr_test.cc'] + core,
- 'tests/semaphore_test': ['tests/semaphore_test.cc'] + core,
- 'tests/expiring_fifo_test': ['tests/expiring_fifo_test.cc'] + core,
- 'tests/smp_test': ['tests/smp_test.cc'] + core,
- 'tests/thread_test': ['tests/thread_test.cc'] + core,
- 'tests/thread_context_switch_test': ['tests/thread_context_switch.cc'] + core,
- 'tests/udp_server': ['tests/udp_server.cc'] + core + libnet,
- 'tests/udp_client': ['tests/udp_client.cc'] + core + libnet,
- 'tests/tcp_sctp_server': ['tests/tcp_sctp_server.cc'] + core + libnet,
- 'tests/tcp_sctp_client': ['tests/tcp_sctp_client.cc'] + core + libnet,
- 'tests/tls_test': ['tests/tls_test.cc'] + core + libnet,
- 'tests/fair_queue_test': ['tests/fair_queue_test.cc'] + core,
- 'apps/seawreck/seawreck': ['apps/seawreck/seawreck.cc', 'gen/http/http_response_parser.rl'] + core + libnet,
- 'apps/io_tester/io_tester': ['apps/io_tester/io_tester.cc'] + core,
- 'apps/iotune/iotune': ['apps/iotune/iotune.cc'] + core,
- 'tests/blkdiscard_test': ['tests/blkdiscard_test.cc'] + core,
- 'tests/sstring_test': ['tests/sstring_test.cc'] + core,
- 'tests/unwind_test': ['tests/unwind_test.cc'] + core,
- 'tests/defer_test': ['tests/defer_test.cc'] + core,
- 'tests/httpd_test': ['tests/httpd.cc'] + http + core,
- 'tests/allocator_test': ['tests/allocator_test.cc'] + core,
- 'tests/output_stream_test': ['tests/output_stream_test.cc'] + core + libnet,
- 'tests/udp_zero_copy': ['tests/udp_zero_copy.cc'] + core + libnet,
- 'tests/shared_ptr_test': ['tests/shared_ptr_test.cc'] + core,
- 'tests/weak_ptr_test': ['tests/weak_ptr_test.cc'] + core,
- 'tests/checked_ptr_test': ['tests/checked_ptr_test.cc'] + core,
- 'tests/slab_test': ['tests/slab_test.cc'] + core,
- 'tests/fstream_test': ['tests/fstream_test.cc'] + core,
- 'tests/distributed_test': ['tests/distributed_test.cc'] + core,
- 'tests/rpc': ['tests/rpc.cc'] + core + libnet,
- 'tests/rpc_test': ['tests/rpc_test.cc'] + core + libnet,
- 'tests/packet_test': ['tests/packet_test.cc'] + core + libnet,
- 'tests/connect_test': ['tests/connect_test.cc'] + core + libnet,
- 'tests/chunked_fifo_test': ['tests/chunked_fifo_test.cc'] + core,
- 'tests/circular_buffer_test': ['tests/circular_buffer_test.cc'] + core,
- 'tests/perf/perf_fstream': ['tests/perf/perf_fstream.cc'] + core,
- 'tests/json_formatter_test': ['tests/json_formatter_test.cc'] + core + http,
- 'tests/dns_test': ['tests/dns_test.cc'] + core + libnet,
- 'tests/execution_stage_test': ['tests/execution_stage_test.cc'] + core,
- 'tests/lowres_clock_test': ['tests/lowres_clock_test.cc'] + core,
- 'tests/program_options_test': ['tests/program_options_test.cc'] + core,
- 'tests/tuple_utils_test': ['tests/tuple_utils_test.cc'],
- 'tests/tls_echo_server': ['tests/tls_echo_server.cc'] + core + libnet,
- 'tests/tls_simple_client': ['tests/tls_simple_client.cc'] + core + libnet,
- 'tests/circular_buffer_fixed_capacity_test': ['tests/circular_buffer_fixed_capacity_test.cc'],
- 'tests/scheduling_group_demo': ['tests/scheduling_group_demo.cc'] + core,
- 'tests/noncopyable_function_test': ['tests/noncopyable_function_test.cc'],
- 'tests/netconfig_test': ['tests/netconfig_test.cc'] + core + libnet,
- 'tests/abort_source_test': ['tests/abort_source_test.cc'] + core,
- 'tests/alien_test': ['tests/alien_test.cc'] + core,
+ 'app/httpd/httpd': ['app/httpd/demo.json', 'app/httpd/main.cc'] + http + libnet + core,
+ 'app/memcached/memcached': ['app/memcached/memcache.cc'] + memcache_base,
+ 'test/memcached/memcached_ascii_parser_test': ['test/memcached/test_ascii_parser.cc'] + memcache_base,
+ 'test/file_io_test': ['test/fileiotest.cc'] + core,
+ 'test/directory_test': ['test/directory_test.cc'] + core,
+ 'test/linecount': ['test/linecount.cc'] + core,
+ 'test/echotest': ['test/echotest.cc'] + core + libnet,
+ 'test/l3_test': ['test/l3_test.cc'] + core + libnet,
+ 'test/ip_test': ['test/ip_test.cc'] + core + libnet,
+ 'test/tcp_test': ['test/tcp_test.cc'] + core + libnet,
+ 'test/timer_test': ['test/timertest.cc'] + core,
+ 'test/futures_test': ['test/futures_test.cc'] + core,
+ 'test/alloc_test': ['test/alloc_test.cc'] + core,
+ 'test/foreign_ptr_test': ['test/foreign_ptr_test.cc'] + core,
+ 'test/semaphore_test': ['test/semaphore_test.cc'] + core,
+ 'test/expiring_fifo_test': ['test/expiring_fifo_test.cc'] + core,
+ 'test/smp_test': ['test/smp_test.cc'] + core,
+ 'test/thread_test': ['test/thread_test.cc'] + core,
+ 'test/thread_context_switch_test': ['test/thread_context_switch.cc'] + core,
+ 'test/udp_server': ['test/udp_server.cc'] + core + libnet,
+ 'test/udp_client': ['test/udp_client.cc'] + core + libnet,
+ 'test/tcp_sctp_server': ['test/tcp_sctp_server.cc'] + core + libnet,
+ 'test/tcp_sctp_client': ['test/tcp_sctp_client.cc'] + core + libnet,
+ 'test/tls_test': ['test/tls_test.cc'] + core + libnet,
+ 'test/fair_queue_test': ['test/fair_queue_test.cc'] + core,
+ 'app/seawreck/seawreck': ['app/seawreck/seawreck.cc', 'gen/http/http_response_parser.rl'] + core + libnet,
+ 'app/io_tester/io_tester': ['app/io_tester/io_tester.cc'] + core,
+ 'app/iotune/iotune': ['app/iotune/iotune.cc'] + core,
+ 'test/blkdiscard_test': ['test/blkdiscard_test.cc'] + core,
+ 'test/sstring_test': ['test/sstring_test.cc'] + core,
+ 'test/unwind_test': ['test/unwind_test.cc'] + core,
+ 'test/defer_test': ['test/defer_test.cc'] + core,
+ 'test/httpd_test': ['test/httpd.cc'] + http + core,
+ 'test/allocator_test': ['test/allocator_test.cc'] + core,
+ 'test/output_stream_test': ['test/output_stream_test.cc'] + core + libnet,
+ 'test/udp_zero_copy': ['test/udp_zero_copy.cc'] + core + libnet,
+ 'test/shared_ptr_test': ['test/shared_ptr_test.cc'] + core,
+ 'test/weak_ptr_test': ['test/weak_ptr_test.cc'] + core,
+ 'test/checked_ptr_test': ['test/checked_ptr_test.cc'] + core,
+ 'test/slab_test': ['test/slab_test.cc'] + core,
+ 'test/fstream_test': ['test/fstream_test.cc'] + core,
+ 'test/distributed_test': ['test/distributed_test.cc'] + core,
+ 'test/rpc': ['test/rpc.cc'] + core + libnet,
+ 'test/rpc_test': ['test/rpc_test.cc'] + core + libnet,
+ 'test/packet_test': ['test/packet_test.cc'] + core + libnet,
+ 'test/connect_test': ['test/connect_test.cc'] + core + libnet,
+ 'test/chunked_fifo_test': ['test/chunked_fifo_test.cc'] + core,
+ 'test/circular_buffer_test': ['test/circular_buffer_test.cc'] + core,
+ 'test/perf/perf_fstream': ['test/perf/perf_fstream.cc'] + core,
+ 'test/json_formatter_test': ['test/json_formatter_test.cc'] + core + http,
+ 'test/dns_test': ['test/dns_test.cc'] + core + libnet,
+ 'test/execution_stage_test': ['test/execution_stage_test.cc'] + core,
+ 'test/lowres_clock_test': ['test/lowres_clock_test.cc'] + core,
+ 'test/program_options_test': ['test/program_options_test.cc'] + core,
+ 'test/tuple_utils_test': ['test/tuple_utils_test.cc'],
+ 'test/tls_echo_server': ['test/tls_echo_server.cc'] + core + libnet,
+ 'test/tls_simple_client': ['test/tls_simple_client.cc'] + core + libnet,
+ 'test/circular_buffer_fixed_capacity_test': ['test/circular_buffer_fixed_capacity_test.cc'],
+ 'test/scheduling_group_demo': ['test/scheduling_group_demo.cc'] + core,
+ 'test/noncopyable_function_test': ['test/noncopyable_function_test.cc'],
+ 'test/netconfig_test': ['test/netconfig_test.cc'] + core + libnet,
+ 'test/abort_source_test': ['test/abort_source_test.cc'] + core,
+ 'test/alien_test': ['test/alien_test.cc'] + core,
}

boost_tests = [
- 'tests/memcached/memcached_ascii_parser_test',
- 'tests/file_io_test',
- 'tests/futures_test',
- 'tests/alloc_test',
- 'tests/foreign_ptr_test',
- 'tests/semaphore_test',
- 'tests/expiring_fifo_test',
- 'tests/thread_test',
- 'tests/tls_test',
- 'tests/fair_queue_test',
- 'tests/httpd_test',
- 'tests/output_stream_test',
- 'tests/fstream_test',
- 'tests/rpc_test',
- 'tests/connect_test',
- 'tests/json_formatter_test',
- 'tests/dns_test',
- 'tests/execution_stage_test',
- 'tests/lowres_clock_test',
- 'tests/abort_source_test',
+ 'test/memcached/memcached_ascii_parser_test',
+ 'test/file_io_test',
+ 'test/futures_test',
+ 'test/alloc_test',
+ 'test/foreign_ptr_test',
+ 'test/semaphore_test',
+ 'test/expiring_fifo_test',
+ 'test/thread_test',
+ 'test/tls_test',
+ 'test/fair_queue_test',
+ 'test/httpd_test',
+ 'test/output_stream_test',
+ 'test/fstream_test',
+ 'test/rpc_test',
+ 'test/connect_test',
+ 'test/json_formatter_test',
+ 'test/dns_test',
+ 'test/execution_stage_test',
+ 'test/lowres_clock_test',
+ 'test/abort_source_test',
]

for bt in boost_tests:
deps[bt] += boost_test_lib

for pt in perf_tests:
- deps[pt] = [pt + '.cc'] + core + ['tests/perf/perf_tests.cc']
+ deps[pt] = [pt + '.cc'] + core + ['test/perf/perf_tests.cc']

warnings = [
'-Wno-mismatched-tags', # clang-only
@@ -895,7 +895,7 @@ with open(buildfile, 'w') as f:
elif modeval['sanitize']:
modeval['sanitize'] += ' -DSEASTAR_ASAN_ENABLED'
f.write(textwrap.dedent('''\
- cxxflags_{mode} = {sanitize} {opt} -I. -Itests -Iinclude -Isrc -I$full_builddir/{mode}/gen/seastar -I$full_builddir/{mode}/gen -I$full_builddir/{mode}/c-ares
+ cxxflags_{mode} = {sanitize} {opt} -I. -Itest -Iinclude -Isrc -I$full_builddir/{mode}/gen/seastar -I$full_builddir/{mode}/gen -I$full_builddir/{mode}/c-ares
libs_{mode} = {sanitize_libs} {libs}
rule cxx.{mode}
command = $cxx -MD -MT $out -MF $out.d $cxxflags_{mode} $cxxflags -c -o $out $in
@@ -958,7 +958,7 @@ with open(buildfile, 'w') as f:
else:
libdeps = str.join(' ', ('$builddir/{}/{}'.format(mode, i) for i in built_libs))
test_extralibs = [maybe_static(args.staticyamlcpp, '-lyaml-cpp')]
- if binary.startswith('tests/'):
+ if binary.startswith('test/'):
if binary in boost_tests:
test_extralibs += [maybe_static(args.staticboost, '-lboost_unit_test_framework')]
# Our code's debugging information is huge, and multiplied
diff --git a/licenses/dpdk.txt b/license/dpdk.txt
similarity index 100%
rename from licenses/dpdk.txt
rename to license/dpdk.txt
diff --git a/licenses/freebsd.txt b/license/freebsd.txt
similarity index 100%
rename from licenses/freebsd.txt
rename to license/freebsd.txt
diff --git a/scripts/dpdk_nic_bind.py b/script/dpdk_nic_bind.py
similarity index 100%
rename from scripts/dpdk_nic_bind.py
rename to script/dpdk_nic_bind.py
diff --git a/scripts/perftune.py b/script/perftune.py
similarity index 100%
rename from scripts/perftune.py
rename to script/perftune.py
diff --git a/scripts/perftune.yaml b/script/perftune.yaml
similarity index 100%
rename from scripts/perftune.yaml
rename to script/perftune.yaml
diff --git a/scripts/posix_net_conf.sh b/script/posix_net_conf.sh
similarity index 100%
rename from scripts/posix_net_conf.sh
rename to script/posix_net_conf.sh
diff --git a/scripts/run_with_dpdk.sh b/script/run_with_dpdk.sh
similarity index 100%
rename from scripts/run_with_dpdk.sh
rename to script/run_with_dpdk.sh
diff --git a/scripts/seastar-addr2line b/script/seastar-addr2line
similarity index 100%
rename from scripts/seastar-addr2line
rename to script/seastar-addr2line
diff --git a/scripts/seastar-cpu-map.sh b/script/seastar-cpu-map.sh
similarity index 100%
rename from scripts/seastar-cpu-map.sh
rename to script/seastar-cpu-map.sh
diff --git a/scripts/tap.sh b/script/tap.sh
similarity index 100%
rename from scripts/tap.sh
rename to script/tap.sh
diff --git a/test.py b/test.py
index 16eb6bcd..5d88762b 100755
--- a/test.py
+++ b/test.py
@@ -100,13 +100,13 @@ if __name__ == "__main__":
test_to_run = []
modes_to_run = all_modes if not args.mode else [args.mode]
for mode in modes_to_run:
- prefix = os.path.join('build', mode, 'tests')
+ prefix = os.path.join('build', mode, 'test')
for test in other_tests:
test_to_run.append((os.path.join(prefix, test),'other'))
for test in boost_tests:
test_to_run.append((os.path.join(prefix, test),'boost'))
- memcached_path = make_build_path(mode, 'apps', 'memcached', 'memcached')
- test_to_run.append(('tests/memcached/test.py --memcached ' + memcached_path + (' --fast' if args.fast else ''),'other'))
+ memcached_path = make_build_path(mode, 'app', 'memcached', 'memcached')
+ test_to_run.append(('test/memcached/test.py --memcached ' + memcached_path + (' --fast' if args.fast else ''),'other'))
test_to_run.append((os.path.join(prefix, 'distributed_test'),'other'))


@@ -149,7 +149,7 @@ if __name__ == "__main__":
if test[1] == 'boost':
path = path + " -- --smp={}".format(cpu_count)
else:
- if not re.search("tests/memcached/test.py", path):
+ if not re.search("test/memcached/test.py", path):
if re.search("allocator_test", path) or re.search("fair_queue_test", path):
path = path + " -- --smp={}".format(cpu_count)
else:
diff --git a/tests/abort_source_test.cc b/test/abort_source_test.cc
similarity index 100%
rename from tests/abort_source_test.cc
rename to test/abort_source_test.cc
diff --git a/tests/alien_test.cc b/test/alien_test.cc
similarity index 100%
rename from tests/alien_test.cc
rename to test/alien_test.cc
diff --git a/tests/alloc_test.cc b/test/alloc_test.cc
similarity index 100%
rename from tests/alloc_test.cc
rename to test/alloc_test.cc
diff --git a/tests/allocator_test.cc b/test/allocator_test.cc
similarity index 100%
rename from tests/allocator_test.cc
rename to test/allocator_test.cc
diff --git a/tests/blkdiscard_test.cc b/test/blkdiscard_test.cc
similarity index 100%
rename from tests/blkdiscard_test.cc
rename to test/blkdiscard_test.cc
diff --git a/tests/catest.key b/test/catest.key
similarity index 100%
rename from tests/catest.key
rename to test/catest.key
diff --git a/tests/catest.pem b/test/catest.pem
similarity index 100%
rename from tests/catest.pem
rename to test/catest.pem
diff --git a/tests/checked_ptr_test.cc b/test/checked_ptr_test.cc
similarity index 100%
rename from tests/checked_ptr_test.cc
rename to test/checked_ptr_test.cc
diff --git a/tests/chunked_fifo_test.cc b/test/chunked_fifo_test.cc
similarity index 100%
rename from tests/chunked_fifo_test.cc
rename to test/chunked_fifo_test.cc
diff --git a/tests/circular_buffer_fixed_capacity_test.cc b/test/circular_buffer_fixed_capacity_test.cc
similarity index 100%
rename from tests/circular_buffer_fixed_capacity_test.cc
rename to test/circular_buffer_fixed_capacity_test.cc
diff --git a/tests/circular_buffer_test.cc b/test/circular_buffer_test.cc
similarity index 100%
rename from tests/circular_buffer_test.cc
rename to test/circular_buffer_test.cc
diff --git a/tests/connect_test.cc b/test/connect_test.cc
similarity index 100%
rename from tests/connect_test.cc
rename to test/connect_test.cc
diff --git a/tests/defer_test.cc b/test/defer_test.cc
similarity index 100%
rename from tests/defer_test.cc
rename to test/defer_test.cc
diff --git a/tests/directory_test.cc b/test/directory_test.cc
similarity index 100%
rename from tests/directory_test.cc
rename to test/directory_test.cc
diff --git a/tests/distributed_test.cc b/test/distributed_test.cc
similarity index 100%
rename from tests/distributed_test.cc
rename to test/distributed_test.cc
diff --git a/tests/dns_test.cc b/test/dns_test.cc
similarity index 100%
rename from tests/dns_test.cc
rename to test/dns_test.cc
diff --git a/tests/echotest.cc b/test/echotest.cc
similarity index 100%
rename from tests/echotest.cc
rename to test/echotest.cc
diff --git a/tests/exchanger.hh b/test/exchanger.hh
similarity index 100%
rename from tests/exchanger.hh
rename to test/exchanger.hh
diff --git a/tests/execution_stage_test.cc b/test/execution_stage_test.cc
similarity index 100%
rename from tests/execution_stage_test.cc
rename to test/execution_stage_test.cc
diff --git a/tests/expiring_fifo_test.cc b/test/expiring_fifo_test.cc
similarity index 100%
rename from tests/expiring_fifo_test.cc
rename to test/expiring_fifo_test.cc
diff --git a/tests/fair_queue_test.cc b/test/fair_queue_test.cc
similarity index 100%
rename from tests/fair_queue_test.cc
rename to test/fair_queue_test.cc
diff --git a/tests/fileiotest.cc b/test/fileiotest.cc
similarity index 100%
rename from tests/fileiotest.cc
rename to test/fileiotest.cc
diff --git a/tests/foreign_ptr_test.cc b/test/foreign_ptr_test.cc
similarity index 100%
rename from tests/foreign_ptr_test.cc
rename to test/foreign_ptr_test.cc
diff --git a/tests/fstream_test.cc b/test/fstream_test.cc
similarity index 100%
rename from tests/fstream_test.cc
rename to test/fstream_test.cc
diff --git a/tests/futures_test.cc b/test/futures_test.cc
similarity index 100%
rename from tests/futures_test.cc
rename to test/futures_test.cc
diff --git a/tests/httpd.cc b/test/httpd.cc
similarity index 100%
rename from tests/httpd.cc
rename to test/httpd.cc
diff --git a/tests/ip_test.cc b/test/ip_test.cc
similarity index 100%
rename from tests/ip_test.cc
rename to test/ip_test.cc
diff --git a/tests/json_formatter_test.cc b/test/json_formatter_test.cc
similarity index 100%
rename from tests/json_formatter_test.cc
rename to test/json_formatter_test.cc
diff --git a/tests/l3_test.cc b/test/l3_test.cc
similarity index 100%
rename from tests/l3_test.cc
rename to test/l3_test.cc
diff --git a/tests/linecount.cc b/test/linecount.cc
similarity index 100%
rename from tests/linecount.cc
rename to test/linecount.cc
diff --git a/tests/loopback_socket.hh b/test/loopback_socket.hh
similarity index 100%
rename from tests/loopback_socket.hh
rename to test/loopback_socket.hh
diff --git a/tests/lowres_clock_test.cc b/test/lowres_clock_test.cc
similarity index 100%
rename from tests/lowres_clock_test.cc
rename to test/lowres_clock_test.cc
diff --git a/tests/memcached/test.py b/test/memcached/test.py
similarity index 100%
rename from tests/memcached/test.py
rename to test/memcached/test.py
diff --git a/tests/memcached/test_ascii_parser.cc b/test/memcached/test_ascii_parser.cc
similarity index 99%
rename from tests/memcached/test_ascii_parser.cc
rename to test/memcached/test_ascii_parser.cc
index a839df90..a713863b 100644
--- a/tests/memcached/test_ascii_parser.cc
+++ b/test/memcached/test_ascii_parser.cc
@@ -25,7 +25,7 @@
#include <seastar/core/shared_ptr.hh>
#include <seastar/net/packet-data-source.hh>
// Non-conventional path due to limitations of `configure.py`.
-#include <seastar/apps/memcached/ascii.hh>
+#include <seastar/app/memcached/ascii.hh>
#include <seastar/core/future-util.hh>

using namespace seastar;
diff --git a/tests/memcached/test_memcached.py b/test/memcached/test_memcached.py
similarity index 100%
rename from tests/memcached/test_memcached.py
rename to test/memcached/test_memcached.py
diff --git a/tests/mkcert.gmk b/test/mkcert.gmk
similarity index 100%
rename from tests/mkcert.gmk
rename to test/mkcert.gmk
diff --git a/tests/mock_file.hh b/test/mock_file.hh
similarity index 100%
rename from tests/mock_file.hh
rename to test/mock_file.hh
diff --git a/tests/netconfig_test.cc b/test/netconfig_test.cc
similarity index 100%
rename from tests/netconfig_test.cc
rename to test/netconfig_test.cc
diff --git a/tests/noncopyable_function_test.cc b/test/noncopyable_function_test.cc
similarity index 100%
rename from tests/noncopyable_function_test.cc
rename to test/noncopyable_function_test.cc
diff --git a/tests/output_stream_test.cc b/test/output_stream_test.cc
similarity index 100%
rename from tests/output_stream_test.cc
rename to test/output_stream_test.cc
diff --git a/tests/packet_test.cc b/test/packet_test.cc
similarity index 100%
rename from tests/packet_test.cc
rename to test/packet_test.cc
diff --git a/tests/perf/perf-tests.md b/test/perf/perf-tests.md
similarity index 100%
rename from tests/perf/perf-tests.md
rename to test/perf/perf-tests.md
diff --git a/tests/perf/perf_fstream.cc b/test/perf/perf_fstream.cc
similarity index 100%
rename from tests/perf/perf_fstream.cc
rename to test/perf/perf_fstream.cc
diff --git a/tests/perf/perf_future_util.cc b/test/perf/perf_future_util.cc
similarity index 100%
rename from tests/perf/perf_future_util.cc
rename to test/perf/perf_future_util.cc
diff --git a/tests/perf/perf_tests.cc b/test/perf/perf_tests.cc
similarity index 100%
rename from tests/perf/perf_tests.cc
rename to test/perf/perf_tests.cc
diff --git a/tests/perf/perf_tests.hh b/test/perf/perf_tests.hh
similarity index 100%
rename from tests/perf/perf_tests.hh
rename to test/perf/perf_tests.hh
diff --git a/tests/program_options_test.cc b/test/program_options_test.cc
similarity index 100%
rename from tests/program_options_test.cc
rename to test/program_options_test.cc
diff --git a/tests/queue_test.cc b/test/queue_test.cc
similarity index 100%
rename from tests/queue_test.cc
rename to test/queue_test.cc
diff --git a/tests/rpc.cc b/test/rpc.cc
similarity index 100%
rename from tests/rpc.cc
rename to test/rpc.cc
diff --git a/tests/rpc_test.cc b/test/rpc_test.cc
similarity index 100%
rename from tests/rpc_test.cc
rename to test/rpc_test.cc
diff --git a/tests/scheduling_group_demo.cc b/test/scheduling_group_demo.cc
similarity index 100%
rename from tests/scheduling_group_demo.cc
rename to test/scheduling_group_demo.cc
diff --git a/tests/semaphore_test.cc b/test/semaphore_test.cc
similarity index 100%
rename from tests/semaphore_test.cc
rename to test/semaphore_test.cc
diff --git a/tests/shared_ptr_test.cc b/test/shared_ptr_test.cc
similarity index 100%
rename from tests/shared_ptr_test.cc
rename to test/shared_ptr_test.cc
diff --git a/tests/slab_test.cc b/test/slab_test.cc
similarity index 100%
rename from tests/slab_test.cc
rename to test/slab_test.cc
diff --git a/tests/smp_test.cc b/test/smp_test.cc
similarity index 100%
rename from tests/smp_test.cc
rename to test/smp_test.cc
diff --git a/tests/sstring_test.cc b/test/sstring_test.cc
similarity index 100%
rename from tests/sstring_test.cc
rename to test/sstring_test.cc
diff --git a/tests/tcp_sctp_client.cc b/test/tcp_sctp_client.cc
similarity index 100%
rename from tests/tcp_sctp_client.cc
rename to test/tcp_sctp_client.cc
diff --git a/tests/tcp_sctp_server.cc b/test/tcp_sctp_server.cc
similarity index 100%
rename from tests/tcp_sctp_server.cc
rename to test/tcp_sctp_server.cc
diff --git a/tests/tcp_test.cc b/test/tcp_test.cc
similarity index 100%
rename from tests/tcp_test.cc
rename to test/tcp_test.cc
diff --git a/tests/test-utils.cc b/test/test-utils.cc
similarity index 100%
rename from tests/test-utils.cc
rename to test/test-utils.cc
diff --git a/tests/test-utils.hh b/test/test-utils.hh
similarity index 100%
rename from tests/test-utils.hh
rename to test/test-utils.hh
diff --git a/tests/test.crl b/test/test.crl
similarity index 100%
rename from tests/test.crl
rename to test/test.crl
diff --git a/tests/test.crt b/test/test.crt
similarity index 100%
rename from tests/test.crt
rename to test/test.crt
diff --git a/tests/test.csr b/test/test.csr
similarity index 100%
rename from tests/test.csr
rename to test/test.csr
diff --git a/tests/test.key b/test/test.key
similarity index 100%
rename from tests/test.key
rename to test/test.key
diff --git a/tests/test_runner.cc b/test/test_runner.cc
similarity index 100%
rename from tests/test_runner.cc
rename to test/test_runner.cc
diff --git a/tests/test_runner.hh b/test/test_runner.hh
similarity index 100%
rename from tests/test_runner.hh
rename to test/test_runner.hh
diff --git a/tests/thread_context_switch.cc b/test/thread_context_switch.cc
similarity index 100%
rename from tests/thread_context_switch.cc
rename to test/thread_context_switch.cc
diff --git a/tests/thread_test.cc b/test/thread_test.cc
similarity index 100%
rename from tests/thread_test.cc
rename to test/thread_test.cc
diff --git a/tests/timertest.cc b/test/timertest.cc
similarity index 100%
rename from tests/timertest.cc
rename to test/timertest.cc
diff --git a/tests/tls-ca-bundle.pem b/test/tls-ca-bundle.pem
similarity index 100%
rename from tests/tls-ca-bundle.pem
rename to test/tls-ca-bundle.pem
diff --git a/tests/tls_echo_server.cc b/test/tls_echo_server.cc
similarity index 100%
rename from tests/tls_echo_server.cc
rename to test/tls_echo_server.cc
diff --git a/tests/tls_echo_server.hh b/test/tls_echo_server.hh
similarity index 100%
rename from tests/tls_echo_server.hh
rename to test/tls_echo_server.hh
diff --git a/tests/tls_simple_client.cc b/test/tls_simple_client.cc
similarity index 100%
rename from tests/tls_simple_client.cc
rename to test/tls_simple_client.cc
diff --git a/tests/tls_test.cc b/test/tls_test.cc
similarity index 92%
rename from tests/tls_test.cc
rename to test/tls_test.cc
index 668e47b5..2bc63af2 100644
--- a/tests/tls_test.cc
+++ b/test/tls_test.cc
@@ -84,7 +84,7 @@ static future<> connect_to_ssl_google(::shared_ptr<tls::certificate_credentials>

SEASTAR_TEST_CASE(test_simple_x509_client) {
auto certs = ::make_shared<tls::certificate_credentials>();
- return certs->set_x509_trust_file("tests/tls-ca-bundle.pem", tls::x509_crt_format::PEM).then([certs]() {
+ return certs->set_x509_trust_file("test/tls-ca-bundle.pem", tls::x509_crt_format::PEM).then([certs]() {
return connect_to_ssl_google(certs);
});
}
@@ -184,7 +184,7 @@ SEASTAR_TEST_CASE(test_non_tls) {

SEASTAR_TEST_CASE(test_abort_accept_before_handshake) {
auto certs = ::make_shared<tls::server_credentials>(::make_shared<tls::dh_params>());
- return certs->set_x509_key_file("tests/test.crt", "tests/test.key", tls::x509_crt_format::PEM).then([certs] {
+ return certs->set_x509_key_file("test/test.crt", "test/test.key", tls::x509_crt_format::PEM).then([certs] {
::listen_options opts;
opts.reuse_address = true;
auto addr = ::make_ipv4_address( {0x7f000001, 4712});
@@ -203,7 +203,7 @@ SEASTAR_TEST_CASE(test_abort_accept_before_handshake) {
SEASTAR_TEST_CASE(test_abort_accept_after_handshake) {
return async([] {
auto certs = ::make_shared<tls::server_credentials>(::make_shared<tls::dh_params>());
- certs->set_x509_key_file("tests/test.crt", "tests/test.key", tls::x509_crt_format::PEM).get();
+ certs->set_x509_key_file("test/test.crt", "test/test.key", tls::x509_crt_format::PEM).get();

::listen_options opts;
opts.reuse_address = true;
@@ -212,7 +212,7 @@ SEASTAR_TEST_CASE(test_abort_accept_after_handshake) {
auto sa = server.accept();

tls::credentials_builder b;
- b.set_x509_trust_file("tests/catest.pem", tls::x509_crt_format::PEM).get();
+ b.set_x509_trust_file("test/catest.pem", tls::x509_crt_format::PEM).get();

auto c = tls::connect(b.build_certificate_credentials(), addr).get0();
server.abort_accept(); // should not affect the socket we got.
@@ -241,7 +241,7 @@ SEASTAR_TEST_CASE(test_abort_accept_on_server_before_handshake) {
auto sa = server.accept();

tls::credentials_builder b;
- b.set_x509_trust_file("tests/catest.pem", tls::x509_crt_format::PEM).get();
+ b.set_x509_trust_file("test/catest.pem", tls::x509_crt_format::PEM).get();

auto creds = b.build_certificate_credentials();
auto f = tls::connect(creds, addr);
@@ -355,8 +355,8 @@ static future<> run_echo_test(sstring message,
int loops,
sstring trust,
sstring name,
- sstring crt = "tests/test.crt",
- sstring key = "tests/test.key",
+ sstring crt = "test/test.crt",
+ sstring key = "test/test.key",
tls::client_auth ca = tls::client_auth::NONE,
sstring client_crt = {},
sstring client_key = {},
@@ -425,7 +425,7 @@ static future<> run_echo_test(sstring message,
/*
* Certificates:
*
- * make -f tests/mkcert.gmk domain=scylladb.org server=test
+ * make -f test/mkcert.gmk domain=scylladb.org server=test
*
* -> test.crt
* test.csr
@@ -440,17 +440,17 @@ SEASTAR_TEST_CASE(test_simple_x509_client_server) {
// will not validate
// Must match expected name with cert CA or give empty name to ignore
// server name
- return run_echo_test(message, 20, "tests/catest.pem", "test.scylladb.org");
+ return run_echo_test(message, 20, "test/catest.pem", "test.scylladb.org");
}


SEASTAR_TEST_CASE(test_simple_x509_client_server_again) {
- return run_echo_test(message, 20, "tests/catest.pem", "test.scylladb.org");
+ return run_echo_test(message, 20, "test/catest.pem", "test.scylladb.org");
}

SEASTAR_TEST_CASE(test_x509_client_server_cert_validation_fail) {
// Load a real trust authority here, which out certs are _not_ signed with.
- return run_echo_test(message, 1, "tests/tls-ca-bundle.pem", {}).then([] {
+ return run_echo_test(message, 1, "test/tls-ca-bundle.pem", {}).then([] {
BOOST_FAIL("Should have gotten validation error");
}).handle_exception([](auto ep) {
try {
@@ -465,7 +465,7 @@ SEASTAR_TEST_CASE(test_x509_client_server_cert_validation_fail) {

SEASTAR_TEST_CASE(test_x509_client_server_cert_validation_fail_name) {
// Use trust store with our signer, but wrong host name
- return run_echo_test(message, 1, "tests/tls-ca-bundle.pem", "nils.holgersson.gov").then([] {
+ return run_echo_test(message, 1, "test/tls-ca-bundle.pem", "nils.holgersson.gov").then([] {
BOOST_FAIL("Should have gotten validation error");
}).handle_exception([](auto ep) {
try {
@@ -487,7 +487,7 @@ SEASTAR_TEST_CASE(test_large_message_x509_client_server) {
for (size_t i = 0; i < msg.size(); ++i) {
msg[i] = '0' + char(i % 30);
}
- return run_echo_test(std::move(msg), 20, "tests/catest.pem", "test.scylladb.org");
+ return run_echo_test(std::move(msg), 20, "test/catest.pem", "test.scylladb.org");
}

SEASTAR_TEST_CASE(test_simple_x509_client_server_fail_client_auth) {
@@ -496,7 +496,7 @@ SEASTAR_TEST_CASE(test_simple_x509_client_server_fail_client_auth) {
// Must match expected name with cert CA or give empty name to ignore
// server name
// Server will require certificate auth. We supply none, so should fail connection
- return run_echo_test(message, 20, "tests/catest.pem", "test.scylladb.org", "tests/test.crt", "tests/test.key", tls::client_auth::REQUIRE).then([] {
+ return run_echo_test(message, 20, "test/catest.pem", "test.scylladb.org", "test/test.crt", "test/test.key", tls::client_auth::REQUIRE).then([] {
BOOST_FAIL("Expected exception");
}).handle_exception([](auto ep) {
// ok.
@@ -509,7 +509,7 @@ SEASTAR_TEST_CASE(test_simple_x509_client_server_client_auth) {
// Must match expected name with cert CA or give empty name to ignore
// server name
// Server will require certificate auth. We supply one, so should succeed with connection
- return run_echo_test(message, 20, "tests/catest.pem", "test.scylladb.org", "tests/test.crt", "tests/test.key", tls::client_auth::REQUIRE, "tests/test.crt", "tests/test.key");
+ return run_echo_test(message, 20, "test/catest.pem", "test.scylladb.org", "test/test.crt", "test/test.key", tls::client_auth::REQUIRE, "test/test.crt", "test/test.key");
}

SEASTAR_TEST_CASE(test_many_large_message_x509_client_server) {
@@ -526,7 +526,7 @@ SEASTAR_TEST_CASE(test_many_large_message_x509_client_server) {
// machine.
auto range = boost::irange(0, 20);
return do_for_each(range, [msg = std::move(msg)](auto) {
- return run_echo_test(std::move(msg), 1, "tests/catest.pem", "test.scylladb.org", "tests/test.crt", "tests/test.key", tls::client_auth::NONE, {}, {}, false);
+ return run_echo_test(std::move(msg), 1, "test/catest.pem", "test.scylladb.org", "test/test.crt", "test/test.key", tls::client_auth::NONE, {}, {}, false);
});
}

diff --git a/tests/tuple_utils_test.cc b/test/tuple_utils_test.cc
similarity index 100%
rename from tests/tuple_utils_test.cc
rename to test/tuple_utils_test.cc
diff --git a/tests/udp_client.cc b/test/udp_client.cc
similarity index 100%
rename from tests/udp_client.cc
rename to test/udp_client.cc
diff --git a/tests/udp_server.cc b/test/udp_server.cc
similarity index 100%
rename from tests/udp_server.cc
rename to test/udp_server.cc
diff --git a/tests/udp_zero_copy.cc b/test/udp_zero_copy.cc
similarity index 100%
rename from tests/udp_zero_copy.cc
rename to test/udp_zero_copy.cc
diff --git a/tests/unwind_test.cc b/test/unwind_test.cc
similarity index 100%
rename from tests/unwind_test.cc
rename to test/unwind_test.cc
diff --git a/tests/weak_ptr_test.cc b/test/weak_ptr_test.cc
similarity index 100%
rename from tests/weak_ptr_test.cc
rename to test/weak_ptr_test.cc
--
2.17.1

Jesse Haber-Kucharsky

<jhaberku@scylladb.com>
unread,
Aug 3, 2018, 6:15:27 PM8/3/18
to seastar-dev@googlegroups.com, Jesse Haber-Kucharsky
All unit tests go in the `unit` subdirectory.

All performance tests go in the `perf` subdirectory.

Application-specific tests move to the application-specific subdirectory
in `app`.

Signed-off-by: Jesse Haber-Kucharsky <jhab...@scylladb.com>
---
.../memcached => app/memcached/test}/test.py | 0
.../memcached/test}/test_ascii_parser.cc | 0
.../memcached/test}/test_memcached.py | 0
configure.py | 208 +++++++++---------
test.py | 85 +++----
test/{ => unit}/abort_source_test.cc | 0
test/{ => unit}/alien_test.cc | 0
test/{ => unit}/alloc_test.cc | 0
test/{ => unit}/allocator_test.cc | 0
test/{ => unit}/catest.key | 0
test/{ => unit}/catest.pem | 0
test/{ => unit}/checked_ptr_test.cc | 0
test/{ => unit}/chunked_fifo_test.cc | 0
.../circular_buffer_fixed_capacity_test.cc | 0
test/{ => unit}/circular_buffer_test.cc | 0
test/{ => unit}/connect_test.cc | 0
test/{ => unit}/defer_test.cc | 0
test/{ => unit}/directory_test.cc | 0
test/{ => unit}/distributed_test.cc | 0
test/{ => unit}/dns_test.cc | 0
test/{ => unit}/execution_stage_test.cc | 0
test/{ => unit}/expiring_fifo_test.cc | 0
test/{ => unit}/fair_queue_test.cc | 0
test/{ => unit}/fileiotest.cc | 0
test/{ => unit}/foreign_ptr_test.cc | 0
test/{ => unit}/fstream_test.cc | 0
test/{ => unit}/futures_test.cc | 0
test/{ => unit}/httpd.cc | 0
test/{ => unit}/json_formatter_test.cc | 0
test/{ => unit}/loopback_socket.hh | 0
test/{ => unit}/lowres_clock_test.cc | 0
test/{ => unit}/mkcert.gmk | 0
test/{ => unit}/mock_file.hh | 0
test/{ => unit}/netconfig_test.cc | 0
test/{ => unit}/noncopyable_function_test.cc | 0
test/{ => unit}/output_stream_test.cc | 0
test/{ => unit}/packet_test.cc | 0
test/{ => unit}/program_options_test.cc | 0
test/{ => unit}/queue_test.cc | 0
test/{ => unit}/rpc_test.cc | 0
test/{ => unit}/semaphore_test.cc | 0
test/{ => unit}/shared_ptr_test.cc | 0
test/{ => unit}/slab_test.cc | 0
test/{ => unit}/smp_test.cc | 0
test/{ => unit}/sstring_test.cc | 0
test/{ => unit}/test.crl | 0
test/{ => unit}/test.crt | 0
test/{ => unit}/test.csr | 0
test/{ => unit}/test.key | 0
test/{ => unit}/thread_context_switch.cc | 0
test/{ => unit}/thread_test.cc | 0
test/{ => unit}/timertest.cc | 0
test/{ => unit}/tls-ca-bundle.pem | 0
test/{ => unit}/tls_test.cc | 32 +--
test/{ => unit}/tuple_utils_test.cc | 0
test/{ => unit}/unwind_test.cc | 0
test/{ => unit}/weak_ptr_test.cc | 0
57 files changed, 165 insertions(+), 160 deletions(-)
rename {test/memcached => app/memcached/test}/test.py (100%)
rename {test/memcached => app/memcached/test}/test_ascii_parser.cc (100%)
rename {test/memcached => app/memcached/test}/test_memcached.py (100%)
rename test/{ => unit}/abort_source_test.cc (100%)
rename test/{ => unit}/alien_test.cc (100%)
rename test/{ => unit}/alloc_test.cc (100%)
rename test/{ => unit}/allocator_test.cc (100%)
rename test/{ => unit}/catest.key (100%)
rename test/{ => unit}/catest.pem (100%)
rename test/{ => unit}/checked_ptr_test.cc (100%)
rename test/{ => unit}/chunked_fifo_test.cc (100%)
rename test/{ => unit}/circular_buffer_fixed_capacity_test.cc (100%)
rename test/{ => unit}/circular_buffer_test.cc (100%)
rename test/{ => unit}/connect_test.cc (100%)
rename test/{ => unit}/defer_test.cc (100%)
rename test/{ => unit}/directory_test.cc (100%)
rename test/{ => unit}/distributed_test.cc (100%)
rename test/{ => unit}/dns_test.cc (100%)
rename test/{ => unit}/execution_stage_test.cc (100%)
rename test/{ => unit}/expiring_fifo_test.cc (100%)
rename test/{ => unit}/fair_queue_test.cc (100%)
rename test/{ => unit}/fileiotest.cc (100%)
rename test/{ => unit}/foreign_ptr_test.cc (100%)
rename test/{ => unit}/fstream_test.cc (100%)
rename test/{ => unit}/futures_test.cc (100%)
rename test/{ => unit}/httpd.cc (100%)
rename test/{ => unit}/json_formatter_test.cc (100%)
rename test/{ => unit}/loopback_socket.hh (100%)
rename test/{ => unit}/lowres_clock_test.cc (100%)
rename test/{ => unit}/mkcert.gmk (100%)
rename test/{ => unit}/mock_file.hh (100%)
rename test/{ => unit}/netconfig_test.cc (100%)
rename test/{ => unit}/noncopyable_function_test.cc (100%)
rename test/{ => unit}/output_stream_test.cc (100%)
rename test/{ => unit}/packet_test.cc (100%)
rename test/{ => unit}/program_options_test.cc (100%)
rename test/{ => unit}/queue_test.cc (100%)
rename test/{ => unit}/rpc_test.cc (100%)
rename test/{ => unit}/semaphore_test.cc (100%)
rename test/{ => unit}/shared_ptr_test.cc (100%)
rename test/{ => unit}/slab_test.cc (100%)
rename test/{ => unit}/smp_test.cc (100%)
rename test/{ => unit}/sstring_test.cc (100%)
rename test/{ => unit}/test.crl (100%)
rename test/{ => unit}/test.crt (100%)
rename test/{ => unit}/test.csr (100%)
rename test/{ => unit}/test.key (100%)
rename test/{ => unit}/thread_context_switch.cc (100%)
rename test/{ => unit}/thread_test.cc (100%)
rename test/{ => unit}/timertest.cc (100%)
rename test/{ => unit}/tls-ca-bundle.pem (100%)
rename test/{ => unit}/tls_test.cc (91%)
rename test/{ => unit}/tuple_utils_test.cc (100%)
rename test/{ => unit}/unwind_test.cc (100%)
rename test/{ => unit}/weak_ptr_test.cc (100%)

diff --git a/test/memcached/test.py b/app/memcached/test/test.py
similarity index 100%
rename from test/memcached/test.py
rename to app/memcached/test/test.py
diff --git a/test/memcached/test_ascii_parser.cc b/app/memcached/test/test_ascii_parser.cc
similarity index 100%
rename from test/memcached/test_ascii_parser.cc
rename to app/memcached/test/test_ascii_parser.cc
diff --git a/test/memcached/test_memcached.py b/app/memcached/test/test_memcached.py
similarity index 100%
rename from test/memcached/test_memcached.py
rename to app/memcached/test/test_memcached.py
diff --git a/configure.py b/configure.py
index cd28c675..3cb27f89 100755
--- a/configure.py
+++ b/configure.py
@@ -247,63 +247,63 @@ perf_tests = [
]

tests = [
- 'test/file_io_test',
- 'test/directory_test',
+ 'test/unit/file_io_test',
+ 'test/unit/directory_test',
'demo/linecount',
'demo/echotest',
'demo/l3_test',
'demo/ip_test',
- 'test/timer_test',
+ 'test/unit/timer_test',
'demo/tcp_test',
- 'test/futures_test',
- 'test/alloc_test',
- 'test/foreign_ptr_test',
- 'test/smp_test',
- 'test/thread_test',
- 'test/thread_context_switch_test',
+ 'test/unit/futures_test',
+ 'test/unit/alloc_test',
+ 'test/unit/foreign_ptr_test',
+ 'test/unit/smp_test',
+ 'test/unit/thread_test',
+ 'test/unit/thread_context_switch_test',
'demo/udp_server',
'demo/udp_client',
'demo/blkdiscard_test',
- 'test/sstring_test',
- 'test/unwind_test',
- 'test/defer_test',
- 'test/httpd_test',
- 'test/memcached/memcached_ascii_parser_test',
+ 'test/unit/sstring_test',
+ 'test/unit/unwind_test',
+ 'test/unit/defer_test',
+ 'test/unit/httpd_test',
+ 'app/memcached/test/memcached_ascii_parser_test',
'demo/tcp_sctp_server',
'demo/tcp_sctp_client',
- 'test/allocator_test',
- 'test/output_stream_test',
+ 'test/unit/allocator_test',
+ 'test/unit/output_stream_test',
'demo/udp_zero_copy',
- 'test/shared_ptr_test',
- 'test/weak_ptr_test',
- 'test/checked_ptr_test',
- 'test/slab_test',
- 'test/fstream_test',
- 'test/distributed_test',
+ 'test/unit/shared_ptr_test',
+ 'test/unit/weak_ptr_test',
+ 'test/unit/checked_ptr_test',
+ 'test/unit/slab_test',
+ 'test/unit/fstream_test',
+ 'test/unit/distributed_test',
'demo/rpc',
- 'test/semaphore_test',
- 'test/expiring_fifo_test',
- 'test/packet_test',
- 'test/tls_test',
- 'test/fair_queue_test',
- 'test/rpc_test',
- 'test/connect_test',
- 'test/chunked_fifo_test',
- 'test/circular_buffer_test',
+ 'test/unit/semaphore_test',
+ 'test/unit/expiring_fifo_test',
+ 'test/unit/packet_test',
+ 'test/unit/tls_test',
+ 'test/unit/fair_queue_test',
+ 'test/unit/rpc_test',
+ 'test/unit/connect_test',
+ 'test/unit/chunked_fifo_test',
+ 'test/unit/circular_buffer_test',
'test/perf/perf_fstream',
- 'test/json_formatter_test',
- 'test/dns_test',
- 'test/execution_stage_test',
- 'test/lowres_clock_test',
- 'test/program_options_test',
- 'test/tuple_utils_test',
+ 'test/unit/json_formatter_test',
+ 'test/unit/dns_test',
+ 'test/unit/execution_stage_test',
+ 'test/unit/lowres_clock_test',
+ 'test/unit/program_options_test',
+ 'test/unit/tuple_utils_test',
'demo/tls_echo_server',
'demo/tls_simple_client',
- 'test/circular_buffer_fixed_capacity_test',
- 'test/noncopyable_function_test',
- 'test/netconfig_test',
- 'test/abort_source_test',
- 'test/alien_test',
+ 'test/unit/circular_buffer_fixed_capacity_test',
+ 'test/unit/noncopyable_function_test',
+ 'test/unit/netconfig_test',
+ 'test/unit/abort_source_test',
+ 'test/unit/alien_test',
] + perf_tests

apps = [
@@ -506,90 +506,90 @@ deps = {
'fmt/fmt/libfmt.a': [],
'app/httpd/httpd': ['app/httpd/demo.json', 'app/httpd/main.cc'] + http + libnet + core,
'app/memcached/memcached': ['app/memcached/memcache.cc'] + memcache_base,
- 'test/memcached/memcached_ascii_parser_test': ['test/memcached/test_ascii_parser.cc'] + memcache_base,
- 'test/file_io_test': ['test/fileiotest.cc'] + core,
- 'test/directory_test': ['test/directory_test.cc'] + core,
+ 'app/memcached/test/memcached_ascii_parser_test': ['app/memcached/test/test_ascii_parser.cc'] + memcache_base,
+ 'test/unit/file_io_test': ['test/unit/fileiotest.cc'] + core,
+ 'test/unit/directory_test': ['test/unit/directory_test.cc'] + core,
'demo/linecount': ['demo/linecount.cc'] + core,
'demo/echotest': ['demo/echotest.cc'] + core + libnet,
'demo/l3_test': ['demo/l3_test.cc'] + core + libnet,
'demo/ip_test': ['demo/ip_test.cc'] + core + libnet,
'demo/tcp_test': ['demo/tcp_test.cc'] + core + libnet,
- 'test/timer_test': ['test/timertest.cc'] + core,
- 'test/futures_test': ['test/futures_test.cc'] + core,
- 'test/alloc_test': ['test/alloc_test.cc'] + core,
- 'test/foreign_ptr_test': ['test/foreign_ptr_test.cc'] + core,
- 'test/semaphore_test': ['test/semaphore_test.cc'] + core,
- 'test/expiring_fifo_test': ['test/expiring_fifo_test.cc'] + core,
- 'test/smp_test': ['test/smp_test.cc'] + core,
- 'test/thread_test': ['test/thread_test.cc'] + core,
- 'test/thread_context_switch_test': ['test/thread_context_switch.cc'] + core,
+ 'test/unit/timer_test': ['test/unit/timertest.cc'] + core,
+ 'test/unit/futures_test': ['test/unit/futures_test.cc'] + core,
+ 'test/unit/alloc_test': ['test/unit/alloc_test.cc'] + core,
+ 'test/unit/foreign_ptr_test': ['test/unit/foreign_ptr_test.cc'] + core,
+ 'test/unit/semaphore_test': ['test/unit/semaphore_test.cc'] + core,
+ 'test/unit/expiring_fifo_test': ['test/unit/expiring_fifo_test.cc'] + core,
+ 'test/unit/smp_test': ['test/unit/smp_test.cc'] + core,
+ 'test/unit/thread_test': ['test/unit/thread_test.cc'] + core,
+ 'test/unit/thread_context_switch_test': ['test/unit/thread_context_switch.cc'] + core,
'demo/udp_server': ['demo/udp_server.cc'] + core + libnet,
'demo/udp_client': ['demo/udp_client.cc'] + core + libnet,
'demo/tcp_sctp_server': ['demo/tcp_sctp_server.cc'] + core + libnet,
'demo/tcp_sctp_client': ['demo/tcp_sctp_client.cc'] + core + libnet,
- 'test/tls_test': ['test/tls_test.cc'] + core + libnet,
- 'test/fair_queue_test': ['test/fair_queue_test.cc'] + core,
+ 'test/unit/tls_test': ['test/unit/tls_test.cc'] + core + libnet,
+ 'test/unit/fair_queue_test': ['test/unit/fair_queue_test.cc'] + core,
'app/seawreck/seawreck': ['app/seawreck/seawreck.cc', 'gen/http/http_response_parser.rl'] + core + libnet,
'app/io_tester/io_tester': ['app/io_tester/io_tester.cc'] + core,
'app/iotune/iotune': ['app/iotune/iotune.cc'] + core,
'demo/blkdiscard_test': ['demo/blkdiscard_test.cc'] + core,
- 'test/sstring_test': ['test/sstring_test.cc'] + core,
- 'test/unwind_test': ['test/unwind_test.cc'] + core,
- 'test/defer_test': ['test/defer_test.cc'] + core,
- 'test/httpd_test': ['test/httpd.cc'] + http + core,
- 'test/allocator_test': ['test/allocator_test.cc'] + core,
- 'test/output_stream_test': ['test/output_stream_test.cc'] + core + libnet,
+ 'test/unit/sstring_test': ['test/unit/sstring_test.cc'] + core,
+ 'test/unit/unwind_test': ['test/unit/unwind_test.cc'] + core,
+ 'test/unit/defer_test': ['test/unit/defer_test.cc'] + core,
+ 'test/unit/httpd_test': ['test/unit/httpd.cc'] + http + core,
+ 'test/unit/allocator_test': ['test/unit/allocator_test.cc'] + core,
+ 'test/unit/output_stream_test': ['test/unit/output_stream_test.cc'] + core + libnet,
'demo/udp_zero_copy': ['demo/udp_zero_copy.cc'] + core + libnet,
- 'test/shared_ptr_test': ['test/shared_ptr_test.cc'] + core,
- 'test/weak_ptr_test': ['test/weak_ptr_test.cc'] + core,
- 'test/checked_ptr_test': ['test/checked_ptr_test.cc'] + core,
- 'test/slab_test': ['test/slab_test.cc'] + core,
- 'test/fstream_test': ['test/fstream_test.cc'] + core,
- 'test/distributed_test': ['test/distributed_test.cc'] + core,
+ 'test/unit/shared_ptr_test': ['test/unit/shared_ptr_test.cc'] + core,
+ 'test/unit/weak_ptr_test': ['test/unit/weak_ptr_test.cc'] + core,
+ 'test/unit/checked_ptr_test': ['test/unit/checked_ptr_test.cc'] + core,
+ 'test/unit/slab_test': ['test/unit/slab_test.cc'] + core,
+ 'test/unit/fstream_test': ['test/unit/fstream_test.cc'] + core,
+ 'test/unit/distributed_test': ['test/unit/distributed_test.cc'] + core,
'demo/rpc': ['demo/rpc.cc'] + core + libnet,
- 'test/rpc_test': ['test/rpc_test.cc'] + core + libnet,
- 'test/packet_test': ['test/packet_test.cc'] + core + libnet,
- 'test/connect_test': ['test/connect_test.cc'] + core + libnet,
- 'test/chunked_fifo_test': ['test/chunked_fifo_test.cc'] + core,
- 'test/circular_buffer_test': ['test/circular_buffer_test.cc'] + core,
+ 'test/unit/rpc_test': ['test/unit/rpc_test.cc'] + core + libnet,
+ 'test/unit/packet_test': ['test/unit/packet_test.cc'] + core + libnet,
+ 'test/unit/connect_test': ['test/unit/connect_test.cc'] + core + libnet,
+ 'test/unit/chunked_fifo_test': ['test/unit/chunked_fifo_test.cc'] + core,
+ 'test/unit/circular_buffer_test': ['test/unit/circular_buffer_test.cc'] + core,
'test/perf/perf_fstream': ['test/perf/perf_fstream.cc'] + core,
- 'test/json_formatter_test': ['test/json_formatter_test.cc'] + core + http,
- 'test/dns_test': ['test/dns_test.cc'] + core + libnet,
- 'test/execution_stage_test': ['test/execution_stage_test.cc'] + core,
- 'test/lowres_clock_test': ['test/lowres_clock_test.cc'] + core,
- 'test/program_options_test': ['test/program_options_test.cc'] + core,
- 'test/tuple_utils_test': ['test/tuple_utils_test.cc'],
+ 'test/unit/json_formatter_test': ['test/unit/json_formatter_test.cc'] + core + http,
+ 'test/unit/dns_test': ['test/unit/dns_test.cc'] + core + libnet,
+ 'test/unit/execution_stage_test': ['test/unit/execution_stage_test.cc'] + core,
+ 'test/unit/lowres_clock_test': ['test/unit/lowres_clock_test.cc'] + core,
+ 'test/unit/program_options_test': ['test/unit/program_options_test.cc'] + core,
+ 'test/unit/tuple_utils_test': ['test/unit/tuple_utils_test.cc'],
'demo/tls_echo_server': ['demo/tls_echo_server.cc'] + core + libnet,
'demo/tls_simple_client': ['demo/tls_simple_client.cc'] + core + libnet,
- 'test/circular_buffer_fixed_capacity_test': ['test/circular_buffer_fixed_capacity_test.cc'],
+ 'test/unit/circular_buffer_fixed_capacity_test': ['test/unit/circular_buffer_fixed_capacity_test.cc'],
'demo/scheduling_group_demo': ['demo/scheduling_group_demo.cc'] + core,
- 'test/noncopyable_function_test': ['test/noncopyable_function_test.cc'],
- 'test/netconfig_test': ['test/netconfig_test.cc'] + core + libnet,
- 'test/abort_source_test': ['test/abort_source_test.cc'] + core,
- 'test/alien_test': ['test/alien_test.cc'] + core,
+ 'test/unit/noncopyable_function_test': ['test/unit/noncopyable_function_test.cc'],
+ 'test/unit/netconfig_test': ['test/unit/netconfig_test.cc'] + core + libnet,
+ 'test/unit/abort_source_test': ['test/unit/abort_source_test.cc'] + core,
+ 'test/unit/alien_test': ['test/unit/alien_test.cc'] + core,
}

boost_tests = [
- 'test/memcached/memcached_ascii_parser_test',
- 'test/file_io_test',
- 'test/futures_test',
- 'test/alloc_test',
- 'test/foreign_ptr_test',
- 'test/semaphore_test',
- 'test/expiring_fifo_test',
- 'test/thread_test',
- 'test/tls_test',
- 'test/fair_queue_test',
- 'test/httpd_test',
- 'test/output_stream_test',
- 'test/fstream_test',
- 'test/rpc_test',
- 'test/connect_test',
- 'test/json_formatter_test',
- 'test/dns_test',
- 'test/execution_stage_test',
- 'test/lowres_clock_test',
- 'test/abort_source_test',
+ 'app/memcached/test/memcached_ascii_parser_test',
+ 'test/unit/file_io_test',
+ 'test/unit/futures_test',
+ 'test/unit/alloc_test',
+ 'test/unit/foreign_ptr_test',
+ 'test/unit/semaphore_test',
+ 'test/unit/expiring_fifo_test',
+ 'test/unit/thread_test',
+ 'test/unit/tls_test',
+ 'test/unit/fair_queue_test',
+ 'test/unit/httpd_test',
+ 'test/unit/output_stream_test',
+ 'test/unit/fstream_test',
+ 'test/unit/rpc_test',
+ 'test/unit/connect_test',
+ 'test/unit/json_formatter_test',
+ 'test/unit/dns_test',
+ 'test/unit/execution_stage_test',
+ 'test/unit/lowres_clock_test',
+ 'test/unit/abort_source_test',
]

for bt in boost_tests:
diff --git a/test.py b/test.py
index 5d88762b..e1968251 100755
--- a/test.py
+++ b/test.py
@@ -23,43 +23,46 @@ import subprocess
import signal
import re

+app_tests = [
+ 'app/memcached/test/memcached_ascii_parser_test',
+]
+
boost_tests = [
- 'alloc_test',
- 'futures_test',
- 'thread_test',
- 'memcached/memcached_ascii_parser_test',
- 'sstring_test',
- 'unwind_test',
- 'defer_test',
- 'output_stream_test',
- 'httpd_test',
- 'fstream_test',
- 'foreign_ptr_test',
- 'semaphore_test',
- 'expiring_fifo_test',
- 'shared_ptr_test',
- 'weak_ptr_test',
- 'file_io_test',
- 'packet_test',
- 'tls_test',
- 'rpc_test',
- 'connect_test',
- 'json_formatter_test',
- 'execution_stage_test',
- 'lowres_clock_test',
- 'program_options_test',
- 'tuple_utils_test',
- 'noncopyable_function_test',
- 'abort_source_test',
+ 'unit/alloc_test',
+ 'unit/futures_test',
+ 'unit/thread_test',
+ 'unit/sstring_test',
+ 'unit/unwind_test',
+ 'unit/defer_test',
+ 'unit/output_stream_test',
+ 'unit/httpd_test',
+ 'unit/fstream_test',
+ 'unit/foreign_ptr_test',
+ 'unit/semaphore_test',
+ 'unit/expiring_fifo_test',
+ 'unit/shared_ptr_test',
+ 'unit/weak_ptr_test',
+ 'unit/file_io_test',
+ 'unit/packet_test',
+ 'unit/tls_test',
+ 'unit/rpc_test',
+ 'unit/connect_test',
+ 'unit/json_formatter_test',
+ 'unit/execution_stage_test',
+ 'unit/lowres_clock_test',
+ 'unit/program_options_test',
+ 'unit/tuple_utils_test',
+ 'unit/noncopyable_function_test',
+ 'unit/abort_source_test',
]

other_tests = [
- 'smp_test',
- 'timer_test',
- 'directory_test',
- 'thread_context_switch_test',
- 'fair_queue_test',
- 'alien_test',
+ 'unit/smp_test',
+ 'unit/timer_test',
+ 'unit/directory_test',
+ 'unit/thread_context_switch_test',
+ 'unit/fair_queue_test',
+ 'unit/alien_test',
]

last_len = 0
@@ -100,14 +103,16 @@ if __name__ == "__main__":
test_to_run = []
modes_to_run = all_modes if not args.mode else [args.mode]
for mode in modes_to_run:
- prefix = os.path.join('build', mode, 'test')
+ prefix = os.path.join('build', mode)
for test in other_tests:
- test_to_run.append((os.path.join(prefix, test),'other'))
+ test_to_run.append((os.path.join(prefix,'test',test),'other'))
for test in boost_tests:
- test_to_run.append((os.path.join(prefix, test),'boost'))
+ test_to_run.append((os.path.join(prefix,'test',test),'boost'))
+ for test in app_tests:
+ test_to_run.append((os.path.join(prefix,test),'app'))
memcached_path = make_build_path(mode, 'app', 'memcached', 'memcached')
- test_to_run.append(('test/memcached/test.py --memcached ' + memcached_path + (' --fast' if args.fast else ''),'other'))
- test_to_run.append((os.path.join(prefix, 'distributed_test'),'other'))
+ test_to_run.append(('app/memcached/test/test.py --memcached ' + memcached_path + (' --fast' if args.fast else ''),'other'))
+ test_to_run.append((os.path.join(prefix, 'test', 'unit', 'distributed_test'),'other'))


allocator_test_path = os.path.join(prefix, 'allocator_test')
@@ -149,8 +154,8 @@ if __name__ == "__main__":
if test[1] == 'boost':
path = path + " -- --smp={}".format(cpu_count)
else:
- if not re.search("test/memcached/test.py", path):
- if re.search("allocator_test", path) or re.search("fair_queue_test", path):
+ if not re.search("app/memcached/test/test.py", path):
+ if re.search("allocator_test", path) or re.search("fair_queue_test", path) or re.search("ascii_parser_test", path):
path = path + " -- --smp={}".format(cpu_count)
else:
path = path + " --smp={}".format(cpu_count)
diff --git a/test/abort_source_test.cc b/test/unit/abort_source_test.cc
similarity index 100%
rename from test/abort_source_test.cc
rename to test/unit/abort_source_test.cc
diff --git a/test/alien_test.cc b/test/unit/alien_test.cc
similarity index 100%
rename from test/alien_test.cc
rename to test/unit/alien_test.cc
diff --git a/test/alloc_test.cc b/test/unit/alloc_test.cc
similarity index 100%
rename from test/alloc_test.cc
rename to test/unit/alloc_test.cc
diff --git a/test/allocator_test.cc b/test/unit/allocator_test.cc
similarity index 100%
rename from test/allocator_test.cc
rename to test/unit/allocator_test.cc
diff --git a/test/catest.key b/test/unit/catest.key
similarity index 100%
rename from test/catest.key
rename to test/unit/catest.key
diff --git a/test/catest.pem b/test/unit/catest.pem
similarity index 100%
rename from test/catest.pem
rename to test/unit/catest.pem
diff --git a/test/checked_ptr_test.cc b/test/unit/checked_ptr_test.cc
similarity index 100%
rename from test/checked_ptr_test.cc
rename to test/unit/checked_ptr_test.cc
diff --git a/test/chunked_fifo_test.cc b/test/unit/chunked_fifo_test.cc
similarity index 100%
rename from test/chunked_fifo_test.cc
rename to test/unit/chunked_fifo_test.cc
diff --git a/test/circular_buffer_fixed_capacity_test.cc b/test/unit/circular_buffer_fixed_capacity_test.cc
similarity index 100%
rename from test/circular_buffer_fixed_capacity_test.cc
rename to test/unit/circular_buffer_fixed_capacity_test.cc
diff --git a/test/circular_buffer_test.cc b/test/unit/circular_buffer_test.cc
similarity index 100%
rename from test/circular_buffer_test.cc
rename to test/unit/circular_buffer_test.cc
diff --git a/test/connect_test.cc b/test/unit/connect_test.cc
similarity index 100%
rename from test/connect_test.cc
rename to test/unit/connect_test.cc
diff --git a/test/defer_test.cc b/test/unit/defer_test.cc
similarity index 100%
rename from test/defer_test.cc
rename to test/unit/defer_test.cc
diff --git a/test/directory_test.cc b/test/unit/directory_test.cc
similarity index 100%
rename from test/directory_test.cc
rename to test/unit/directory_test.cc
diff --git a/test/distributed_test.cc b/test/unit/distributed_test.cc
similarity index 100%
rename from test/distributed_test.cc
rename to test/unit/distributed_test.cc
diff --git a/test/dns_test.cc b/test/unit/dns_test.cc
similarity index 100%
rename from test/dns_test.cc
rename to test/unit/dns_test.cc
diff --git a/test/execution_stage_test.cc b/test/unit/execution_stage_test.cc
similarity index 100%
rename from test/execution_stage_test.cc
rename to test/unit/execution_stage_test.cc
diff --git a/test/expiring_fifo_test.cc b/test/unit/expiring_fifo_test.cc
similarity index 100%
rename from test/expiring_fifo_test.cc
rename to test/unit/expiring_fifo_test.cc
diff --git a/test/fair_queue_test.cc b/test/unit/fair_queue_test.cc
similarity index 100%
rename from test/fair_queue_test.cc
rename to test/unit/fair_queue_test.cc
diff --git a/test/fileiotest.cc b/test/unit/fileiotest.cc
similarity index 100%
rename from test/fileiotest.cc
rename to test/unit/fileiotest.cc
diff --git a/test/foreign_ptr_test.cc b/test/unit/foreign_ptr_test.cc
similarity index 100%
rename from test/foreign_ptr_test.cc
rename to test/unit/foreign_ptr_test.cc
diff --git a/test/fstream_test.cc b/test/unit/fstream_test.cc
similarity index 100%
rename from test/fstream_test.cc
rename to test/unit/fstream_test.cc
diff --git a/test/futures_test.cc b/test/unit/futures_test.cc
similarity index 100%
rename from test/futures_test.cc
rename to test/unit/futures_test.cc
diff --git a/test/httpd.cc b/test/unit/httpd.cc
similarity index 100%
rename from test/httpd.cc
rename to test/unit/httpd.cc
diff --git a/test/json_formatter_test.cc b/test/unit/json_formatter_test.cc
similarity index 100%
rename from test/json_formatter_test.cc
rename to test/unit/json_formatter_test.cc
diff --git a/test/loopback_socket.hh b/test/unit/loopback_socket.hh
similarity index 100%
rename from test/loopback_socket.hh
rename to test/unit/loopback_socket.hh
diff --git a/test/lowres_clock_test.cc b/test/unit/lowres_clock_test.cc
similarity index 100%
rename from test/lowres_clock_test.cc
rename to test/unit/lowres_clock_test.cc
diff --git a/test/mkcert.gmk b/test/unit/mkcert.gmk
similarity index 100%
rename from test/mkcert.gmk
rename to test/unit/mkcert.gmk
diff --git a/test/mock_file.hh b/test/unit/mock_file.hh
similarity index 100%
rename from test/mock_file.hh
rename to test/unit/mock_file.hh
diff --git a/test/netconfig_test.cc b/test/unit/netconfig_test.cc
similarity index 100%
rename from test/netconfig_test.cc
rename to test/unit/netconfig_test.cc
diff --git a/test/noncopyable_function_test.cc b/test/unit/noncopyable_function_test.cc
similarity index 100%
rename from test/noncopyable_function_test.cc
rename to test/unit/noncopyable_function_test.cc
diff --git a/test/output_stream_test.cc b/test/unit/output_stream_test.cc
similarity index 100%
rename from test/output_stream_test.cc
rename to test/unit/output_stream_test.cc
diff --git a/test/packet_test.cc b/test/unit/packet_test.cc
similarity index 100%
rename from test/packet_test.cc
rename to test/unit/packet_test.cc
diff --git a/test/program_options_test.cc b/test/unit/program_options_test.cc
similarity index 100%
rename from test/program_options_test.cc
rename to test/unit/program_options_test.cc
diff --git a/test/queue_test.cc b/test/unit/queue_test.cc
similarity index 100%
rename from test/queue_test.cc
rename to test/unit/queue_test.cc
diff --git a/test/rpc_test.cc b/test/unit/rpc_test.cc
similarity index 100%
rename from test/rpc_test.cc
rename to test/unit/rpc_test.cc
diff --git a/test/semaphore_test.cc b/test/unit/semaphore_test.cc
similarity index 100%
rename from test/semaphore_test.cc
rename to test/unit/semaphore_test.cc
diff --git a/test/shared_ptr_test.cc b/test/unit/shared_ptr_test.cc
similarity index 100%
rename from test/shared_ptr_test.cc
rename to test/unit/shared_ptr_test.cc
diff --git a/test/slab_test.cc b/test/unit/slab_test.cc
similarity index 100%
rename from test/slab_test.cc
rename to test/unit/slab_test.cc
diff --git a/test/smp_test.cc b/test/unit/smp_test.cc
similarity index 100%
rename from test/smp_test.cc
rename to test/unit/smp_test.cc
diff --git a/test/sstring_test.cc b/test/unit/sstring_test.cc
similarity index 100%
rename from test/sstring_test.cc
rename to test/unit/sstring_test.cc
diff --git a/test/test.crl b/test/unit/test.crl
similarity index 100%
rename from test/test.crl
rename to test/unit/test.crl
diff --git a/test/test.crt b/test/unit/test.crt
similarity index 100%
rename from test/test.crt
rename to test/unit/test.crt
diff --git a/test/test.csr b/test/unit/test.csr
similarity index 100%
rename from test/test.csr
rename to test/unit/test.csr
diff --git a/test/test.key b/test/unit/test.key
similarity index 100%
rename from test/test.key
rename to test/unit/test.key
diff --git a/test/thread_context_switch.cc b/test/unit/thread_context_switch.cc
similarity index 100%
rename from test/thread_context_switch.cc
rename to test/unit/thread_context_switch.cc
diff --git a/test/thread_test.cc b/test/unit/thread_test.cc
similarity index 100%
rename from test/thread_test.cc
rename to test/unit/thread_test.cc
diff --git a/test/timertest.cc b/test/unit/timertest.cc
similarity index 100%
rename from test/timertest.cc
rename to test/unit/timertest.cc
diff --git a/test/tls-ca-bundle.pem b/test/unit/tls-ca-bundle.pem
similarity index 100%
rename from test/tls-ca-bundle.pem
rename to test/unit/tls-ca-bundle.pem
diff --git a/test/tls_test.cc b/test/unit/tls_test.cc
similarity index 91%
rename from test/tls_test.cc
rename to test/unit/tls_test.cc
index 2bc63af2..4fd765d8 100644
--- a/test/tls_test.cc
+++ b/test/unit/tls_test.cc
@@ -84,7 +84,7 @@ static future<> connect_to_ssl_google(::shared_ptr<tls::certificate_credentials>

SEASTAR_TEST_CASE(test_simple_x509_client) {
auto certs = ::make_shared<tls::certificate_credentials>();
- return certs->set_x509_trust_file("test/tls-ca-bundle.pem", tls::x509_crt_format::PEM).then([certs]() {
+ return certs->set_x509_trust_file("test/unit/tls-ca-bundle.pem", tls::x509_crt_format::PEM).then([certs]() {
return connect_to_ssl_google(certs);
});
}
@@ -184,7 +184,7 @@ SEASTAR_TEST_CASE(test_non_tls) {

SEASTAR_TEST_CASE(test_abort_accept_before_handshake) {
auto certs = ::make_shared<tls::server_credentials>(::make_shared<tls::dh_params>());
- return certs->set_x509_key_file("test/test.crt", "test/test.key", tls::x509_crt_format::PEM).then([certs] {
+ return certs->set_x509_key_file("test/unit/test.crt", "test/unit/test.key", tls::x509_crt_format::PEM).then([certs] {
::listen_options opts;
opts.reuse_address = true;
auto addr = ::make_ipv4_address( {0x7f000001, 4712});
@@ -203,7 +203,7 @@ SEASTAR_TEST_CASE(test_abort_accept_before_handshake) {
SEASTAR_TEST_CASE(test_abort_accept_after_handshake) {
return async([] {
auto certs = ::make_shared<tls::server_credentials>(::make_shared<tls::dh_params>());
- certs->set_x509_key_file("test/test.crt", "test/test.key", tls::x509_crt_format::PEM).get();
+ certs->set_x509_key_file("test/unit/test.crt", "test/unit/test.key", tls::x509_crt_format::PEM).get();

::listen_options opts;
opts.reuse_address = true;
@@ -212,7 +212,7 @@ SEASTAR_TEST_CASE(test_abort_accept_after_handshake) {
auto sa = server.accept();

tls::credentials_builder b;
- b.set_x509_trust_file("test/catest.pem", tls::x509_crt_format::PEM).get();
+ b.set_x509_trust_file("test/unit/catest.pem", tls::x509_crt_format::PEM).get();

auto c = tls::connect(b.build_certificate_credentials(), addr).get0();
server.abort_accept(); // should not affect the socket we got.
@@ -241,7 +241,7 @@ SEASTAR_TEST_CASE(test_abort_accept_on_server_before_handshake) {
auto sa = server.accept();

tls::credentials_builder b;
- b.set_x509_trust_file("test/catest.pem", tls::x509_crt_format::PEM).get();
+ b.set_x509_trust_file("test/unit/catest.pem", tls::x509_crt_format::PEM).get();

auto creds = b.build_certificate_credentials();
auto f = tls::connect(creds, addr);
@@ -355,8 +355,8 @@ static future<> run_echo_test(sstring message,
int loops,
sstring trust,
sstring name,
- sstring crt = "test/test.crt",
- sstring key = "test/test.key",
+ sstring crt = "test/unit/test.crt",
+ sstring key = "test/unit/test.key",
tls::client_auth ca = tls::client_auth::NONE,
sstring client_crt = {},
sstring client_key = {},
@@ -425,7 +425,7 @@ static future<> run_echo_test(sstring message,
/*
* Certificates:
*
- * make -f test/mkcert.gmk domain=scylladb.org server=test
+ * make -f test/unit/mkcert.gmk domain=scylladb.org server=test
*
* -> test.crt
* test.csr
@@ -440,17 +440,17 @@ SEASTAR_TEST_CASE(test_simple_x509_client_server) {
// will not validate
// Must match expected name with cert CA or give empty name to ignore
// server name
- return run_echo_test(message, 20, "test/catest.pem", "test.scylladb.org");
+ return run_echo_test(message, 20, "test/unit/catest.pem", "test.scylladb.org");
}


SEASTAR_TEST_CASE(test_simple_x509_client_server_again) {
- return run_echo_test(message, 20, "test/catest.pem", "test.scylladb.org");
+ return run_echo_test(message, 20, "test/unit/catest.pem", "test.scylladb.org");
}

SEASTAR_TEST_CASE(test_x509_client_server_cert_validation_fail) {
// Load a real trust authority here, which out certs are _not_ signed with.
- return run_echo_test(message, 1, "test/tls-ca-bundle.pem", {}).then([] {
+ return run_echo_test(message, 1, "test/unit/tls-ca-bundle.pem", {}).then([] {
BOOST_FAIL("Should have gotten validation error");
}).handle_exception([](auto ep) {
try {
@@ -465,7 +465,7 @@ SEASTAR_TEST_CASE(test_x509_client_server_cert_validation_fail) {

SEASTAR_TEST_CASE(test_x509_client_server_cert_validation_fail_name) {
// Use trust store with our signer, but wrong host name
- return run_echo_test(message, 1, "test/tls-ca-bundle.pem", "nils.holgersson.gov").then([] {
+ return run_echo_test(message, 1, "test/unit/tls-ca-bundle.pem", "nils.holgersson.gov").then([] {
BOOST_FAIL("Should have gotten validation error");
}).handle_exception([](auto ep) {
try {
@@ -487,7 +487,7 @@ SEASTAR_TEST_CASE(test_large_message_x509_client_server) {
for (size_t i = 0; i < msg.size(); ++i) {
msg[i] = '0' + char(i % 30);
}
- return run_echo_test(std::move(msg), 20, "test/catest.pem", "test.scylladb.org");
+ return run_echo_test(std::move(msg), 20, "test/unit/catest.pem", "test.scylladb.org");
}

SEASTAR_TEST_CASE(test_simple_x509_client_server_fail_client_auth) {
@@ -496,7 +496,7 @@ SEASTAR_TEST_CASE(test_simple_x509_client_server_fail_client_auth) {
// Must match expected name with cert CA or give empty name to ignore
// server name
// Server will require certificate auth. We supply none, so should fail connection
- return run_echo_test(message, 20, "test/catest.pem", "test.scylladb.org", "test/test.crt", "test/test.key", tls::client_auth::REQUIRE).then([] {
+ return run_echo_test(message, 20, "test/unit/catest.pem", "test.scylladb.org", "test/unit/test.crt", "test/unit/test.key", tls::client_auth::REQUIRE).then([] {
BOOST_FAIL("Expected exception");
}).handle_exception([](auto ep) {
// ok.
@@ -509,7 +509,7 @@ SEASTAR_TEST_CASE(test_simple_x509_client_server_client_auth) {
// Must match expected name with cert CA or give empty name to ignore
// server name
// Server will require certificate auth. We supply one, so should succeed with connection
- return run_echo_test(message, 20, "test/catest.pem", "test.scylladb.org", "test/test.crt", "test/test.key", tls::client_auth::REQUIRE, "test/test.crt", "test/test.key");
+ return run_echo_test(message, 20, "test/unit/catest.pem", "test.scylladb.org", "test/unit/test.crt", "test/unit/test.key", tls::client_auth::REQUIRE, "test/unit/test.crt", "test/unit/test.key");
}

SEASTAR_TEST_CASE(test_many_large_message_x509_client_server) {
@@ -526,7 +526,7 @@ SEASTAR_TEST_CASE(test_many_large_message_x509_client_server) {
// machine.
auto range = boost::irange(0, 20);
return do_for_each(range, [msg = std::move(msg)](auto) {
- return run_echo_test(std::move(msg), 1, "test/catest.pem", "test.scylladb.org", "test/test.crt", "test/test.key", tls::client_auth::NONE, {}, {}, false);
+ return run_echo_test(std::move(msg), 1, "test/unit/catest.pem", "test.scylladb.org", "test/unit/test.crt", "test/unit/test.key", tls::client_auth::NONE, {}, {}, false);
});
}

diff --git a/test/tuple_utils_test.cc b/test/unit/tuple_utils_test.cc
similarity index 100%
rename from test/tuple_utils_test.cc
rename to test/unit/tuple_utils_test.cc
diff --git a/test/unwind_test.cc b/test/unit/unwind_test.cc
similarity index 100%
rename from test/unwind_test.cc
rename to test/unit/unwind_test.cc
diff --git a/test/weak_ptr_test.cc b/test/unit/weak_ptr_test.cc
similarity index 100%
rename from test/weak_ptr_test.cc
rename to test/unit/weak_ptr_test.cc
--
2.17.1

Jesse Haber-Kucharsky

<jhaberku@scylladb.com>
unread,
Aug 3, 2018, 6:15:27 PM8/3/18
to seastar-dev@googlegroups.com, Jesse Haber-Kucharsky
All source files which contain an entry-point for a test have a "test"
suffix, to differentiate them from sources files for implementing
functionality common to many tests.

Signed-off-by: Jesse Haber-Kucharsky <jhab...@scylladb.com>
---
configure.py | 12 ++++++------
test/unit/{fileiotest.cc => file_io_test.cc} | 0
test/unit/{httpd.cc => httpd_test.cc} | 0
test/unit/{netconfig_test.cc => net_config_test.cc} | 0
...ntext_switch.cc => thread_context_switch_test.cc} | 0
test/unit/{timertest.cc => timer_test.cc} | 0
6 files changed, 6 insertions(+), 6 deletions(-)
rename test/unit/{fileiotest.cc => file_io_test.cc} (100%)
rename test/unit/{httpd.cc => httpd_test.cc} (100%)
rename test/unit/{netconfig_test.cc => net_config_test.cc} (100%)
rename test/unit/{thread_context_switch.cc => thread_context_switch_test.cc} (100%)
rename test/unit/{timertest.cc => timer_test.cc} (100%)

diff --git a/configure.py b/configure.py
index 3cb27f89..cc3917c3 100755
--- a/configure.py
+++ b/configure.py
@@ -301,7 +301,7 @@ tests = [
'demo/tls_simple_client',
'test/unit/circular_buffer_fixed_capacity_test',
'test/unit/noncopyable_function_test',
- 'test/unit/netconfig_test',
+ 'test/unit/net_config_test',
'test/unit/abort_source_test',
'test/unit/alien_test',
] + perf_tests
@@ -507,14 +507,14 @@ deps = {
'app/httpd/httpd': ['app/httpd/demo.json', 'app/httpd/main.cc'] + http + libnet + core,
'app/memcached/memcached': ['app/memcached/memcache.cc'] + memcache_base,
'app/memcached/test/memcached_ascii_parser_test': ['app/memcached/test/test_ascii_parser.cc'] + memcache_base,
- 'test/unit/file_io_test': ['test/unit/fileiotest.cc'] + core,
+ 'test/unit/file_io_test': ['test/unit/file_io_test.cc'] + core,
'test/unit/directory_test': ['test/unit/directory_test.cc'] + core,
'demo/linecount': ['demo/linecount.cc'] + core,
'demo/echotest': ['demo/echotest.cc'] + core + libnet,
'demo/l3_test': ['demo/l3_test.cc'] + core + libnet,
'demo/ip_test': ['demo/ip_test.cc'] + core + libnet,
'demo/tcp_test': ['demo/tcp_test.cc'] + core + libnet,
- 'test/unit/timer_test': ['test/unit/timertest.cc'] + core,
+ 'test/unit/timer_test': ['test/unit/timer_test.cc'] + core,
'test/unit/futures_test': ['test/unit/futures_test.cc'] + core,
'test/unit/alloc_test': ['test/unit/alloc_test.cc'] + core,
'test/unit/foreign_ptr_test': ['test/unit/foreign_ptr_test.cc'] + core,
@@ -522,7 +522,7 @@ deps = {
'test/unit/expiring_fifo_test': ['test/unit/expiring_fifo_test.cc'] + core,
'test/unit/smp_test': ['test/unit/smp_test.cc'] + core,
'test/unit/thread_test': ['test/unit/thread_test.cc'] + core,
- 'test/unit/thread_context_switch_test': ['test/unit/thread_context_switch.cc'] + core,
+ 'test/unit/thread_context_switch_test': ['test/unit/thread_context_switch_test.cc'] + core,
'demo/udp_server': ['demo/udp_server.cc'] + core + libnet,
'demo/udp_client': ['demo/udp_client.cc'] + core + libnet,
'demo/tcp_sctp_server': ['demo/tcp_sctp_server.cc'] + core + libnet,
@@ -536,7 +536,7 @@ deps = {
'test/unit/sstring_test': ['test/unit/sstring_test.cc'] + core,
'test/unit/unwind_test': ['test/unit/unwind_test.cc'] + core,
'test/unit/defer_test': ['test/unit/defer_test.cc'] + core,
- 'test/unit/httpd_test': ['test/unit/httpd.cc'] + http + core,
+ 'test/unit/httpd_test': ['test/unit/httpd_test.cc'] + http + core,
'test/unit/allocator_test': ['test/unit/allocator_test.cc'] + core,
'test/unit/output_stream_test': ['test/unit/output_stream_test.cc'] + core + libnet,
'demo/udp_zero_copy': ['demo/udp_zero_copy.cc'] + core + libnet,
@@ -564,7 +564,7 @@ deps = {
'test/unit/circular_buffer_fixed_capacity_test': ['test/unit/circular_buffer_fixed_capacity_test.cc'],
'demo/scheduling_group_demo': ['demo/scheduling_group_demo.cc'] + core,
'test/unit/noncopyable_function_test': ['test/unit/noncopyable_function_test.cc'],
- 'test/unit/netconfig_test': ['test/unit/netconfig_test.cc'] + core + libnet,
+ 'test/unit/net_config_test': ['test/unit/net_config_test.cc'] + core + libnet,
'test/unit/abort_source_test': ['test/unit/abort_source_test.cc'] + core,
'test/unit/alien_test': ['test/unit/alien_test.cc'] + core,
}
diff --git a/test/unit/fileiotest.cc b/test/unit/file_io_test.cc
similarity index 100%
rename from test/unit/fileiotest.cc
rename to test/unit/file_io_test.cc
diff --git a/test/unit/httpd.cc b/test/unit/httpd_test.cc
similarity index 100%
rename from test/unit/httpd.cc
rename to test/unit/httpd_test.cc
diff --git a/test/unit/netconfig_test.cc b/test/unit/net_config_test.cc
similarity index 100%
rename from test/unit/netconfig_test.cc
rename to test/unit/net_config_test.cc
diff --git a/test/unit/thread_context_switch.cc b/test/unit/thread_context_switch_test.cc
similarity index 100%
rename from test/unit/thread_context_switch.cc
rename to test/unit/thread_context_switch_test.cc
diff --git a/test/unit/timertest.cc b/test/unit/timer_test.cc
similarity index 100%
rename from test/unit/timertest.cc
rename to test/unit/timer_test.cc
--
2.17.1

Jesse Haber-Kucharsky

<jhaberku@scylladb.com>
unread,
Aug 3, 2018, 6:15:28 PM8/3/18
to seastar-dev@googlegroups.com, Jesse Haber-Kucharsky
All source files containing the main entry-point for a demo have the
"demo" suffix, to differentiate them from source files implementing
functionality common to many demos.

Signed-off-by: Jesse Haber-Kucharsky <jhab...@scylladb.com>
---
configure.py | 56 +++++++++----------
...kdiscard_test.cc => block_discard_demo.cc} | 0
demo/{echotest.cc => echo_demo.cc} | 0
demo/{ip_test.cc => ip_demo.cc} | 0
demo/{l3_test.cc => l3_demo.cc} | 0
demo/{linecount.cc => line_count_demo.cc} | 0
demo/{rpc.cc => rpc_demo.cc} | 0
demo/{tcp_test.cc => tcp_demo.cc} | 0
...sctp_client.cc => tcp_sctp_client_demo.cc} | 0
...sctp_server.cc => tcp_sctp_server_demo.cc} | 0
...echo_server.cc => tls_echo_server_demo.cc} | 0
...le_client.cc => tls_simple_client_demo.cc} | 0
demo/{udp_client.cc => udp_client_demo.cc} | 0
demo/{udp_server.cc => udp_server_demo.cc} | 0
...udp_zero_copy.cc => udp_zero_copy_demo.cc} | 0
15 files changed, 28 insertions(+), 28 deletions(-)
rename demo/{blkdiscard_test.cc => block_discard_demo.cc} (100%)
rename demo/{echotest.cc => echo_demo.cc} (100%)
rename demo/{ip_test.cc => ip_demo.cc} (100%)
rename demo/{l3_test.cc => l3_demo.cc} (100%)
rename demo/{linecount.cc => line_count_demo.cc} (100%)
rename demo/{rpc.cc => rpc_demo.cc} (100%)
rename demo/{tcp_test.cc => tcp_demo.cc} (100%)
rename demo/{tcp_sctp_client.cc => tcp_sctp_client_demo.cc} (100%)
rename demo/{tcp_sctp_server.cc => tcp_sctp_server_demo.cc} (100%)
rename demo/{tls_echo_server.cc => tls_echo_server_demo.cc} (100%)
rename demo/{tls_simple_client.cc => tls_simple_client_demo.cc} (100%)
rename demo/{udp_client.cc => udp_client_demo.cc} (100%)
rename demo/{udp_server.cc => udp_server_demo.cc} (100%)
rename demo/{udp_zero_copy.cc => udp_zero_copy_demo.cc} (100%)

diff --git a/configure.py b/configure.py
index cc3917c3..8f964490 100755
--- a/configure.py
+++ b/configure.py
@@ -249,38 +249,38 @@ perf_tests = [
tests = [
'test/unit/file_io_test',
'test/unit/directory_test',
- 'demo/linecount',
- 'demo/echotest',
- 'demo/l3_test',
- 'demo/ip_test',
+ 'demo/line_count_demo',
+ 'demo/echo_demo',
+ 'demo/l3_demo',
+ 'demo/ip_demo',
'test/unit/timer_test',
- 'demo/tcp_test',
+ 'demo/tcp_demo',
'test/unit/futures_test',
'test/unit/alloc_test',
'test/unit/foreign_ptr_test',
'test/unit/smp_test',
'test/unit/thread_test',
'test/unit/thread_context_switch_test',
- 'demo/udp_server',
- 'demo/udp_client',
- 'demo/blkdiscard_test',
+ 'demo/udp_server_demo',
+ 'demo/udp_client_demo',
+ 'demo/block_discard_demo',
'test/unit/sstring_test',
'test/unit/unwind_test',
'test/unit/defer_test',
'test/unit/httpd_test',
'app/memcached/test/memcached_ascii_parser_test',
- 'demo/tcp_sctp_server',
- 'demo/tcp_sctp_client',
+ 'demo/tcp_sctp_server_demo',
+ 'demo/tcp_sctp_client_demo',
'test/unit/allocator_test',
'test/unit/output_stream_test',
- 'demo/udp_zero_copy',
+ 'demo/udp_zero_copy_demo',
'test/unit/shared_ptr_test',
'test/unit/weak_ptr_test',
'test/unit/checked_ptr_test',
'test/unit/slab_test',
'test/unit/fstream_test',
'test/unit/distributed_test',
- 'demo/rpc',
+ 'demo/rpc_demo',
'test/unit/semaphore_test',
'test/unit/expiring_fifo_test',
'test/unit/packet_test',
@@ -297,8 +297,8 @@ tests = [
'test/unit/lowres_clock_test',
'test/unit/program_options_test',
'test/unit/tuple_utils_test',
- 'demo/tls_echo_server',
- 'demo/tls_simple_client',
+ 'demo/tls_echo_server_demo',
+ 'demo/tls_simple_client_demo',
'test/unit/circular_buffer_fixed_capacity_test',
'test/unit/noncopyable_function_test',
'test/unit/net_config_test',
@@ -509,11 +509,11 @@ deps = {
'app/memcached/test/memcached_ascii_parser_test': ['app/memcached/test/test_ascii_parser.cc'] + memcache_base,
'test/unit/file_io_test': ['test/unit/file_io_test.cc'] + core,
'test/unit/directory_test': ['test/unit/directory_test.cc'] + core,
- 'demo/linecount': ['demo/linecount.cc'] + core,
- 'demo/echotest': ['demo/echotest.cc'] + core + libnet,
- 'demo/l3_test': ['demo/l3_test.cc'] + core + libnet,
- 'demo/ip_test': ['demo/ip_test.cc'] + core + libnet,
- 'demo/tcp_test': ['demo/tcp_test.cc'] + core + libnet,
+ 'demo/line_count_demo': ['demo/line_count_demo.cc'] + core,
+ 'demo/echo_demo': ['demo/echo_demo.cc'] + core + libnet,
+ 'demo/l3_demo': ['demo/l3_demo.cc'] + core + libnet,
+ 'demo/ip_demo': ['demo/ip_demo.cc'] + core + libnet,
+ 'demo/tcp_demo': ['demo/tcp_demo.cc'] + core + libnet,
'test/unit/timer_test': ['test/unit/timer_test.cc'] + core,
'test/unit/futures_test': ['test/unit/futures_test.cc'] + core,
'test/unit/alloc_test': ['test/unit/alloc_test.cc'] + core,
@@ -523,30 +523,30 @@ deps = {
'test/unit/smp_test': ['test/unit/smp_test.cc'] + core,
'test/unit/thread_test': ['test/unit/thread_test.cc'] + core,
'test/unit/thread_context_switch_test': ['test/unit/thread_context_switch_test.cc'] + core,
- 'demo/udp_server': ['demo/udp_server.cc'] + core + libnet,
- 'demo/udp_client': ['demo/udp_client.cc'] + core + libnet,
- 'demo/tcp_sctp_server': ['demo/tcp_sctp_server.cc'] + core + libnet,
- 'demo/tcp_sctp_client': ['demo/tcp_sctp_client.cc'] + core + libnet,
+ 'demo/udp_server_demo': ['demo/udp_server_demo.cc'] + core + libnet,
+ 'demo/udp_client_demo': ['demo/udp_client_demo.cc'] + core + libnet,
+ 'demo/tcp_sctp_server_demo': ['demo/tcp_sctp_server_demo.cc'] + core + libnet,
+ 'demo/tcp_sctp_client_demo': ['demo/tcp_sctp_client_demo.cc'] + core + libnet,
'test/unit/tls_test': ['test/unit/tls_test.cc'] + core + libnet,
'test/unit/fair_queue_test': ['test/unit/fair_queue_test.cc'] + core,
'app/seawreck/seawreck': ['app/seawreck/seawreck.cc', 'gen/http/http_response_parser.rl'] + core + libnet,
'app/io_tester/io_tester': ['app/io_tester/io_tester.cc'] + core,
'app/iotune/iotune': ['app/iotune/iotune.cc'] + core,
- 'demo/blkdiscard_test': ['demo/blkdiscard_test.cc'] + core,
+ 'demo/block_discard_demo': ['demo/block_discard_demo.cc'] + core,
'test/unit/sstring_test': ['test/unit/sstring_test.cc'] + core,
'test/unit/unwind_test': ['test/unit/unwind_test.cc'] + core,
'test/unit/defer_test': ['test/unit/defer_test.cc'] + core,
'test/unit/httpd_test': ['test/unit/httpd_test.cc'] + http + core,
'test/unit/allocator_test': ['test/unit/allocator_test.cc'] + core,
'test/unit/output_stream_test': ['test/unit/output_stream_test.cc'] + core + libnet,
- 'demo/udp_zero_copy': ['demo/udp_zero_copy.cc'] + core + libnet,
+ 'demo/udp_zero_copy_demo': ['demo/udp_zero_copy_demo.cc'] + core + libnet,
'test/unit/shared_ptr_test': ['test/unit/shared_ptr_test.cc'] + core,
'test/unit/weak_ptr_test': ['test/unit/weak_ptr_test.cc'] + core,
'test/unit/checked_ptr_test': ['test/unit/checked_ptr_test.cc'] + core,
'test/unit/slab_test': ['test/unit/slab_test.cc'] + core,
'test/unit/fstream_test': ['test/unit/fstream_test.cc'] + core,
'test/unit/distributed_test': ['test/unit/distributed_test.cc'] + core,
- 'demo/rpc': ['demo/rpc.cc'] + core + libnet,
+ 'demo/rpc_demo': ['demo/rpc_demo.cc'] + core + libnet,
'test/unit/rpc_test': ['test/unit/rpc_test.cc'] + core + libnet,
'test/unit/packet_test': ['test/unit/packet_test.cc'] + core + libnet,
'test/unit/connect_test': ['test/unit/connect_test.cc'] + core + libnet,
@@ -559,8 +559,8 @@ deps = {
'test/unit/lowres_clock_test': ['test/unit/lowres_clock_test.cc'] + core,
'test/unit/program_options_test': ['test/unit/program_options_test.cc'] + core,
'test/unit/tuple_utils_test': ['test/unit/tuple_utils_test.cc'],
- 'demo/tls_echo_server': ['demo/tls_echo_server.cc'] + core + libnet,
- 'demo/tls_simple_client': ['demo/tls_simple_client.cc'] + core + libnet,
+ 'demo/tls_echo_server_demo': ['demo/tls_echo_server_demo.cc'] + core + libnet,
+ 'demo/tls_simple_client_demo': ['demo/tls_simple_client_demo.cc'] + core + libnet,
'test/unit/circular_buffer_fixed_capacity_test': ['test/unit/circular_buffer_fixed_capacity_test.cc'],
'demo/scheduling_group_demo': ['demo/scheduling_group_demo.cc'] + core,
'test/unit/noncopyable_function_test': ['test/unit/noncopyable_function_test.cc'],
diff --git a/demo/blkdiscard_test.cc b/demo/block_discard_demo.cc
similarity index 100%
rename from demo/blkdiscard_test.cc
rename to demo/block_discard_demo.cc
diff --git a/demo/echotest.cc b/demo/echo_demo.cc
similarity index 100%
rename from demo/echotest.cc
rename to demo/echo_demo.cc
diff --git a/demo/ip_test.cc b/demo/ip_demo.cc
similarity index 100%
rename from demo/ip_test.cc
rename to demo/ip_demo.cc
diff --git a/demo/l3_test.cc b/demo/l3_demo.cc
similarity index 100%
rename from demo/l3_test.cc
rename to demo/l3_demo.cc
diff --git a/demo/linecount.cc b/demo/line_count_demo.cc
similarity index 100%
rename from demo/linecount.cc
rename to demo/line_count_demo.cc
diff --git a/demo/rpc.cc b/demo/rpc_demo.cc
similarity index 100%
rename from demo/rpc.cc
rename to demo/rpc_demo.cc
diff --git a/demo/tcp_test.cc b/demo/tcp_demo.cc
similarity index 100%
rename from demo/tcp_test.cc
rename to demo/tcp_demo.cc
diff --git a/demo/tcp_sctp_client.cc b/demo/tcp_sctp_client_demo.cc
similarity index 100%
rename from demo/tcp_sctp_client.cc
rename to demo/tcp_sctp_client_demo.cc
diff --git a/demo/tcp_sctp_server.cc b/demo/tcp_sctp_server_demo.cc
similarity index 100%
rename from demo/tcp_sctp_server.cc
rename to demo/tcp_sctp_server_demo.cc
diff --git a/demo/tls_echo_server.cc b/demo/tls_echo_server_demo.cc
similarity index 100%
rename from demo/tls_echo_server.cc
rename to demo/tls_echo_server_demo.cc
diff --git a/demo/tls_simple_client.cc b/demo/tls_simple_client_demo.cc
similarity index 100%
rename from demo/tls_simple_client.cc
rename to demo/tls_simple_client_demo.cc
diff --git a/demo/udp_client.cc b/demo/udp_client_demo.cc
similarity index 100%
rename from demo/udp_client.cc
rename to demo/udp_client_demo.cc
diff --git a/demo/udp_server.cc b/demo/udp_server_demo.cc
similarity index 100%
rename from demo/udp_server.cc
rename to demo/udp_server_demo.cc
diff --git a/demo/udp_zero_copy.cc b/demo/udp_zero_copy_demo.cc
similarity index 100%
rename from demo/udp_zero_copy.cc

Jesse Haber-Kucharsky

<jhaberku@scylladb.com>
unread,
Aug 3, 2018, 6:15:29 PM8/3/18
to seastar-dev@googlegroups.com, Jesse Haber-Kucharsky
Like with tests and demos, we make "perf" a suffix instead of a prefix

Signed-off-by: Jesse Haber-Kucharsky <jhab...@scylladb.com>
---
configure.py | 6 +++---
test/perf/{perf_fstream.cc => fstream_perf.cc} | 0
test/perf/{perf_future_util.cc => future_util_perf.cc} | 0
3 files changed, 3 insertions(+), 3 deletions(-)
rename test/perf/{perf_fstream.cc => fstream_perf.cc} (100%)
rename test/perf/{perf_future_util.cc => future_util_perf.cc} (100%)

diff --git a/configure.py b/configure.py
index 8f964490..4ee0fedc 100755
--- a/configure.py
+++ b/configure.py
@@ -243,7 +243,7 @@ modes = {
}

perf_tests = [
- 'test/perf/perf_future_util',
+ 'test/perf/future_util_perf',
]

tests = [
@@ -290,7 +290,7 @@ tests = [
'test/unit/connect_test',
'test/unit/chunked_fifo_test',
'test/unit/circular_buffer_test',
- 'test/perf/perf_fstream',
+ 'test/perf/fstream_perf',
'test/unit/json_formatter_test',
'test/unit/dns_test',
'test/unit/execution_stage_test',
@@ -552,7 +552,7 @@ deps = {
'test/unit/connect_test': ['test/unit/connect_test.cc'] + core + libnet,
'test/unit/chunked_fifo_test': ['test/unit/chunked_fifo_test.cc'] + core,
'test/unit/circular_buffer_test': ['test/unit/circular_buffer_test.cc'] + core,
- 'test/perf/perf_fstream': ['test/perf/perf_fstream.cc'] + core,
+ 'test/perf/fstream_perf': ['test/perf/fstream_perf.cc'] + core,
'test/unit/json_formatter_test': ['test/unit/json_formatter_test.cc'] + core + http,
'test/unit/dns_test': ['test/unit/dns_test.cc'] + core + libnet,
'test/unit/execution_stage_test': ['test/unit/execution_stage_test.cc'] + core,
diff --git a/test/perf/perf_fstream.cc b/test/perf/fstream_perf.cc
similarity index 100%
rename from test/perf/perf_fstream.cc
rename to test/perf/fstream_perf.cc
diff --git a/test/perf/perf_future_util.cc b/test/perf/future_util_perf.cc
similarity index 100%
rename from test/perf/perf_future_util.cc
rename to test/perf/future_util_perf.cc
--
2.17.1

Jesse Haber-Kucharsky

<jhaberku@scylladb.com>
unread,
Aug 3, 2018, 6:15:30 PM8/3/18
to seastar-dev@googlegroups.com, Jesse Haber-Kucharsky
Signed-off-by: Jesse Haber-Kucharsky <jhab...@scylladb.com>
---
Doxyfile => doc/Doxyfile | 0
DoxygenLayout.xml => doc/DoxygenLayout.xml | 0
2 files changed, 0 insertions(+), 0 deletions(-)
rename Doxyfile => doc/Doxyfile (100%)
rename DoxygenLayout.xml => doc/DoxygenLayout.xml (100%)

diff --git a/Doxyfile b/doc/Doxyfile
similarity index 100%
rename from Doxyfile
rename to doc/Doxyfile
diff --git a/DoxygenLayout.xml b/doc/DoxygenLayout.xml
similarity index 100%
rename from DoxygenLayout.xml
rename to doc/DoxygenLayout.xml
--
2.17.1

Jesse Haber-Kucharsky

<jhaberku@scylladb.com>
unread,
Aug 3, 2018, 6:15:32 PM8/3/18
to seastar-dev@googlegroups.com, Jesse Haber-Kucharsky
Signed-off-by: Jesse Haber-Kucharsky <jhab...@scylladb.com>
---
configure.py | 2 +-
gen/http/{http_response_parser.rl => response_parser.rl} | 0
2 files changed, 1 insertion(+), 1 deletion(-)
rename gen/http/{http_response_parser.rl => response_parser.rl} (100%)

diff --git a/configure.py b/configure.py
index 4ee0fedc..cf8288c7 100755
--- a/configure.py
+++ b/configure.py
@@ -529,7 +529,7 @@ deps = {
'demo/tcp_sctp_client_demo': ['demo/tcp_sctp_client_demo.cc'] + core + libnet,
'test/unit/tls_test': ['test/unit/tls_test.cc'] + core + libnet,
'test/unit/fair_queue_test': ['test/unit/fair_queue_test.cc'] + core,
- 'app/seawreck/seawreck': ['app/seawreck/seawreck.cc', 'gen/http/http_response_parser.rl'] + core + libnet,
+ 'app/seawreck/seawreck': ['app/seawreck/seawreck.cc', 'gen/http/response_parser.rl'] + core + libnet,
'app/io_tester/io_tester': ['app/io_tester/io_tester.cc'] + core,
'app/iotune/iotune': ['app/iotune/iotune.cc'] + core,
'demo/block_discard_demo': ['demo/block_discard_demo.cc'] + core,
diff --git a/gen/http/http_response_parser.rl b/gen/http/response_parser.rl
similarity index 100%
rename from gen/http/http_response_parser.rl
rename to gen/http/response_parser.rl
--
2.17.1

Jesse Haber-Kucharsky

<jhaberku@scylladb.com>
unread,
Aug 3, 2018, 6:15:32 PM8/3/18
to seastar-dev@googlegroups.com, Jesse Haber-Kucharsky
In some instances, I observed that the destructor of the static
`test_runner` instance did not run when a program linking against the
testing library terminated.

The rules around when destructors of static objects can invoked are
somewhat complex, so to avoid ambiguity and ensure that the thread is
always joined, we move the bulk of the destructor to a `finalize`
function and invoke it manually.

Signed-off-by: Jesse Haber-Kucharsky <jhab...@scylladb.com>
---
test/test-utils.cc | 4 +++-
test/test_runner.cc | 13 +++++++++----
test/test_runner.hh | 1 +
3 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/test/test-utils.cc b/test/test-utils.cc
index 5fc14f22..effb8cbf 100644
--- a/test/test-utils.cc
+++ b/test/test-utils.cc
@@ -81,5 +81,7 @@ bool init_unit_test_suite() {
}

int main(int ac, char** av) {
- return ::boost::unit_test::unit_test_main(&seastar::init_unit_test_suite, ac, av);
+ const int exit_code = ::boost::unit_test::unit_test_main(&seastar::init_unit_test_suite, ac, av);
+ seastar::global_test_runner().finalize();
+ return exit_code;
}
diff --git a/test/test_runner.cc b/test/test_runner.cc
index 55e6f15d..54230b62 100644
--- a/test/test_runner.cc
+++ b/test/test_runner.cc
@@ -33,10 +33,7 @@ static test_runner instance;
struct stop_execution : public std::exception {};

test_runner::~test_runner() {
- if (_thread) {
- _task.interrupt(stop_execution());
- _thread->join();
- }
+ finalize();
}

void
@@ -92,6 +89,14 @@ test_runner::run_sync(std::function<future<>()> task) {
}
}

+void test_runner::finalize() {
+ if (_thread) {
+ _task.interrupt(stop_execution());
+ _thread->join();
+ _thread = nullptr;
+ }
+}
+
test_runner& global_test_runner() {
return instance;
}
diff --git a/test/test_runner.hh b/test/test_runner.hh
index 02132e61..3c492eb5 100644
--- a/test/test_runner.hh
+++ b/test/test_runner.hh
@@ -42,6 +42,7 @@ class test_runner {
void start(int argc, char** argv);
~test_runner();
void run_sync(std::function<future<>()> task);
+ void finalize();
};

test_runner& global_test_runner();
--
2.17.1

Jesse Haber-Kucharsky

<jhaberku@scylladb.com>
unread,
Aug 3, 2018, 6:15:33 PM8/3/18
to seastar-dev@googlegroups.com, Jesse Haber-Kucharsky
Signed-off-by: Jesse Haber-Kucharsky <jhab...@scylladb.com>
---
doc/md2html | 4 +++-
doc/md2pdf | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/doc/md2html b/doc/md2html
index 87eae740..0c509180 100755
--- a/doc/md2html
+++ b/doc/md2html
@@ -17,6 +17,8 @@
#
# Copyright (C) 2018 ScyllaDB

+dir=$(dirname "$0")
+
case `pandoc --version` in
"pandoc 1."*)
SMART_OPT=--smart
@@ -26,4 +28,4 @@ case `pandoc --version` in
SMART_OPT=
SMART_EXT=+smart
esac
-pandoc --self-contained $SMART_OPT --toc -c doc/template.css --number-sections -f markdown+pandoc_title_block+implicit_header_references$SMART_EXT --highlight-style tango "$1" -o "$2"
+pandoc --self-contained $SMART_OPT --toc -c ${dir}/template.css --number-sections -f markdown+pandoc_title_block+implicit_header_references$SMART_EXT --highlight-style tango "$1" -o "$2"
diff --git a/doc/md2pdf b/doc/md2pdf
index 198495d1..19c9e094 100755
--- a/doc/md2pdf
+++ b/doc/md2pdf
@@ -17,5 +17,7 @@
#
# Copyright (C) 2018 ScyllaDB

-pandoc -f markdown+pandoc_title_block+implicit_header_references --highlight-style tango --template=doc/template.tex "$1" -o "$2"
+dir=$(dirname "$0")
+
+pandoc -f markdown+pandoc_title_block+implicit_header_references --highlight-style tango --template=${dir}/template.tex "$1" -o "$2"

--
2.17.1

Jesse Haber-Kucharsky

<jhaberku@scylladb.com>
unread,
Aug 3, 2018, 6:15:36 PM8/3/18
to seastar-dev@googlegroups.com, Jesse Haber-Kucharsky
These changes reflect the new build system.

Signed-off-by: Jesse Haber-Kucharsky <jhab...@scylladb.com>
---
doc/tutorial.md | 80 ++++++++++++++++++++++++-------------------------
1 file changed, 40 insertions(+), 40 deletions(-)

diff --git a/doc/tutorial.md b/doc/tutorial.md
index d8dfaf76..469acaa3 100644
--- a/doc/tutorial.md
+++ b/doc/tutorial.md
@@ -62,8 +62,8 @@ https://github.com/scylladb/seastar/wiki/Networking
The simplest Seastar program is this:

```cpp
-#include "core/app-template.hh"
-#include "core/reactor.hh"
+#include <seastar/core/app-template.hh>
+#include <seastar/core/reactor.hh>
#include <iostream>

int main(int argc, char** argv) {
@@ -86,7 +86,7 @@ To compile this program, first make sure you have downloaded and built Seastar.
Now, put the above program in a source file anywhere you want, let's call the file `getting-started.cc`. You can compile it with the following command:

```none
-c++ `pkg-config --cflags --libs $SEASTAR/build/release/seastar.pc` getting-started.cc
+c++ `pkg-config --cflags --libs --static $SEASTAR/build/seastar.pc` getting-started.cc
```

Linux's [pkg-config](http://www.freedesktop.org/wiki/Software/pkg-config/) is a useful tool for easily determining the compilation and linking parameters needed for using various libraries - such as Seastar.
@@ -103,8 +103,8 @@ $
As explained in the introduction, Seastar-based programs run a single thread on each CPU. Each of these threads runs its own event loop, known as the *engine* in Seastar nomenclature. By default, the Seastar application will take over all the available cores, starting one thread per core. We can see this with the following program, printing `seastar::smp::count` which is the number of started threads:

```cpp
-#include "core/app-template.hh"
-#include "core/reactor.hh"
+#include <seastar/core/app-template.hh>
+#include <seastar/core/reactor.hh>
#include <iostream>

int main(int argc, char** argv) {
@@ -143,8 +143,8 @@ abort (core dumped)
The error is an exception thrown from app.run, which we did not catch, leading to this ugly uncaught-exception crash. It is better to catch this sort of startup exceptions, and exit gracefully without a core dump:

```cpp
-#include "core/app-template.hh"
-#include "core/reactor.hh"
+#include <seastar/core/app-template.hh>
+#include <seastar/core/reactor.hh>
#include <iostream>
#include <stdexcept>

@@ -208,8 +208,8 @@ This function arranges a timer so that the returned future becomes available (wi
A **continuation** is a callback (typically a lambda) to run when a future becomes available. A continuation is attached to a future with the `then()` method. Here is a simple example:

```cpp
-#include "core/app-template.hh"
-#include "core/sleep.hh"
+#include <seastar/core/app-template.hh>
+#include <seastar/core/sleep.hh>
#include <iostream>

int main(int argc, char** argv) {
@@ -231,8 +231,8 @@ The return value of `then()` is itself a future which is useful for chaining mul
To avoid repeating the boilerplate "app_engine" part in every code example in this tutorial, let's create a simple main() with which we will compile the following examples. This main just calls function `future<> f()`, does the appropriate exception handling, and exits when the future returned by `f` is resolved:

```cpp
-#include "core/app-template.hh"
-#include "util/log.hh"
+#include <seastar/core/app-template.hh>
+#include <seastar/util/log.hh>
#include <iostream>
#include <stdexcept>

@@ -254,7 +254,7 @@ int main(int argc, char** argv) {
Compiling together with this `main.cc`, the above sleep() example code becomes:

```cpp
-#include "core/sleep.hh"
+#include <seastar/core/sleep.hh>
#include <iostream>

seastar::future<> f() {
@@ -269,7 +269,7 @@ seastar::future<> f() {
So far, this example was not very interesting - there is no parallelism, and the same thing could have been achieved by the normal blocking POSIX `sleep()`. Things become much more interesting when we start several sleep() futures in parallel, and attach a different continuation to each. Futures and continuation make parallelism very easy and natural:

```cpp
-#include "core/sleep.hh"
+#include <seastar/core/sleep.hh>
#include <iostream>

seastar::future<> f() {
@@ -290,7 +290,7 @@ Sleeping... 100ms 200ms Done.
`sleep()` returns `future<>`, meaning it will complete at a future time, but once complete, does not return any value. More interesting futures do specify a value of any type (or multiple values) that will become available later. In the following example, we have a function returning a `future<int>`, and a continuation to be run once this value becomes available. Note how the continuation gets the future's value as a parameter:

```cpp
-#include "core/sleep.hh"
+#include <seastar/core/sleep.hh>
#include <iostream>

seastar::future<int> slow() {
@@ -317,7 +317,7 @@ This optimization is done *usually*, though sometimes it is avoided: The impleme
`make_ready_future<>` can be used to return a future which is already ready. The following example is identical to the previous one, except the promise function `fast()` returns a future which is already ready, and not one which will be ready in a second as in the previous example. The nice thing is that the consumer of the future does not care, and uses the future in the same way in both cases.

```cpp
-#include "core/future.hh"
+#include <seastar/core/future.hh>
#include <iostream>

seastar::future<int> fast() {
@@ -337,7 +337,7 @@ seastar::future<> f() {
We've already seen that Seastar *continuations* are lambdas, passed to the `then()` method of a future. In the examples we've seen so far, lambdas have been nothing more than anonymous functions. But C++11 lambdas have one more trick up their sleeve, which is extremely important for future-based asynchronous programming in Seastar: Lambdas can **capture** state. Consider the following example:

```cpp
-#include "core/sleep.hh"
+#include <seastar/core/sleep.hh>
#include <iostream>

seastar::future<int> incr(int i) {
@@ -440,7 +440,7 @@ TODO: give example code for the above. Also mention handle_exception - although
An asynchronous function can fail in one of two ways: It can fail immediately, by throwing an exception, or it can return a future which will eventually fail (resolve to an exception). These two modes of failure appear similar to the uninitiated, but behave differently when attempting to handle exceptions using `finally()`, `handle_exception()`, or `then_wrapped()`. For example, consider the code:

```cpp
-#include "core/future.hh"
+#include <seastar/core/future.hh>
#include <iostream>
#include <exception>

@@ -743,7 +743,7 @@ Above we've seen `parallel_for_each()`, which starts a number of asynchronous op
The first variant of `when_all()` is variadic, i.e., the futures are given as separate parameters, the exact number of which is known at compile time. The individual futures may have different types. For example,

```cpp
-#include "core/sleep.hh"
+#include <seastar/core/sleep.hh>

future<> f() {
using namespace std::chrono_literals;
@@ -932,7 +932,7 @@ Above, we looked at a function `g()` which gets called by some external event, a
Consider the following simple loop:

```cpp
-#include "core/sleep.hh"
+#include <seastar/core/sleep.hh>
seastar::future<> slow() {
std::cerr << ".";
return seastar::sleep(std::chrono::seconds(1));
@@ -1070,8 +1070,8 @@ slow().finally([&g] { g.leave(); });
Here is a typical example of using a gate:

```cpp
-#include "core/sleep.hh"
-#include "core/gate.hh"
+#include <seastar/core/sleep.hh>
+#include <seastar/core/gate.hh>
#include <boost/iterator/counting_iterator.hpp>

seastar::future<> slow(int i) {
@@ -1174,9 +1174,9 @@ Here we ask each of Seastar cores (from 0 to `smp::count`-1) to run the same fun
We begin with a simple example of a TCP network server written in Seastar. This server repeatedly accepts connections on TCP port 1234, and returns an empty response:

```cpp
-#include "core/seastar.hh"
-#include "core/reactor.hh"
-#include "core/future-util.hh"
+#include <seastar/core/seastar.hh>
+#include <seastar/core/reactor.hh>
+#include <seastar/core/future-util.hh>
#include <iostream>

seastar::future<> service_loop() {
@@ -1227,9 +1227,9 @@ Most servers will always turn on this ```reuse_address``` listen option. Stevens
Let's advance our example server by outputting some canned response to each connection, instead of closing each connection immediately with an empty reply.

```cpp
-#include "core/seastar.hh"
-#include "core/reactor.hh"
-#include "core/future-util.hh"
+#include <seastar/core/seastar.hh>
+#include <seastar/core/reactor.hh>
+#include <seastar/core/future-util.hh>
#include <iostream>

const char* canned_response = "Seastar is the future!\n";
@@ -1275,9 +1275,9 @@ In the above example we only saw writing to the socket. Real servers will also w
Let's look at a simple example server involving both reads an writes. This is a simple echo server, as described in RFC 862: The server listens for connections from the client, and once a connection is established, any data received is simply sent back - until the client closes the connection.

```cpp
-#include "core/seastar.hh"
-#include "core/reactor.hh"
-#include "core/future-util.hh"
+#include <seastar/core/seastar.hh>
+#include <seastar/core/reactor.hh>
+#include <seastar/core/future-util.hh>

seastar::future<> handle_connection(seastar::connected_socket s,
seastar::socket_address a) {
@@ -1355,8 +1355,8 @@ Rather, applications which want to have command-line options of their own should

```cpp
#include <iostream>
-#include <core/app-template.hh>
-#include <core/reactor.hh>
+#include <seastar/core/app-template.hh>
+#include <seastar/core/reactor.hh>
int main(int argc, char** argv) {
seastar::app_template app;
namespace bpo = boost::program_options;
@@ -1415,8 +1415,8 @@ Therefore, Seastar prints a warning message to the log if a future is destroyed

For example, consider this code:
```cpp
-#include <core/future.hh>
-#include <core/sleep.hh>
+#include <seastar/core/future.hh>
+#include <seastar/core/sleep.hh>

class myexception {};

@@ -1509,8 +1509,8 @@ Sometimes an application logs an exception, and we want to know where in the cod
For example, in the following code we throw and catch an `std::runtime_error` normally:

```cpp
-#include <core/future.hh>
-#include <util/log.hh>
+#include <seastar/core/future.hh>
+#include <seastar/util/log.hh>
#include <exception>
#include <iostream>

@@ -1636,8 +1636,8 @@ In addition to `seastar::future::get()`, we also have `seastar::future::wait()`
After we created a `seastar::thread` object, we need wait until it ends, using its `join()` method. We also need to keep that object alive until `join()` completes. A complete example using `seastar::thread` will therefore look like this:

```cpp
-#include <core/sleep.hh>
-#include <core/thread.hh>
+#include <seastar/core/sleep.hh>
+#include <seastar/core/thread.hh>
seastar::future<> f() {
seastar::thread th([] {
std::cout << "Hi.\n";
@@ -1654,8 +1654,8 @@ seastar::future<> f() {

The `seastar::async()` function provides a convenient shortcut for creating a `seastar::thread` and returning a future which resolves when the thread completes:
```cpp
-#include <core/sleep.hh>
-#include <core/thread.hh>
+#include <seastar/core/sleep.hh>
+#include <seastar/core/thread.hh>
seastar::future<> f() {
return seastar::async([] {
std::cout << "Hi.\n";
--
2.17.1

Jesse Haber-Kucharsky

<jhaberku@scylladb.com>
unread,
Aug 3, 2018, 6:15:37 PM8/3/18
to seastar-dev@googlegroups.com, Jesse Haber-Kucharsky
This patch replaces the previous build system (based on Ninja files
generated from a Python script) with CMake.

For a quick walk-through, see `HACKING.md`.

I have tested this build system with all combinations of:

- Clang and GCC
- CMake 3.5.2 and CMake 3.11.2

The most important characteristic of this new build system is how
dependencies are handled.

Previously, dependnecies of Seastar that were not readily available as
system packages were provided through Git submodules. Part of Seastar's
build involved launching external tools to build these dependencies.

In this build, we specify with CMake the names and versions of all
dependencies, but we do not bundle them.

In this way, the dependencies can be supplied from arbitrary sources.
These could include system packages, custom locations on disk, or
package managers like Conan.

One option for supplying dependencies included in this patch is the
`cooking.sh` script, part of the `cmake-cooking` project. This script
creates a local development environment containing all (or some)
dependencies by fetching their source code, compiling them, and
installing them into a project-specific location. More instructions for
using `cooking.sh` are available in the new `HACKING.md` file.

Because the build system only checks that dependencies are satisfied,
when Seastar is installed via -- for example, `ninja install` -- the
installed files are relocatable to any system which includes the
dependencies and for which the installation destination exists.

As part of this build system, we also generate a pkg-config
specification which is installed alongside the CMake files necessary for
consumers to use Seastar.

This new build system also includes the new `test_dist` target. This
test verifies that clients can build applications against Seastar with
the files that the build-system installs. The test uses `cooking.sh` to
manage all dependencies and checks both "native" CMake support and also
compilation with pkg-config.

Signed-off-by: Jesse Haber-Kucharsky <jhab...@scylladb.com>
---
.gitignore | 1 +
.gitmodules | 9 -
CMakeLists.txt | 731 +++++++
HACKING.md | 138 ++
README.md | 19 +-
app/CMakeLists.txt | 56 +
app/httpd/CMakeLists.txt | 36 +
app/httpd/main.cc | 2 +-
app/io_tester/CMakeLists.txt | 27 +
app/iotune/CMakeLists.txt | 29 +
app/memcached/CMakeLists.txt | 48 +
app/memcached/ascii.rl | 2 +-
app/memcached/memcache.cc | 5 +-
app/memcached/test/CMakeLists.txt | 56 +
app/memcached/test/test_ascii_parser.cc | 3 +-
app/seawreck/CMakeLists.txt | 24 +
app/seawreck/seawreck.cc | 2 +-
cmake/FindBoost.cmake | 2098 ++++++++++++++++++
cmake/FindGnuTLS.cmake | 65 +
cmake/FindLinuxMembarrier.cmake | 38 +
cmake/FindProtobuf.cmake | 578 +++++
cmake/FindSanitizers.cmake | 78 +
cmake/FindStdFilesystem.cmake | 63 +
cmake/Findc-ares.cmake | 55 +
cmake/Findcryptopp.cmake | 55 +
cmake/Finddl.cmake | 62 +
cmake/Finddpdk.cmake | 405 ++++
cmake/Findhwloc.cmake | 65 +
cmake/Findlksctp-tools.cmake | 54 +
cmake/Findlz4.cmake | 72 +
cmake/Findnumactl.cmake | 54 +
cmake/Findragel.cmake | 46 +
cmake/Findrt.cmake | 60 +
cmake/Findyaml-cpp.cmake | 65 +
cmake/SeastarConfig.cmake.in | 64 +
cmake/code_test/LinuxMembarrier_test.cc | 8 +
cmake/code_test/Sanitizers_fiber_test.cc | 11 +
cmake/code_test/StdFilesystem_test.cc | 6 +
cmake/code_test/dl_test.cc | 7 +
cmake/code_test/rt_test.cc | 10 +
configure.py | 1033 ---------
cooking.sh | 552 +++++
demo/CMakeLists.txt | 101 +
doc/CMakeLists.txt | 68 +
doc/Doxyfile.cmake | 2362 +++++++++++++++++++++
doc/building-arch.md | 4 +-
doc/building-centos.md | 5 +-
doc/building-fedora.md | 7 +-
doc/building-ubuntu.md | 4 +-
doc/htmlsplit.py | 2 +-
license/cmake.txt | 30 +
pkgconfig/seastar.pc.cmake | 46 +
recipe/dev.cmake | 275 +++
recipe/dpdk_config | 23 +
recipe/dpdk_configure.cmake | 40 +
src/net/dns.cc | 2 +-
test.py | 199 --
test/CMakeLists.txt | 47 +
test/dist/CMakeLists.txt | 54 +
test/dist/consumer/CMakeLists.txt | 36 +
test/dist/consumer/Makefile | 35 +
test/dist/consumer/cmake_consumer.cc | 15 +
test/dist/consumer/pkgconfig_consumer.cc | 15 +
test/dist/consumer/recipe/test_dist.cmake | 11 +
test/dist/consumer_test.sh | 49 +
test/perf/CMakeLists.txt | 77 +
test/unit/CMakeLists.txt | 260 +++
test/unit/tls_test.cc | 30 +-
68 files changed, 9312 insertions(+), 1277 deletions(-)
create mode 100644 CMakeLists.txt
create mode 100644 HACKING.md
create mode 100644 app/CMakeLists.txt
create mode 100644 app/httpd/CMakeLists.txt
create mode 100644 app/io_tester/CMakeLists.txt
create mode 100644 app/iotune/CMakeLists.txt
create mode 100644 app/memcached/CMakeLists.txt
create mode 100644 app/memcached/test/CMakeLists.txt
create mode 100644 app/seawreck/CMakeLists.txt
create mode 100644 cmake/FindBoost.cmake
create mode 100644 cmake/FindGnuTLS.cmake
create mode 100644 cmake/FindLinuxMembarrier.cmake
create mode 100644 cmake/FindProtobuf.cmake
create mode 100644 cmake/FindSanitizers.cmake
create mode 100644 cmake/FindStdFilesystem.cmake
create mode 100644 cmake/Findc-ares.cmake
create mode 100644 cmake/Findcryptopp.cmake
create mode 100644 cmake/Finddl.cmake
create mode 100644 cmake/Finddpdk.cmake
create mode 100644 cmake/Findhwloc.cmake
create mode 100644 cmake/Findlksctp-tools.cmake
create mode 100644 cmake/Findlz4.cmake
create mode 100644 cmake/Findnumactl.cmake
create mode 100644 cmake/Findragel.cmake
create mode 100644 cmake/Findrt.cmake
create mode 100644 cmake/Findyaml-cpp.cmake
create mode 100644 cmake/SeastarConfig.cmake.in
create mode 100644 cmake/code_test/LinuxMembarrier_test.cc
create mode 100644 cmake/code_test/Sanitizers_fiber_test.cc
create mode 100644 cmake/code_test/StdFilesystem_test.cc
create mode 100644 cmake/code_test/dl_test.cc
create mode 100644 cmake/code_test/rt_test.cc
delete mode 100755 configure.py
create mode 100755 cooking.sh
create mode 100644 demo/CMakeLists.txt
create mode 100644 doc/CMakeLists.txt
create mode 100644 doc/Doxyfile.cmake
create mode 100644 license/cmake.txt
create mode 100644 pkgconfig/seastar.pc.cmake
create mode 100644 recipe/dev.cmake
create mode 100644 recipe/dpdk_config
create mode 100644 recipe/dpdk_configure.cmake
delete mode 100755 test.py
create mode 100644 test/CMakeLists.txt
create mode 100644 test/dist/CMakeLists.txt
create mode 100644 test/dist/consumer/CMakeLists.txt
create mode 100644 test/dist/consumer/Makefile
create mode 100644 test/dist/consumer/cmake_consumer.cc
create mode 100644 test/dist/consumer/pkgconfig_consumer.cc
create mode 100644 test/dist/consumer/recipe/test_dist.cmake
create mode 100755 test/dist/consumer_test.sh
create mode 100644 test/perf/CMakeLists.txt
create mode 100644 test/unit/CMakeLists.txt

diff --git a/.gitignore b/.gitignore
index e34a54e0..89e26793 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,4 @@ build
build.ninja
cscope.*
__pycache__/
+cmake/Cooking.cmake
diff --git a/.gitmodules b/.gitmodules
index 0e913cc3..e69de29b 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,9 +0,0 @@
-[submodule "dpdk"]
- path = dpdk
- url = ../dpdk
-[submodule "fmt"]
- path = fmt
- url = ../fmt
-[submodule "c-ares"]
- path = c-ares
- url = ../c-ares
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 00000000..6cd9824f
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,731 @@
+#
+# This file is open source software, licensed to you under the terms
+# of the Apache License, Version 2.0 (the "License"). See the NOTICE file
+# distributed with this work for additional information regarding copyright
+# ownership. You may not use this file except in compliance with the License.
+#
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# Copyright (C) 2018 Scylladb, Ltd.
+#
+
+cmake_minimum_required (VERSION 3.5)
+
+list (APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
+include (Cooking OPTIONAL)
+
+project (Seastar
+ VERSION 2.0.0
+ LANGUAGES CXX)
+
+option (Seastar_ALLOC_FAILURE_INJECTION
+ "Enable failure injection into the Seastar allocator."
+ OFF)
+
+set (Seastar_ALLOC_PAGE_SIZE
+ ""
+ CACHE
+ STRING
+ "Override the Seastar allocator page size, in bytes.")
+
+option (Seastar_APPS
+ "Enable application targets."
+ ON)
+
+set (Seastar_CXX_FLAGS
+ ""
+ CACHE
+ STRING
+ "Semicolon-separated list of extra compilation flags for Seastar itself.")
+
+option (Seastar_DEMOS
+ "Enable demonstration targets."
+ ON)
+
+option (Seastar_DOCS
+ "Enable documentation targets."
+ ON)
+
+option (Seastar_DPDK
+ "Enable DPDK support."
+ OFF)
+
+option (Seastar_EXCEPTION_SCALABILITY_WORKAROUND
+ "Enable a workaround for C++ exception scalability issues by preventing override of the `dl_iterate_phdr` symbol."
+ OFF)
+
+option (Seastar_EXCLUDE_TESTS_FROM_ALL
+ "When enabled alongide Seastar_TESTING, do not build tests by default."
+ OFF)
+
+option (Seastar_GCC6_CONCEPTS
+ "Enable compilation with gcc version 6 concepts support."
+ OFF)
+
+option (Seastar_HWLOC
+ "Enable hwloc support."
+ ON)
+
+option (Seastar_INSTALL
+ "Install targets."
+ ON)
+
+option (Seastar_NUMA
+ "Enable NUMA support, with `numactl`."
+ ON)
+
+option (Seastar_TESTING
+ "Enable testing targets."
+ ON)
+
+if (NOT (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR))
+ set (Seastar_APPS OFF)
+ set (Seastar_DEMOS OFF)
+ set (Seastar_DOCS OFF)
+ set (Seastar_INSTALL OFF)
+ set (Seastar_TESTING OFF)
+endif ()
+
+#
+# Useful (non-cache) variables.
+#
+
+set (Seastar_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
+set (Seastar_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
+
+#
+# Dependencies.
+#
+
+##
+## Public dependencies.
+##
+
+find_package (Boost 1.64.0 REQUIRED
+ COMPONENTS
+ filesystem
+ program_options
+ thread)
+
+find_package (c-ares 1.13.0 REQUIRED MODULE)
+find_package (cryptopp 5.6.5 REQUIRED)
+# No version information published.
+find_package (dpdk)
+find_package (fmt 4.0.0 REQUIRED)
+find_package (lz4 1.8.0 REQUIRED)
+
+##
+## Private and private/public dependencies.
+##
+
+find_package (GnuTLS 3.5.18 REQUIRED)
+find_package (LinuxMembarrier)
+find_package (Protobuf 3.3.1 REQUIRED)
+find_package (Sanitizers REQUIRED)
+find_package (StdFilesystem REQUIRED)
+find_package (dl REQUIRED)
+find_package (hwloc 1.11.5)
+# No version information published.
+find_package (lksctp-tools REQUIRED)
+# No version information published.
+find_package (numactl)
+find_package (ragel 7.0.0 REQUIRED)
+find_package (rt REQUIRED)
+find_package (yaml-cpp 0.5.3 REQUIRED)
+
+#
+# Code generation helpers.
+#
+
+function (seastar_generate_protobuf target var in_file out_dir)
+ get_filename_component (in_file_name ${in_file} NAME_WE)
+ get_filename_component (in_file_dir ${in_file} DIRECTORY)
+ set (header_out ${out_dir}/${in_file_name}.pb.h)
+ set (source_out ${out_dir}/${in_file_name}.pb.cc)
+
+ add_custom_command (
+ DEPENDS ${in_file}
+ OUTPUT ${header_out} ${source_out}
+ COMMAND ${CMAKE_COMMAND} -E make_directory ${out_dir}
+ COMMAND ${Protobuf_PROTOC_EXECUTABLE} --cpp_out=${out_dir} -I${in_file_dir} ${in_file})
+
+ add_custom_target (${target}
+ DEPENDS
+ ${header_out}
+ ${source_out})
+
+ set (${var} ${header_out} ${source_out} PARENT_SCOPE)
+endfunction ()
+
+function (seastar_generate_ragel target var in_file out_file)
+ get_filename_component (out_dir ${out_file} DIRECTORY)
+
+ add_custom_command (
+ DEPENDS ${in_file}
+ OUTPUT ${out_file}
+ COMMAND ${CMAKE_COMMAND} -E make_directory ${out_dir}
+ COMMAND ${ragel_RAGEL_EXECUTABLE} -G2 -o ${out_file} ${in_file}
+ COMMAND sed -i -e "'1h;2,$$H;$$!d;g'" -re "'s/static const char _nfa[^;]*;//g'" ${out_file})
+
+ add_custom_target (${target}
+ DEPENDS ${out_file})
+
+ set (${var} ${out_file} PARENT_SCOPE)
+endfunction ()
+
+function (seastar_generate_swagger target var in_file out_file)
+ get_filename_component (out_dir ${out_file} DIRECTORY)
+ set (generator ${Seastar_SOURCE_DIR}/gen/json2code.py)
+
+ add_custom_command (
+ DEPENDS
+ ${in_file}
+ ${generator}
+ OUTPUT ${out_file}
+ COMMAND ${CMAKE_COMMAND} -E make_directory ${out_dir}
+ COMMAND ${generator} -f ${in_file} -o ${out_file})
+
+ add_custom_target (${target}
+ DEPENDS ${out_file})
+
+ set (${var} ${out_file} PARENT_SCOPE)
+endfunction ()
+
+#
+# The `seastar` library.
+#
+
+seastar_generate_ragel (seastar_http_request_parser
+ http_request_parser_file
+ ${CMAKE_CURRENT_SOURCE_DIR}/gen/http/request_parser.rl
+ ${CMAKE_CURRENT_BINARY_DIR}/gen/seastar/http/request_parser.hh)
+
+seastar_generate_ragel (seastar_http_response_parser
+ http_response_parser_file
+ ${CMAKE_CURRENT_SOURCE_DIR}/gen/http/response_parser.rl
+ ${CMAKE_CURRENT_BINARY_DIR}/gen/seastar/http/response_parser.hh)
+
+seastar_generate_protobuf (seastar_proto_metrics2
+ proto_metrics2_files
+ ${CMAKE_CURRENT_SOURCE_DIR}/gen/proto/metrics2.proto
+ ${CMAKE_CURRENT_BINARY_DIR}/gen/seastar/proto)
+
+add_library (seastar STATIC
+ ${http_request_parser_file}
+ ${proto_metrics2_files}
+ include/seastar/core/abort_source.hh
+ include/seastar/core/alien.hh
+ include/seastar/core/align.hh
+ include/seastar/core/aligned_buffer.hh
+ include/seastar/core/app-template.hh
+ include/seastar/core/apply.hh
+ include/seastar/core/array_map.hh
+ include/seastar/core/bitops.hh
+ include/seastar/core/bitset-iter.hh
+ include/seastar/core/byteorder.hh
+ include/seastar/core/cacheline.hh
+ include/seastar/core/checked_ptr.hh
+ include/seastar/core/chunked_fifo.hh
+ include/seastar/core/circular_buffer.hh
+ include/seastar/core/circular_buffer_fixed_capacity.hh
+ include/seastar/core/condition-variable.hh
+ include/seastar/core/deleter.hh
+ include/seastar/core/distributed.hh
+ include/seastar/core/do_with.hh
+ include/seastar/core/dpdk_rte.hh
+ include/seastar/core/enum.hh
+ include/seastar/core/exception_hacks.hh
+ include/seastar/core/execution_stage.hh
+ include/seastar/core/expiring_fifo.hh
+ include/seastar/core/fair_queue.hh
+ include/seastar/core/file.hh
+ include/seastar/core/fsqual.hh
+ include/seastar/core/fstream.hh
+ include/seastar/core/function_traits.hh
+ include/seastar/core/future-util.hh
+ include/seastar/core/future.hh
+ include/seastar/core/gate.hh
+ include/seastar/core/iostream-impl.hh
+ include/seastar/core/iostream.hh
+ include/seastar/core/linux-aio.hh
+ include/seastar/core/lowres_clock.hh
+ include/seastar/core/manual_clock.hh
+ include/seastar/core/memory.hh
+ include/seastar/core/metrics.hh
+ include/seastar/core/metrics_api.hh
+ include/seastar/core/metrics_registration.hh
+ include/seastar/core/metrics_types.hh
+ include/seastar/core/pipe.hh
+ include/seastar/core/posix.hh
+ include/seastar/core/preempt.hh
+ include/seastar/core/prefetch.hh
+ include/seastar/core/print.hh
+ include/seastar/core/prometheus.hh
+ include/seastar/core/queue.hh
+ include/seastar/core/ragel.hh
+ include/seastar/core/reactor.hh
+ include/seastar/core/report_exception.hh
+ include/seastar/core/resource.hh
+ include/seastar/core/rwlock.hh
+ include/seastar/core/scattered_message.hh
+ include/seastar/core/scheduling.hh
+ include/seastar/core/scollectd.hh
+ include/seastar/core/scollectd_api.hh
+ include/seastar/core/seastar.hh
+ include/seastar/core/semaphore.hh
+ include/seastar/core/sharded.hh
+ include/seastar/core/shared_future.hh
+ include/seastar/core/shared_mutex.hh
+ include/seastar/core/shared_ptr.hh
+ include/seastar/core/shared_ptr_debug_helper.hh
+ include/seastar/core/shared_ptr_incomplete.hh
+ include/seastar/core/simple-stream.hh
+ include/seastar/core/slab.hh
+ include/seastar/core/sleep.hh
+ include/seastar/core/sstring.hh
+ include/seastar/core/stall_sampler.hh
+ include/seastar/core/stream.hh
+ include/seastar/core/systemwide_memory_barrier.hh
+ include/seastar/core/task.hh
+ include/seastar/core/temporary_buffer.hh
+ include/seastar/core/thread.hh
+ include/seastar/core/thread_cputime_clock.hh
+ include/seastar/core/thread_impl.hh
+ include/seastar/core/timer-set.hh
+ include/seastar/core/timer.hh
+ include/seastar/core/transfer.hh
+ include/seastar/core/unaligned.hh
+ include/seastar/core/units.hh
+ include/seastar/core/vector-data-sink.hh
+ include/seastar/core/vla.hh
+ include/seastar/core/weak_ptr.hh
+ include/seastar/http/api_docs.hh
+ include/seastar/http/common.hh
+ include/seastar/http/exception.hh
+ include/seastar/http/file_handler.hh
+ include/seastar/http/function_handlers.hh
+ include/seastar/http/handlers.hh
+ include/seastar/http/httpd.hh
+ include/seastar/http/json_path.hh
+ include/seastar/http/matcher.hh
+ include/seastar/http/matchrules.hh
+ include/seastar/http/mime_types.hh
+ include/seastar/http/reply.hh
+ include/seastar/http/request.hh
+ include/seastar/http/routes.hh
+ include/seastar/http/transformers.hh
+ include/seastar/json/formatter.hh
+ include/seastar/json/json_elements.hh
+ include/seastar/net/api.hh
+ include/seastar/net/arp.hh
+ include/seastar/net/byteorder.hh
+ include/seastar/net/config.hh
+ include/seastar/net/const.hh
+ include/seastar/net/dhcp.hh
+ include/seastar/net/dns.hh
+ include/seastar/net/dpdk.hh
+ include/seastar/net/ethernet.hh
+ include/seastar/net/inet_address.hh
+ include/seastar/net/ip.hh
+ include/seastar/net/ip_checksum.hh
+ include/seastar/net/native-stack.hh
+ include/seastar/net/net.hh
+ include/seastar/net/packet-data-source.hh
+ include/seastar/net/packet-util.hh
+ include/seastar/net/packet.hh
+ include/seastar/net/posix-stack.hh
+ include/seastar/net/proxy.hh
+ include/seastar/net/socket_defs.hh
+ include/seastar/net/stack.hh
+ include/seastar/net/tcp-stack.hh
+ include/seastar/net/tcp.hh
+ include/seastar/net/tls.hh
+ include/seastar/net/toeplitz.hh
+ include/seastar/net/udp.hh
+ include/seastar/net/virtio-interface.hh
+ include/seastar/net/virtio.hh
+ include/seastar/rpc/lz4_compressor.hh
+ include/seastar/rpc/multi_algo_compressor_factory.hh
+ include/seastar/rpc/rpc.hh
+ include/seastar/rpc/rpc_impl.hh
+ include/seastar/rpc/rpc_types.hh
+ include/seastar/util/alloc_failure_injector.hh
+ include/seastar/util/backtrace.hh
+ include/seastar/util/bool_class.hh
+ include/seastar/util/conversions.hh
+ include/seastar/util/defer.hh
+ include/seastar/util/eclipse.hh
+ include/seastar/util/function_input_iterator.hh
+ include/seastar/util/gcc6-concepts.hh
+ include/seastar/util/indirect.hh
+ include/seastar/util/is_smart_ptr.hh
+ include/seastar/util/lazy.hh
+ include/seastar/util/log-cli.hh
+ include/seastar/util/log.hh
+ include/seastar/util/noncopyable_function.hh
+ include/seastar/util/optimized_optional.hh
+ include/seastar/util/print_safe.hh
+ include/seastar/util/program-options.hh
+ include/seastar/util/reference_wrapper.hh
+ include/seastar/util/spinlock.hh
+ include/seastar/util/transform_iterator.hh
+ include/seastar/util/tuple_utils.hh
+ include/seastar/util/variant_utils.hh
+ src/core/alien.cc
+ src/core/app-template.cc
+ src/core/dpdk_rte.cc
+ src/core/exception_hacks.cc
+ src/core/execution_stage.cc
+ src/core/file-impl.hh
+ src/core/fsqual.cc
+ src/core/fstream.cc
+ src/core/future-util.cc
+ src/core/linux-aio.cc
+ src/core/memory.cc
+ src/core/metrics.cc
+ src/core/posix.cc
+ src/core/prometheus.cc
+ src/core/reactor.cc
+ src/core/resource.cc
+ src/core/scollectd.cc
+ src/core/scollectd-impl.hh
+ src/core/systemwide_memory_barrier.cc
+ src/core/thread.cc
+ src/http/api_docs.cc
+ src/http/common.cc
+ src/http/file_handler.cc
+ src/http/httpd.cc
+ src/http/json_path.cc
+ src/http/matcher.cc
+ src/http/mime_types.cc
+ src/http/reply.cc
+ src/http/routes.cc
+ src/http/transformers.cc
+ src/json/formatter.cc
+ src/json/json_elements.cc
+ src/net/arp.cc
+ src/net/config.cc
+ src/net/dhcp.cc
+ src/net/dns.cc
+ src/net/dpdk.cc
+ src/net/ethernet.cc
+ src/net/inet_address.cc
+ src/net/ip.cc
+ src/net/ip_checksum.cc
+ src/net/native-stack-impl.hh
+ src/net/native-stack.cc
+ src/net/net.cc
+ src/net/packet.cc
+ src/net/posix-stack.cc
+ src/net/proxy.cc
+ src/net/stack.cc
+ src/net/tcp.cc
+ src/net/tls.cc
+ src/net/udp.cc
+ src/net/virtio.cc
+ src/rpc/lz4_compressor.cc
+ src/rpc/rpc.cc
+ src/util/alloc_failure_injector.cc
+ src/util/backtrace.cc
+ src/util/conversions.cc
+ src/util/log.cc
+ src/util/program-options.cc)
+
+add_library (Seastar::seastar ALIAS seastar)
+
+add_dependencies (seastar
+ seastar_http_request_parser
+ seastar_http_response_parser
+ seastar_proto_metrics2)
+
+if (cxx_std_17 IN_LIST CMAKE_CXX_KNOWN_FEATURES)
+ target_compile_features (seastar
+ PUBLIC cxx_std_17)
+else ()
+ target_compile_options (seastar
+ PUBLIC -std=c++17)
+endif ()
+
+target_include_directories (seastar
+ PUBLIC
+ $<INSTALL_INTERFACE:include>
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/gen>
+ PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src)
+
+target_link_libraries (seastar
+ PUBLIC
+ Boost::boost
+ Boost::program_options
+ Boost::thread
+ c-ares::c-ares
+ cryptopp::cryptopp
+ fmt::fmt
+ lz4::lz4
+ PRIVATE
+ Boost::filesystem
+ GnuTLS::gnutls
+ StdFilesystem::filesystem
+ dl::dl
+ lksctp-tools::lksctp-tools
+ protobuf::libprotobuf
+ rt::rt
+ yaml-cpp::yaml-cpp
+ debug Sanitizers::address
+ debug Sanitizers::undefined_behavior)
+
+if (LinuxMembarrier_FOUND)
+ target_compile_definitions (seastar
+ PRIVATE SEASTAR_HAS_MEMBARRIER)
+
+ target_link_libraries (seastar
+ PRIVATE LinuxMembarrier::membarrier)
+endif ()
+
+if (Seastar_ALLOC_FAILURE_INJECTION)
+ target_compile_definitions (seastar
+ PUBLIC SEASTAR_ENABLE_ALLOC_FAILURE_INJECTION)
+endif ()
+
+if (Sanitizers_FIBER_SUPPORT)
+ target_compile_definitions (seastar
+ PRIVATE SEASTAR_HAVE_ASAN_FIBER_SUPPORT)
+endif ()
+
+if (Seastar_ALLOC_PAGE_SIZE)
+ target_compile_definitions (seastar
+ PUBLIC SEASTAR_OVERRIDE_ALLOCATOR_PAGE_SIZE=${Seastar_ALLOC_PAGE_SIZE})
+endif ()
+
+if (Seastar_CXX_FLAGS)
+ target_compile_options (seastar
+ PRIVATE ${Seastar_CXX_FLAGS})
+endif ()
+
+if (Seastar_DPDK)
+ if (NOT dpdk_FOUND)
+ message (FATAL_ERROR "dpdk support is enabled but it is not available!")
+ endif ()
+
+ target_compile_definitions (seastar
+ PUBLIC SEASTAR_HAVE_DPDK)
+
+ target_link_libraries (seastar
+ PUBLIC dpdk::dpdk)
+endif ()
+
+if (Seastar_GCC6_CONCEPTS)
+ target_compile_definitions (seastar
+ PUBLIC SEASTAR_HAVE_GCC6_CONCEPTS)
+
+ target_compile_options (seastar
+ PUBLIC -fconcepts)
+endif ()
+
+if (NOT Seastar_EXCEPTION_SCALABILITY_WORKAROUND)
+ target_compile_definitions (seastar
+ PRIVATE SEASTAR_NO_EXCEPTION_HACK)
+endif ()
+
+if (Seastar_HWLOC)
+ if (NOT hwloc_FOUND)
+ message (FATAL_ERROR "`hwloc` support is enabled but it is not available!")
+ endif ()
+
+ target_compile_definitions (seastar
+ PRIVATE SEASTAR_HAVE_HWLOC)
+
+ target_link_libraries (seastar
+ PRIVATE hwloc::hwloc)
+endif ()
+
+if (Seastar_NUMA)
+ if (NOT numactl_FOUND)
+ message (FATAL_ERROR "NUMA support is enabled but `numactl` is not available!")
+ endif ()
+
+ target_compile_definitions (seastar
+ PRIVATE SEASTAR_HAVE_NUMA)
+
+ target_link_libraries (seastar
+ PRIVATE numactl::numactl)
+endif ()
+
+if (lz4_HAVE_COMPRESS_DEFAULT)
+ target_compile_definitions (seastar
+ PRIVATE SEASTAR_HAVE_LZ4_COMPRESS_DEFAULT)
+endif ()
+
+if (CMAKE_BUILD_TYPE STREQUAL "Debug")
+ target_compile_definitions (seastar
+ PUBLIC
+ SEASTAR_DEBUG
+ SEASTAR_DEBUG_SHARED_PTR
+ SEASTAR_ASAN_ENABLED
+ SEASTAR_THREAD_STACK_GUARDS
+ PRIVATE SEASTAR_DEFAULT_ALLOCATOR)
+endif ()
+
+#
+# Tests and the testing library.
+#
+
+if (Seastar_TESTING)
+ find_package (Boost REQUIRED
+ COMPONENTS unit_test_framework)
+
+ enable_testing ()
+
+ if (Seastar_EXCLUDE_TESTS_FROM_ALL)
+ set (exclude EXCLUDE_FROM_ALL)
+ else ()
+ set (exclude "")
+ endif ()
+
+ add_subdirectory (test ${exclude})
+endif ()
+
+#
+# Demonstrations.
+#
+
+if (Seastar_DEMOS)
+ add_subdirectory (demo)
+endif ()
+
+#
+# Documentation.
+#
+
+if (Seastar_DOCS)
+ add_subdirectory (doc)
+endif ()
+
+#
+# Applications.
+#
+
+if (Seastar_APPS)
+ add_subdirectory (app)
+endif ()
+
+#
+# pkg-config generation.
+#
+# Note that unlike the CMake "config module", this description is not relocatable because
+# some dependencies do not natively support pkg-config.
+#
+
+# Necessary here for pkg-config.
+include (GNUInstallDirs)
+
+configure_file (
+ ${CMAKE_CURRENT_SOURCE_DIR}/pkgconfig/seastar.pc.cmake
+ ${CMAKE_CURRENT_BINARY_DIR}/pkgconfig/seastar.pc.cmake
+ @ONLY)
+
+file (GENERATE
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/seastar.pc
+ INPUT ${CMAKE_CURRENT_BINARY_DIR}/pkgconfig/seastar.pc.cmake)
+
+#
+# Installation and export.
+#
+
+if (Seastar_INSTALL)
+ include (CMakePackageConfigHelpers)
+ set (install_cmakedir ${CMAKE_INSTALL_LIBDIR}/cmake/Seastar)
+
+ install (
+ DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
+
+ install (
+ TARGETS seastar
+ EXPORT seastar-export
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
+
+ install (
+ EXPORT seastar-export
+ FILE SeastarTargets.cmake
+ NAMESPACE Seastar::
+ DESTINATION ${install_cmakedir})
+
+ write_basic_package_version_file (
+ ${CMAKE_CURRENT_BINARY_DIR}/SeastarConfigVersion.cmake
+ VERSION ${PROJECT_VERSION}
+ COMPATIBILITY ExactVersion)
+
+ configure_package_config_file (
+ ${CMAKE_CURRENT_LIST_DIR}/cmake/SeastarConfig.cmake.in
+ ${CMAKE_CURRENT_BINARY_DIR}/SeastarConfig.cmake
+ INSTALL_DESTINATION ${install_cmakedir})
+
+ install (
+ FILES
+ ${CMAKE_CURRENT_BINARY_DIR}/SeastarConfig.cmake
+ ${CMAKE_CURRENT_BINARY_DIR}/SeastarConfigVersion.cmake
+ DESTINATION ${install_cmakedir})
+
+ install (
+ FILES
+ ${CMAKE_CURRENT_SOURCE_DIR}/cmake/FindBoost.cmake
+ ${CMAKE_CURRENT_SOURCE_DIR}/cmake/FindGnuTLS.cmake
+ ${CMAKE_CURRENT_SOURCE_DIR}/cmake/FindLinuxMembarrier.cmake
+ ${CMAKE_CURRENT_SOURCE_DIR}/cmake/FindProtobuf.cmake
+ ${CMAKE_CURRENT_SOURCE_DIR}/cmake/FindSanitizers.cmake
+ ${CMAKE_CURRENT_SOURCE_DIR}/cmake/FindStdFilesystem.cmake
+ ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Findc-ares.cmake
+ ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Findcryptopp.cmake
+ ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Finddpdk.cmake
+ ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Findhwloc.cmake
+ ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Findlksctp-tools.cmake
+ ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Findlz4.cmake
+ ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Findnumactl.cmake
+ ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Findragel.cmake
+ ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Findrt.cmake
+ ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Finddl.cmake
+ ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Findyaml-cpp.cmake
+ DESTINATION ${install_cmakedir})
+
+ install (
+ DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/cmake/code_test
+ DESTINATION ${install_cmakedir})
+
+ install (
+ FILES ${CMAKE_CURRENT_BINARY_DIR}/seastar.pc
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
+
+ #
+ # Export targets from the build tree for the user package registry.
+ #
+
+ export (
+ EXPORT seastar-export
+ FILE ${CMAKE_CURRENT_BINARY_DIR}/SeastarTargets.cmake
+ NAMESPACE Seastar::)
+
+ export (PACKAGE Seastar)
+
+ #
+ # Packaging.
+ #
+
+ set (CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
+ set (CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR})
+ set (CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH})
+
+ include (CPack)
+endif ()
diff --git a/HACKING.md b/HACKING.md
new file mode 100644
index 00000000..d0c0da03
--- /dev/null
+++ b/HACKING.md
@@ -0,0 +1,138 @@
+# Developing and using Seastar
+
+## Configuring the project
+
+- Use `cmake-cooking` to prepare a development environment with all dependencies:
+
+```
+./cooking.sh -r dev
+```
+
+- The same as above, and enable DPDK support:
+
+```
+./cooking.sh -r dev -- -DSeastar_DPDK=ON
+```
+
+- Use system packages for all dependencies except `fmt`, `c-ares`, and `dpdk`, which are provided by `cmake-cooking` (and not yet widely available via system package-managers):
+
+```
+./cooking.sh -r dev -i c-ares -i fmt -i dpdk
+```
+
+- Use `cmake-cooking` for all dependencies except for Boost:
+
+```
+./cooking.sh -r dev -e Boost
+```
+
+- The same, but compile in "release" mode:
+
+```
+./cooking.sh -r dev -e Boost -t Release
+```
+
+## Building the project
+
+```
+cd build
+ninja
+```
+
+## Running tests
+
+Make sure you are in the "build" directory.
+
+- Run unit tests:
+
+```
+ninja test_unit
+```
+
+- Run distribution tests (these take a long time the first time, but then the dependencies are cached):
+
+```
+ninja test_dist
+```
+
+- Run all tests:
+
+```
+ninja test
+```
+
+- Build and run a specific test:
+
+```
+ninja test_unit_thread_run
+```
+
+
+## Building documentation
+
+Make sure you are in the "build" directory.
+
+- Build all documentation:
+
+```
+ninja docs
+```
+
+- Build the tutorial in HTML form:
+
+```
+ninja doc_tutorial_html
+```
+
+- Build the tutorial in HTML form (one file per chapter):
+
+```
+ninja doc_tutorial_html_split
+```
+
+- Build the Doxygen documentation:
+
+```
+ninja doc_html
+```
+
+## Installing the project
+
+Choose the install path:
+
+```
+./cooking.sh -r dev -- -DCMAKE_INSTALL_PREFIX=/my/install/path
+```
+
+```
+ninja -C build install
+```
+
+## Using Seastar in an application
+
+Once Seastar has been installed, it is sufficient to add a dependency on Seastar with
+
+```
+find_package (Seastar ${VERSION} REQUIRED)
+
+add_executable (my_program
+ my_program.cc)
+
+target_link_libraries (my_program
+ PRIVATE Seastar::seastar)
+```
+
+where `VERSION` is the desired version.
+
+If you'd like to use `cmake-cooking` to set up a development environment which includes Seastar and its dependencies (a "recipe"), you can include Seastar as follows:
+
+```
+cooking_ingredient (Seastar
+ SOURCE_DIR ${MY_SEASTAR_SOURCE_DIR}
+ COOKING_RECIPE dev
+ CMAKE_ARGS
+ -DSeastar_APPS=OFF
+ -DSeastar_DEMOS=OFF
+ -DSeastar_DOCS=OFF
+ -DSeastar_TESTING=OFF)
+```
diff --git a/README.md b/README.md
index 008d8846..004fcca1 100644
--- a/README.md
+++ b/README.md
@@ -11,7 +11,24 @@ It is based on [futures](http://en.wikipedia.org/wiki/Futures_and_promises).
Building Seastar
--------------------

-See instructions for [Fedora](doc/building-fedora.md), [CentOS](doc/building-centos.md) and [Ubuntu](doc/building-ubuntu.md).
+For more detailed instructions, read [HACKING.md](./HACKING.md).
+
+Configuring Seastar via
+
+```
+./cooking.sh -r dev
+```
+
+will create a localized development environment specific to Seastar by downloading, compiling, and installing all dependencies of the library.
+
+You can then compile:
+
+```
+$ cd build
+$ ninja
+```
+
+Alternatively, system packages (via RPM or APT packages, for example) can be used to supply dependencies as well. There are distribution-specific instructions for [Fedora](doc/building-fedora.md), [CentOS](doc/building-centos.md) and [Ubuntu](doc/building-ubuntu.md). In general, the `install-dependencies.sh` will attempt to install all necessary packages for your distribution.

There are also instructions for building on any host that supports [Docker](doc/building-docker.md).

diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt
new file mode 100644
index 00000000..4acfc51c
--- /dev/null
+++ b/app/CMakeLists.txt
@@ -0,0 +1,56 @@
+#
+# This file is open source software, licensed to you under the terms
+# of the Apache License, Version 2.0 (the "License"). See the NOTICE file
+# distributed with this work for additional information regarding copyright
+# ownership. You may not use this file except in compliance with the License.
+#
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# Copyright (C) 2018 Scylladb, Ltd.
+#
+
+# Logical target for all applications.
+add_custom_target (apps)
+
+macro (seastar_add_app name)
+ set (args ${ARGN})
+
+ cmake_parse_arguments (
+ parsed_args
+ ""
+ ""
+ "SOURCES"
+ ${args})
+
+ set (target app_${name})
+ add_executable (${target} ${parsed_args_SOURCES})
+
+ target_include_directories (${target}
+ PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
+
+ target_link_libraries (${target}
+ PRIVATE seastar)
+
+ set_target_properties (${target}
+ PROPERTIES
+ OUTPUT_NAME ${name})
+
+ add_dependencies (apps ${target})
+endmacro ()
+
+add_subdirectory (httpd)
+add_subdirectory (io_tester)
+add_subdirectory (iotune)
+add_subdirectory (memcached)
+add_subdirectory (seawreck)
diff --git a/app/httpd/CMakeLists.txt b/app/httpd/CMakeLists.txt
new file mode 100644
index 00000000..a6747e1c
--- /dev/null
+++ b/app/httpd/CMakeLists.txt
@@ -0,0 +1,36 @@
+#
+# This file is open source software, licensed to you under the terms
+# of the Apache License, Version 2.0 (the "License"). See the NOTICE file
+# distributed with this work for additional information regarding copyright
+# ownership. You may not use this file except in compliance with the License.
+#
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# Copyright (C) 2018 Scylladb, Ltd.
+#
+
+seastar_generate_swagger (app_httpd_swagger
+ app_httpd_swagger_file
+ ${CMAKE_CURRENT_SOURCE_DIR}/demo.json
+ ${CMAKE_CURRENT_BINARY_DIR}/demo.json.hh)
+
+seastar_add_app (httpd
+ SOURCES
+ ${app_httpd_swagger_file}
+ main.cc)
+
+target_include_directories (app_httpd
+ PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
+
+add_dependencies (app_httpd app_httpd_swagger)
diff --git a/app/httpd/main.cc b/app/httpd/main.cc
index bdbf960f..62af9434 100644
--- a/app/httpd/main.cc
+++ b/app/httpd/main.cc
@@ -23,7 +23,7 @@
#include <seastar/http/handlers.hh>
#include <seastar/http/function_handlers.hh>
#include <seastar/http/file_handler.hh>
-#include <seastar/app/httpd/demo.json.hh>
+#include "demo.json.hh"
#include <seastar/http/api_docs.hh>

namespace bpo = boost::program_options;
diff --git a/app/io_tester/CMakeLists.txt b/app/io_tester/CMakeLists.txt
new file mode 100644
index 00000000..266ff4e5
--- /dev/null
+++ b/app/io_tester/CMakeLists.txt
@@ -0,0 +1,27 @@
+#
+# This file is open source software, licensed to you under the terms
+# of the Apache License, Version 2.0 (the "License"). See the NOTICE file
+# distributed with this work for additional information regarding copyright
+# ownership. You may not use this file except in compliance with the License.
+#
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# Copyright (C) 2018 Scylladb, Ltd.
+#
+
+seastar_add_app (io_tester
+ SOURCES io_tester.cc)
+
+target_link_libraries (app_io_tester
+ PRIVATE yaml-cpp::yaml-cpp)
diff --git a/app/iotune/CMakeLists.txt b/app/iotune/CMakeLists.txt
new file mode 100644
index 00000000..18788c14
--- /dev/null
+++ b/app/iotune/CMakeLists.txt
@@ -0,0 +1,29 @@
+#
+# This file is open source software, licensed to you under the terms
+# of the Apache License, Version 2.0 (the "License"). See the NOTICE file
+# distributed with this work for additional information regarding copyright
+# ownership. You may not use this file except in compliance with the License.
+#
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# Copyright (C) 2018 Scylladb, Ltd.
+#
+
+seastar_add_app (iotune
+ SOURCES iotune.cc)
+
+target_link_libraries (app_iotune
+ PRIVATE
+ StdFilesystem::filesystem
+ yaml-cpp::yaml-cpp)
diff --git a/app/memcached/CMakeLists.txt b/app/memcached/CMakeLists.txt
new file mode 100644
index 00000000..e90b0a1e
--- /dev/null
+++ b/app/memcached/CMakeLists.txt
@@ -0,0 +1,48 @@
+#
+# This file is open source software, licensed to you under the terms
+# of the Apache License, Version 2.0 (the "License"). See the NOTICE file
+# distributed with this work for additional information regarding copyright
+# ownership. You may not use this file except in compliance with the License.
+#
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# Copyright (C) 2018 Scylladb, Ltd.
+#
+
+set (Seastar_APP_MEMCACHED_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
+set (Seastar_APP_MEMCACHED_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
+
+seastar_generate_ragel (app_memcached_ascii
+ app_memcached_ascii_file
+ ${CMAKE_CURRENT_SOURCE_DIR}/ascii.rl
+ ${CMAKE_CURRENT_BINARY_DIR}/ascii.hh)
+
+seastar_add_app (memcached
+ SOURCES
+ ${app_memcached_ascii_file}
+ memcache.cc
+ memcached.hh)
+
+target_include_directories (app_memcached
+ PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
+
+add_dependencies (app_memcached app_memcached_ascii)
+
+#
+# Tests.
+#
+
+if (Seastar_TESTING)
+ add_subdirectory (test)
+endif ()
diff --git a/app/memcached/ascii.rl b/app/memcached/ascii.rl
index 44163f57..04d161ff 100644
--- a/app/memcached/ascii.rl
+++ b/app/memcached/ascii.rl
@@ -20,7 +20,7 @@
*/

#include <seastar/core/ragel.hh>
-#include "app/memcached/memcached.hh"
+#include "memcached.hh"
#include <memory>
#include <algorithm>
#include <functional>
diff --git a/app/memcached/memcache.cc b/app/memcached/memcache.cc
index 437a47a1..4e349270 100644
--- a/app/memcached/memcache.cc
+++ b/app/memcached/memcache.cc
@@ -40,9 +40,8 @@
#include <seastar/core/align.hh>
#include <seastar/net/api.hh>
#include <seastar/net/packet-data-source.hh>
-// These two paths are non-conventional due to limitations in `configure.py`.
-#include <seastar/app/memcached/ascii.hh>
-#include "app/memcached/memcached.hh"
+#include "ascii.hh"
+#include "memcached.hh"
#include <unistd.h>

#define PLATFORM "seastar"
diff --git a/app/memcached/test/CMakeLists.txt b/app/memcached/test/CMakeLists.txt
new file mode 100644
index 00000000..6723c9e1
--- /dev/null
+++ b/app/memcached/test/CMakeLists.txt
@@ -0,0 +1,56 @@
+#
+# This file is open source software, licensed to you under the terms
+# of the Apache License, Version 2.0 (the "License"). See the NOTICE file
+# distributed with this work for additional information regarding copyright
+# ownership. You may not use this file except in compliance with the License.
+#
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# Copyright (C) 2018 Scylladb, Ltd.
+#
+
+add_custom_target (app_memcached_test_memcached_run
+ DEPENDS
+ ${memcached_app}
+ ${CMAKE_CURRENT_SOURCE_DIR}/test.py
+ ${CMAKE_CURRENT_SOURCE_DIR}/test_memcached.py
+ COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/test.py --memcached $<TARGET_FILE:app_memcached>
+ USES_TERMINAL)
+
+add_test (
+ NAME Seastar.app.memcached.memcached
+ COMMAND ${CMAKE_COMMAND} --build ${Seastar_BINARY_DIR} --target app_memcached_test_memcached_run)
+
+add_executable (app_memcached_test_ascii
+ test_ascii_parser.cc)
+
+add_dependencies (app_memcached_test_ascii app_memcached)
+
+target_include_directories (app_memcached_test_ascii
+ PRIVATE
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${Seastar_APP_MEMCACHED_BINARY_DIR}
+ ${Seastar_APP_MEMCACHED_SOURCE_DIR})
+
+target_link_libraries (app_memcached_test_ascii
+ PRIVATE seastar_testing)
+
+add_custom_target (app_memcached_test_ascii_run
+ DEPENDS app_memcached_test_ascii
+ COMMAND app_memcached_test_ascii -- -c 2
+ USES_TERMINAL)
+
+add_test (
+ NAME Seastar.app.memcached.ascii
+ COMMAND ${CMAKE_COMMAND} --build ${Seastar_BINARY_DIR} --target app_memcached_test_ascii_run)
diff --git a/app/memcached/test/test_ascii_parser.cc b/app/memcached/test/test_ascii_parser.cc
index a713863b..2a71b70d 100644
--- a/app/memcached/test/test_ascii_parser.cc
+++ b/app/memcached/test/test_ascii_parser.cc
@@ -24,8 +24,7 @@
#include "test-utils.hh"
#include <seastar/core/shared_ptr.hh>
#include <seastar/net/packet-data-source.hh>
-// Non-conventional path due to limitations of `configure.py`.
-#include <seastar/app/memcached/ascii.hh>
+#include "ascii.hh"
#include <seastar/core/future-util.hh>

using namespace seastar;
diff --git a/app/seawreck/CMakeLists.txt b/app/seawreck/CMakeLists.txt
new file mode 100644
index 00000000..f9ffd357
--- /dev/null
+++ b/app/seawreck/CMakeLists.txt
@@ -0,0 +1,24 @@
+#
+# This file is open source software, licensed to you under the terms
+# of the Apache License, Version 2.0 (the "License"). See the NOTICE file
+# distributed with this work for additional information regarding copyright
+# ownership. You may not use this file except in compliance with the License.
+#
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# Copyright (C) 2018 Scylladb, Ltd.
+#
+
+seastar_add_app (seawreck
+ SOURCES seawreck.cc)
diff --git a/app/seawreck/seawreck.cc b/app/seawreck/seawreck.cc
index b6a4be39..f46e119f 100644
--- a/app/seawreck/seawreck.cc
+++ b/app/seawreck/seawreck.cc
@@ -19,7 +19,7 @@
* Copyright (C) 2015 Cloudius Systems, Ltd.
*/

-#include <seastar/http/http_response_parser.hh>
+#include <seastar/http/response_parser.hh>
#include <seastar/core/print.hh>
#include <seastar/core/reactor.hh>
#include <seastar/core/app-template.hh>
diff --git a/cmake/FindBoost.cmake b/cmake/FindBoost.cmake
new file mode 100644
index 00000000..1771d1bc
--- /dev/null
+++ b/cmake/FindBoost.cmake
@@ -0,0 +1,2098 @@
+# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
+# file Copyright.txt or https://cmake.org/licensing for details.
+
+#.rst:
+# FindBoost
+# ---------
+#
+# Find Boost include dirs and libraries
+#
+# Use this module by invoking find_package with the form::
+#
+# find_package(Boost
+# [version] [EXACT] # Minimum or EXACT version e.g. 1.67.0
+# [REQUIRED] # Fail with error if Boost is not found
+# [COMPONENTS <libs>...] # Boost libraries by their canonical name
+# # e.g. "date_time" for "libboost_date_time"
+# [OPTIONAL_COMPONENTS <libs>...]
+# # Optional Boost libraries by their canonical name)
+# ) # e.g. "date_time" for "libboost_date_time"
+#
+# This module finds headers and requested component libraries OR a CMake
+# package configuration file provided by a "Boost CMake" build. For the
+# latter case skip to the "Boost CMake" section below. For the former
+# case results are reported in variables::
+#
+# Boost_FOUND - True if headers and requested libraries were found
+# Boost_INCLUDE_DIRS - Boost include directories
+# Boost_LIBRARY_DIRS - Link directories for Boost libraries
+# Boost_LIBRARIES - Boost component libraries to be linked
+# Boost_<C>_FOUND - True if component <C> was found (<C> is upper-case)
+# Boost_<C>_LIBRARY - Libraries to link for component <C> (may include
+# target_link_libraries debug/optimized keywords)
+# Boost_VERSION - BOOST_VERSION value from boost/version.hpp
+# Boost_LIB_VERSION - Version string appended to library filenames
+# Boost_MAJOR_VERSION - Boost major version number (X in X.y.z)
+# Boost_MINOR_VERSION - Boost minor version number (Y in x.Y.z)
+# Boost_SUBMINOR_VERSION - Boost subminor version number (Z in x.y.Z)
+# Boost_LIB_DIAGNOSTIC_DEFINITIONS (Windows)
+# - Pass to add_definitions() to have diagnostic
+# information about Boost's automatic linking
+# displayed during compilation
+#
+# Note that Boost Python components require a Python version suffix
+# (Boost 1.67 and later), e.g. ``python36`` or ``python27`` for the
+# versions built against Python 3.6 and 2.7, respectively. This also
+# applies to additional components using Python including
+# ``mpi_python`` and ``numpy``. Earlier Boost releases may use
+# distribution-specific suffixes such as ``2``, ``3`` or ``2.7``.
+# These may also be used as suffixes, but note that they are not
+# portable.
+#
+# This module reads hints about search locations from variables::
+#
+# BOOST_ROOT - Preferred installation prefix
+# (or BOOSTROOT)
+# BOOST_INCLUDEDIR - Preferred include directory e.g. <prefix>/include
+# BOOST_LIBRARYDIR - Preferred library directory e.g. <prefix>/lib
+# Boost_NO_SYSTEM_PATHS - Set to ON to disable searching in locations not
+# specified by these hint variables. Default is OFF.
+# Boost_ADDITIONAL_VERSIONS
+# - List of Boost versions not known to this module
+# (Boost install locations may contain the version)
+#
+# and saves search results persistently in CMake cache entries::
+#
+# Boost_INCLUDE_DIR - Directory containing Boost headers
+# Boost_LIBRARY_DIR_RELEASE - Directory containing release Boost libraries
+# Boost_LIBRARY_DIR_DEBUG - Directory containing debug Boost libraries
+# Boost_<C>_LIBRARY_DEBUG - Component <C> library debug variant
+# Boost_<C>_LIBRARY_RELEASE - Component <C> library release variant
+#
+# The following :prop_tgt:`IMPORTED` targets are also defined::
+#
+# Boost::boost - Target for header-only dependencies
+# (Boost include directory)
+# Boost::<C> - Target for specific component dependency
+# (shared or static library); <C> is lower-
+# case
+# Boost::diagnostic_definitions - interface target to enable diagnostic
+# information about Boost's automatic linking
+# during compilation (adds BOOST_LIB_DIAGNOSTIC)
+# Boost::disable_autolinking - interface target to disable automatic
+# linking with MSVC (adds BOOST_ALL_NO_LIB)
+# Boost::dynamic_linking - interface target to enable dynamic linking
+# linking with MSVC (adds BOOST_ALL_DYN_LINK)
+#
+# Implicit dependencies such as Boost::filesystem requiring
+# Boost::system will be automatically detected and satisfied, even
+# if system is not specified when using find_package and if
+# Boost::system is not added to target_link_libraries. If using
+# Boost::thread, then Threads::Threads will also be added automatically.
+#
+# It is important to note that the imported targets behave differently
+# than variables created by this module: multiple calls to
+# find_package(Boost) in the same directory or sub-directories with
+# different options (e.g. static or shared) will not override the
+# values of the targets created by the first call.
+#
+# Users may set these hints or results as cache entries. Projects
+# should not read these entries directly but instead use the above
+# result variables. Note that some hint names start in upper-case
+# "BOOST". One may specify these as environment variables if they are
+# not specified as CMake variables or cache entries.
+#
+# This module first searches for the Boost header files using the above
+# hint variables (excluding BOOST_LIBRARYDIR) and saves the result in
+# Boost_INCLUDE_DIR. Then it searches for requested component libraries
+# using the above hints (excluding BOOST_INCLUDEDIR and
+# Boost_ADDITIONAL_VERSIONS), "lib" directories near Boost_INCLUDE_DIR,
+# and the library name configuration settings below. It saves the
+# library directories in Boost_LIBRARY_DIR_DEBUG and
+# Boost_LIBRARY_DIR_RELEASE and individual library
+# locations in Boost_<C>_LIBRARY_DEBUG and Boost_<C>_LIBRARY_RELEASE.
+# When one changes settings used by previous searches in the same build
+# tree (excluding environment variables) this module discards previous
+# search results affected by the changes and searches again.
+#
+# Boost libraries come in many variants encoded in their file name.
+# Users or projects may tell this module which variant to find by
+# setting variables::
+#
+# Boost_USE_DEBUG_LIBS - Set to ON or OFF to specify whether to search
+# and use the debug libraries. Default is ON.
+# Boost_USE_RELEASE_LIBS - Set to ON or OFF to specify whether to search
+# and use the release libraries. Default is ON.
+# Boost_USE_MULTITHREADED - Set to OFF to use the non-multithreaded
+# libraries ('mt' tag). Default is ON.
+# Boost_USE_STATIC_LIBS - Set to ON to force the use of the static
+# libraries. Default is OFF.
+# Boost_USE_STATIC_RUNTIME - Set to ON or OFF to specify whether to use
+# libraries linked statically to the C++ runtime
+# ('s' tag). Default is platform dependent.
+# Boost_USE_DEBUG_RUNTIME - Set to ON or OFF to specify whether to use
+# libraries linked to the MS debug C++ runtime
+# ('g' tag). Default is ON.
+# Boost_USE_DEBUG_PYTHON - Set to ON to use libraries compiled with a
+# debug Python build ('y' tag). Default is OFF.
+# Boost_USE_STLPORT - Set to ON to use libraries compiled with
+# STLPort ('p' tag). Default is OFF.
+# Boost_USE_STLPORT_DEPRECATED_NATIVE_IOSTREAMS
+# - Set to ON to use libraries compiled with
+# STLPort deprecated "native iostreams"
+# ('n' tag). Default is OFF.
+# Boost_COMPILER - Set to the compiler-specific library suffix
+# (e.g. "-gcc43"). Default is auto-computed
+# for the C++ compiler in use. A list may be
+# used if multiple compatible suffixes should
+# be tested for, in decreasing order of
+# preference.
+# Boost_THREADAPI - Suffix for "thread" component library name,
+# such as "pthread" or "win32". Names with
+# and without this suffix will both be tried.
+# Boost_NAMESPACE - Alternate namespace used to build boost with
+# e.g. if set to "myboost", will search for
+# myboost_thread instead of boost_thread.
+#
+# Other variables one may set to control this module are::
+#
+# Boost_DEBUG - Set to ON to enable debug output from FindBoost.
+# Please enable this before filing any bug report.
+# Boost_DETAILED_FAILURE_MSG
+# - Set to ON to add detailed information to the
+# failure message even when the REQUIRED option
+# is not given to the find_package call.
+# Boost_REALPATH - Set to ON to resolve symlinks for discovered
+# libraries to assist with packaging. For example,
+# the "system" component library may be resolved to
+# "/usr/lib/libboost_system.so.1.67.0" instead of
+# "/usr/lib/libboost_system.so". This does not
+# affect linking and should not be enabled unless
+# the user needs this information.
+# Boost_LIBRARY_DIR - Default value for Boost_LIBRARY_DIR_RELEASE and
+# Boost_LIBRARY_DIR_DEBUG.
+#
+# On Visual Studio and Borland compilers Boost headers request automatic
+# linking to corresponding libraries. This requires matching libraries
+# to be linked explicitly or available in the link library search path.
+# In this case setting Boost_USE_STATIC_LIBS to OFF may not achieve
+# dynamic linking. Boost automatic linking typically requests static
+# libraries with a few exceptions (such as Boost.Python). Use::
+#
+# add_definitions(${Boost_LIB_DIAGNOSTIC_DEFINITIONS})
+#
+# to ask Boost to report information about automatic linking requests.
+#
+# Example to find Boost headers only::
+#
+# find_package(Boost 1.36.0)
+# if(Boost_FOUND)
+# include_directories(${Boost_INCLUDE_DIRS})
+# add_executable(foo foo.cc)
+# endif()
+#
+# Example to find Boost libraries and use imported targets::
+#
+# find_package(Boost 1.56 REQUIRED COMPONENTS
+# date_time filesystem iostreams)
+# add_executable(foo foo.cc)
+# target_link_libraries(foo Boost::date_time Boost::filesystem
+# Boost::iostreams)
+#
+# Example to find Boost Python 3.6 libraries and use imported targets::
+#
+# find_package(Boost 1.67 REQUIRED COMPONENTS
+# python36 numpy36)
+# add_executable(foo foo.cc)
+# target_link_libraries(foo Boost::python36 Boost::numpy36)
+#
+# Example to find Boost headers and some *static* (release only) libraries::
+#
+# set(Boost_USE_STATIC_LIBS ON) # only find static libs
+# set(Boost_USE_DEBUG_LIBS OFF) # ignore debug libs and
+# set(Boost_USE_RELEASE_LIBS ON) # only find release libs
+# set(Boost_USE_MULTITHREADED ON)
+# set(Boost_USE_STATIC_RUNTIME OFF)
+# find_package(Boost 1.66.0 COMPONENTS date_time filesystem system ...)
+# if(Boost_FOUND)
+# include_directories(${Boost_INCLUDE_DIRS})
+# add_executable(foo foo.cc)
+# target_link_libraries(foo ${Boost_LIBRARIES})
+# endif()
+#
+# Boost CMake
+# ^^^^^^^^^^^
+#
+# If Boost was built using the boost-cmake project it provides a package
+# configuration file for use with find_package's Config mode. This
+# module looks for the package configuration file called
+# BoostConfig.cmake or boost-config.cmake and stores the result in cache
+# entry "Boost_DIR". If found, the package configuration file is loaded
+# and this module returns with no further action. See documentation of
+# the Boost CMake package configuration for details on what it provides.
+#
+# Set Boost_NO_BOOST_CMAKE to ON to disable the search for boost-cmake.
+
+# Save project's policies
+cmake_policy(PUSH)
+cmake_policy(SET CMP0057 NEW) # if IN_LIST
+
+#-------------------------------------------------------------------------------
+# Before we go searching, check whether boost-cmake is available, unless the
+# user specifically asked NOT to search for boost-cmake.
+#
+# If Boost_DIR is set, this behaves as any find_package call would. If not,
+# it looks at BOOST_ROOT and BOOSTROOT to find Boost.
+#
+if (NOT Boost_NO_BOOST_CMAKE)
+ # If Boost_DIR is not set, look for BOOSTROOT and BOOST_ROOT as alternatives,
+ # since these are more conventional for Boost.
+ if ("$ENV{Boost_DIR}" STREQUAL "")
+ if (NOT "$ENV{BOOST_ROOT}" STREQUAL "")
+ set(ENV{Boost_DIR} $ENV{BOOST_ROOT})
+ elseif (NOT "$ENV{BOOSTROOT}" STREQUAL "")
+ set(ENV{Boost_DIR} $ENV{BOOSTROOT})
+ endif()
+ endif()
+
+ # Do the same find_package call but look specifically for the CMake version.
+ # Note that args are passed in the Boost_FIND_xxxxx variables, so there is no
+ # need to delegate them to this find_package call.
+ find_package(Boost QUIET NO_MODULE)
+ mark_as_advanced(Boost_DIR)
+
+ # If we found boost-cmake, then we're done. Print out what we found.
+ # Otherwise let the rest of the module try to find it.
+ if (Boost_FOUND)
+ message(STATUS "Boost ${Boost_FIND_VERSION} found.")
+ if (Boost_FIND_COMPONENTS)
+ message(STATUS "Found Boost components:\n ${Boost_FIND_COMPONENTS}")
+ endif()
+ # Restore project's policies
+ cmake_policy(POP)
+ return()
+ endif()
+endif()
+
+
+#-------------------------------------------------------------------------------
+# FindBoost functions & macros
+#
+
+############################################
+#
+# Check the existence of the libraries.
+#
+############################################
+# This macro was taken directly from the FindQt4.cmake file that is included
+# with the CMake distribution. This is NOT my work. All work was done by the
+# original authors of the FindQt4.cmake file. Only minor modifications were
+# made to remove references to Qt and make this file more generally applicable
+# And ELSE/ENDIF pairs were removed for readability.
+#########################################################################
+
+macro(_Boost_ADJUST_LIB_VARS basename)
+ if(Boost_INCLUDE_DIR )
+ if(Boost_${basename}_LIBRARY_DEBUG AND Boost_${basename}_LIBRARY_RELEASE)
+ # if the generator is multi-config or if CMAKE_BUILD_TYPE is set for
+ # single-config generators, set optimized and debug libraries
+ get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
+ if(_isMultiConfig OR CMAKE_BUILD_TYPE)
+ set(Boost_${basename}_LIBRARY optimized ${Boost_${basename}_LIBRARY_RELEASE} debug ${Boost_${basename}_LIBRARY_DEBUG})
+ else()
+ # For single-config generators where CMAKE_BUILD_TYPE has no value,
+ # just use the release libraries
+ set(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY_RELEASE} )
+ endif()
+ # FIXME: This probably should be set for both cases
+ set(Boost_${basename}_LIBRARIES optimized ${Boost_${basename}_LIBRARY_RELEASE} debug ${Boost_${basename}_LIBRARY_DEBUG})
+ endif()
+
+ # if only the release version was found, set the debug variable also to the release version
+ if(Boost_${basename}_LIBRARY_RELEASE AND NOT Boost_${basename}_LIBRARY_DEBUG)
+ set(Boost_${basename}_LIBRARY_DEBUG ${Boost_${basename}_LIBRARY_RELEASE})
+ set(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY_RELEASE})
+ set(Boost_${basename}_LIBRARIES ${Boost_${basename}_LIBRARY_RELEASE})
+ endif()
+
+ # if only the debug version was found, set the release variable also to the debug version
+ if(Boost_${basename}_LIBRARY_DEBUG AND NOT Boost_${basename}_LIBRARY_RELEASE)
+ set(Boost_${basename}_LIBRARY_RELEASE ${Boost_${basename}_LIBRARY_DEBUG})
+ set(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY_DEBUG})
+ set(Boost_${basename}_LIBRARIES ${Boost_${basename}_LIBRARY_DEBUG})
+ endif()
+
+ # If the debug & release library ends up being the same, omit the keywords
+ if("${Boost_${basename}_LIBRARY_RELEASE}" STREQUAL "${Boost_${basename}_LIBRARY_DEBUG}")
+ set(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY_RELEASE} )
+ set(Boost_${basename}_LIBRARIES ${Boost_${basename}_LIBRARY_RELEASE} )
+ endif()
+
+ if(Boost_${basename}_LIBRARY AND Boost_${basename}_HEADER)
+ set(Boost_${basename}_FOUND ON)
+ if("x${basename}" STREQUAL "xTHREAD" AND NOT TARGET Threads::Threads)
+ string(APPEND Boost_ERROR_REASON_THREAD " (missing dependency: Threads)")
+ set(Boost_THREAD_FOUND OFF)
+ endif()
+ endif()
+
+ endif()
+ # Make variables changeable to the advanced user
+ mark_as_advanced(
+ Boost_${basename}_LIBRARY_RELEASE
+ Boost_${basename}_LIBRARY_DEBUG
+ )
+endmacro()
+
+# Detect changes in used variables.
+# Compares the current variable value with the last one.
+# In short form:
+# v != v_LAST -> CHANGED = 1
+# v is defined, v_LAST not -> CHANGED = 1
+# v is not defined, but v_LAST is -> CHANGED = 1
+# otherwise -> CHANGED = 0
+# CHANGED is returned in variable named ${changed_var}
+macro(_Boost_CHANGE_DETECT changed_var)
+ set(${changed_var} 0)
+ foreach(v ${ARGN})
+ if(DEFINED _Boost_COMPONENTS_SEARCHED)
+ if(${v})
+ if(_${v}_LAST)
+ string(COMPARE NOTEQUAL "${${v}}" "${_${v}_LAST}" _${v}_CHANGED)
+ else()
+ set(_${v}_CHANGED 1)
+ endif()
+ elseif(_${v}_LAST)
+ set(_${v}_CHANGED 1)
+ endif()
+ if(_${v}_CHANGED)
+ set(${changed_var} 1)
+ endif()
+ else()
+ set(_${v}_CHANGED 0)
+ endif()
+ endforeach()
+endmacro()
+
+#
+# Find the given library (var).
+# Use 'build_type' to support different lib paths for RELEASE or DEBUG builds
+#
+macro(_Boost_FIND_LIBRARY var build_type)
+
+ find_library(${var} ${ARGN})
+
+ if(${var})
+ # If this is the first library found then save Boost_LIBRARY_DIR_[RELEASE,DEBUG].
+ if(NOT Boost_LIBRARY_DIR_${build_type})
+ get_filename_component(_dir "${${var}}" PATH)
+ set(Boost_LIBRARY_DIR_${build_type} "${_dir}" CACHE PATH "Boost library directory ${build_type}" FORCE)
+ endif()
+ elseif(_Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT)
+ # Try component-specific hints but do not save Boost_LIBRARY_DIR_[RELEASE,DEBUG].
+ find_library(${var} HINTS ${_Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT} ${ARGN})
+ endif()
+
+ # If Boost_LIBRARY_DIR_[RELEASE,DEBUG] is known then search only there.
+ if(Boost_LIBRARY_DIR_${build_type})
+ set(_boost_LIBRARY_SEARCH_DIRS_${build_type} ${Boost_LIBRARY_DIR_${build_type}} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
+ if(Boost_DEBUG)
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ " Boost_LIBRARY_DIR_${build_type} = ${Boost_LIBRARY_DIR_${build_type}}"
+ " _boost_LIBRARY_SEARCH_DIRS_${build_type} = ${_boost_LIBRARY_SEARCH_DIRS_${build_type}}")
+ endif()
+ endif()
+endmacro()
+
+#-------------------------------------------------------------------------------
+
+#
+# Runs compiler with "-dumpversion" and parses major/minor
+# version with a regex.
+#
+function(_Boost_COMPILER_DUMPVERSION _OUTPUT_VERSION)
+ string(REGEX REPLACE "([0-9]+)\\.([0-9]+)(\\.[0-9]+)?" "\\1\\2"
+ _boost_COMPILER_VERSION ${CMAKE_CXX_COMPILER_VERSION})
+
+ set(${_OUTPUT_VERSION} ${_boost_COMPILER_VERSION} PARENT_SCOPE)
+endfunction()
+
+#
+# Take a list of libraries with "thread" in it
+# and prepend duplicates with "thread_${Boost_THREADAPI}"
+# at the front of the list
+#
+function(_Boost_PREPEND_LIST_WITH_THREADAPI _output)
+ set(_orig_libnames ${ARGN})
+ string(REPLACE "thread" "thread_${Boost_THREADAPI}" _threadapi_libnames "${_orig_libnames}")
+ set(${_output} ${_threadapi_libnames} ${_orig_libnames} PARENT_SCOPE)
+endfunction()
+
+#
+# If a library is found, replace its cache entry with its REALPATH
+#
+function(_Boost_SWAP_WITH_REALPATH _library _docstring)
+ if(${_library})
+ get_filename_component(_boost_filepathreal ${${_library}} REALPATH)
+ unset(${_library} CACHE)
+ set(${_library} ${_boost_filepathreal} CACHE FILEPATH "${_docstring}")
+ endif()
+endfunction()
+
+function(_Boost_CHECK_SPELLING _var)
+ if(${_var})
+ string(TOUPPER ${_var} _var_UC)
+ message(FATAL_ERROR "ERROR: ${_var} is not the correct spelling. The proper spelling is ${_var_UC}.")
+ endif()
+endfunction()
+
+# Guesses Boost's compiler prefix used in built library names
+# Returns the guess by setting the variable pointed to by _ret
+function(_Boost_GUESS_COMPILER_PREFIX _ret)
+ if("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xIntel")
+ if(WIN32)
+ set (_boost_COMPILER "-iw")
+ else()
+ set (_boost_COMPILER "-il")
+ endif()
+ elseif (GHSMULTI)
+ set(_boost_COMPILER "-ghs")
+ elseif("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xMSVC")
+ if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.10)
+ set(_boost_COMPILER "-vc141;-vc140")
+ elseif (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19)
+ set(_boost_COMPILER "-vc140")
+ elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 18)
+ set(_boost_COMPILER "-vc120")
+ elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 17)
+ set(_boost_COMPILER "-vc110")
+ elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16)
+ set(_boost_COMPILER "-vc100")
+ elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15)
+ set(_boost_COMPILER "-vc90")
+ elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 14)
+ set(_boost_COMPILER "-vc80")
+ elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13.10)
+ set(_boost_COMPILER "-vc71")
+ elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13) # Good luck!
+ set(_boost_COMPILER "-vc7") # yes, this is correct
+ else() # VS 6.0 Good luck!
+ set(_boost_COMPILER "-vc6") # yes, this is correct
+ endif()
+ elseif (BORLAND)
+ set(_boost_COMPILER "-bcb")
+ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "SunPro")
+ set(_boost_COMPILER "-sw")
+ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "XL")
+ set(_boost_COMPILER "-xlc")
+ elseif (MINGW)
+ if(${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION} VERSION_LESS 1.34)
+ set(_boost_COMPILER "-mgw") # no GCC version encoding prior to 1.34
+ else()
+ _Boost_COMPILER_DUMPVERSION(_boost_COMPILER_VERSION)
+ set(_boost_COMPILER "-mgw${_boost_COMPILER_VERSION}")
+ endif()
+ elseif (UNIX)
+ if (CMAKE_COMPILER_IS_GNUCXX)
+ if(${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION} VERSION_LESS 1.34)
+ set(_boost_COMPILER "-gcc") # no GCC version encoding prior to 1.34
+ else()
+ _Boost_COMPILER_DUMPVERSION(_boost_COMPILER_VERSION)
+ # Determine which version of GCC we have.
+ if(APPLE)
+ if(Boost_MINOR_VERSION)
+ if(${Boost_MINOR_VERSION} GREATER 35)
+ # In Boost 1.36.0 and newer, the mangled compiler name used
+ # on Mac OS X/Darwin is "xgcc".
+ set(_boost_COMPILER "-xgcc${_boost_COMPILER_VERSION}")
+ else()
+ # In Boost <= 1.35.0, there is no mangled compiler name for
+ # the Mac OS X/Darwin version of GCC.
+ set(_boost_COMPILER "")
+ endif()
+ else()
+ # We don't know the Boost version, so assume it's
+ # pre-1.36.0.
+ set(_boost_COMPILER "")
+ endif()
+ else()
+ set(_boost_COMPILER "-gcc${_boost_COMPILER_VERSION}")
+ endif()
+ endif()
+ endif ()
+ else()
+ # TODO at least Boost_DEBUG here?
+ set(_boost_COMPILER "")
+ endif()
+ set(${_ret} ${_boost_COMPILER} PARENT_SCOPE)
+endfunction()
+
+#
+# Get component dependencies. Requires the dependencies to have been
+# defined for the Boost release version.
+#
+# component - the component to check
+# _ret - list of library dependencies
+#
+function(_Boost_COMPONENT_DEPENDENCIES component _ret)
+ # Note: to add a new Boost release, run
+ #
+ # % cmake -DBOOST_DIR=/path/to/boost/source -P Utilities/Scripts/BoostScanDeps.cmake
+ #
+ # The output may be added in a new block below. If it's the same as
+ # the previous release, simply update the version range of the block
+ # for the previous release. Also check if any new components have
+ # been added, and add any new components to
+ # _Boost_COMPONENT_HEADERS.
+ #
+ # This information was originally generated by running
+ # BoostScanDeps.cmake against every boost release to date supported
+ # by FindBoost:
+ #
+ # % for version in /path/to/boost/sources/*
+ # do
+ # cmake -DBOOST_DIR=$version -P Utilities/Scripts/BoostScanDeps.cmake
+ # done
+ #
+ # The output was then updated by search and replace with these regexes:
+ #
+ # - Strip message(STATUS) prefix dashes
+ # s;^-- ;;
+ # - Indent
+ # s;^set(; set(;;
+ # - Add conditionals
+ # s;Scanning /path/to/boost/sources/boost_\(.*\)_\(.*\)_\(.*); elseif(NOT Boost_VERSION VERSION_LESS \10\20\3 AND Boost_VERSION VERSION_LESS xxxx);
+ #
+ # This results in the logic seen below, but will require the xxxx
+ # replacing with the following Boost release version (or the next
+ # minor version to be released, e.g. 1.59 was the latest at the time
+ # of writing, making 1.60 the next, so 106000 is the needed version
+ # number). Identical consecutive releases were then merged together
+ # by updating the end range of the first block and removing the
+ # following redundant blocks.
+ #
+ # Running the script against all historical releases should be
+ # required only if the BoostScanDeps.cmake script logic is changed.
+ # The addition of a new release should only require it to be run
+ # against the new release.
+
+ # Handle Python version suffixes
+ if(component MATCHES "^(python|mpi_python|numpy)([0-9][0-9]?|[0-9]\\.[0-9])\$")
+ set(component "${CMAKE_MATCH_1}")
+ set(component_python_version "${CMAKE_MATCH_2}")
+ endif()
+
+ set(_Boost_IMPORTED_TARGETS TRUE)
+ if(Boost_VERSION VERSION_LESS 103300)
+ message(WARNING "Imported targets and dependency information not available for Boost version ${Boost_VERSION} (all versions older than 1.33)")
+ set(_Boost_IMPORTED_TARGETS FALSE)
+ elseif(NOT Boost_VERSION VERSION_LESS 103300 AND Boost_VERSION VERSION_LESS 103500)
+ set(_Boost_IOSTREAMS_DEPENDENCIES regex thread)
+ set(_Boost_REGEX_DEPENDENCIES thread)
+ set(_Boost_WAVE_DEPENDENCIES filesystem thread)
+ set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+ elseif(NOT Boost_VERSION VERSION_LESS 103500 AND Boost_VERSION VERSION_LESS 103600)
+ set(_Boost_FILESYSTEM_DEPENDENCIES system)
+ set(_Boost_IOSTREAMS_DEPENDENCIES regex)
+ set(_Boost_MPI_DEPENDENCIES serialization)
+ set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
+ set(_Boost_WAVE_DEPENDENCIES filesystem system thread)
+ set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+ elseif(NOT Boost_VERSION VERSION_LESS 103600 AND Boost_VERSION VERSION_LESS 103800)
+ set(_Boost_FILESYSTEM_DEPENDENCIES system)
+ set(_Boost_IOSTREAMS_DEPENDENCIES regex)
+ set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l)
+ set(_Boost_MPI_DEPENDENCIES serialization)
+ set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
+ set(_Boost_WAVE_DEPENDENCIES filesystem system thread)
+ set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+ elseif(NOT Boost_VERSION VERSION_LESS 103800 AND Boost_VERSION VERSION_LESS 104300)
+ set(_Boost_FILESYSTEM_DEPENDENCIES system)
+ set(_Boost_IOSTREAMS_DEPENDENCIES regex)
+ set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l)
+ set(_Boost_MPI_DEPENDENCIES serialization)
+ set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
+ set(_Boost_THREAD_DEPENDENCIES date_time)
+ set(_Boost_WAVE_DEPENDENCIES filesystem system thread date_time)
+ set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+ elseif(NOT Boost_VERSION VERSION_LESS 104300 AND Boost_VERSION VERSION_LESS 104400)
+ set(_Boost_FILESYSTEM_DEPENDENCIES system)
+ set(_Boost_IOSTREAMS_DEPENDENCIES regex)
+ set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l random)
+ set(_Boost_MPI_DEPENDENCIES serialization)
+ set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
+ set(_Boost_THREAD_DEPENDENCIES date_time)
+ set(_Boost_WAVE_DEPENDENCIES filesystem system thread date_time)
+ set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+ elseif(NOT Boost_VERSION VERSION_LESS 104400 AND Boost_VERSION VERSION_LESS 104500)
+ set(_Boost_FILESYSTEM_DEPENDENCIES system)
+ set(_Boost_IOSTREAMS_DEPENDENCIES regex)
+ set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l random serialization)
+ set(_Boost_MPI_DEPENDENCIES serialization)
+ set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
+ set(_Boost_THREAD_DEPENDENCIES date_time)
+ set(_Boost_WAVE_DEPENDENCIES serialization filesystem system thread date_time)
+ set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+ elseif(NOT Boost_VERSION VERSION_LESS 104500 AND Boost_VERSION VERSION_LESS 104700)
+ set(_Boost_FILESYSTEM_DEPENDENCIES system)
+ set(_Boost_IOSTREAMS_DEPENDENCIES regex)
+ set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l random)
+ set(_Boost_MPI_DEPENDENCIES serialization)
+ set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
+ set(_Boost_THREAD_DEPENDENCIES date_time)
+ set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread date_time)
+ set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+ elseif(NOT Boost_VERSION VERSION_LESS 104700 AND Boost_VERSION VERSION_LESS 104800)
+ set(_Boost_CHRONO_DEPENDENCIES system)
+ set(_Boost_FILESYSTEM_DEPENDENCIES system)
+ set(_Boost_IOSTREAMS_DEPENDENCIES regex)
+ set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l random)
+ set(_Boost_MPI_DEPENDENCIES serialization)
+ set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
+ set(_Boost_THREAD_DEPENDENCIES date_time)
+ set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread date_time)
+ set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+ elseif(NOT Boost_VERSION VERSION_LESS 104800 AND Boost_VERSION VERSION_LESS 105000)
+ set(_Boost_CHRONO_DEPENDENCIES system)
+ set(_Boost_FILESYSTEM_DEPENDENCIES system)
+ set(_Boost_IOSTREAMS_DEPENDENCIES regex)
+ set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l random)
+ set(_Boost_MPI_DEPENDENCIES serialization)
+ set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
+ set(_Boost_THREAD_DEPENDENCIES date_time)
+ set(_Boost_TIMER_DEPENDENCIES chrono system)
+ set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread date_time)
+ set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+ elseif(NOT Boost_VERSION VERSION_LESS 105000 AND Boost_VERSION VERSION_LESS 105300)
+ set(_Boost_CHRONO_DEPENDENCIES system)
+ set(_Boost_FILESYSTEM_DEPENDENCIES system)
+ set(_Boost_IOSTREAMS_DEPENDENCIES regex)
+ set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l regex random)
+ set(_Boost_MPI_DEPENDENCIES serialization)
+ set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
+ set(_Boost_THREAD_DEPENDENCIES chrono system date_time)
+ set(_Boost_TIMER_DEPENDENCIES chrono system)
+ set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time)
+ set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+ elseif(NOT Boost_VERSION VERSION_LESS 105300 AND Boost_VERSION VERSION_LESS 105400)
+ set(_Boost_ATOMIC_DEPENDENCIES thread chrono system date_time)
+ set(_Boost_CHRONO_DEPENDENCIES system)
+ set(_Boost_FILESYSTEM_DEPENDENCIES system)
+ set(_Boost_IOSTREAMS_DEPENDENCIES regex)
+ set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l regex random)
+ set(_Boost_MPI_DEPENDENCIES serialization)
+ set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
+ set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
+ set(_Boost_TIMER_DEPENDENCIES chrono system)
+ set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time)
+ set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+ elseif(NOT Boost_VERSION VERSION_LESS 105400 AND Boost_VERSION VERSION_LESS 105500)
+ set(_Boost_ATOMIC_DEPENDENCIES thread chrono system date_time)
+ set(_Boost_CHRONO_DEPENDENCIES system)
+ set(_Boost_FILESYSTEM_DEPENDENCIES system)
+ set(_Boost_IOSTREAMS_DEPENDENCIES regex)
+ set(_Boost_LOG_DEPENDENCIES log_setup date_time system filesystem thread regex chrono)
+ set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l regex random)
+ set(_Boost_MPI_DEPENDENCIES serialization)
+ set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
+ set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
+ set(_Boost_TIMER_DEPENDENCIES chrono system)
+ set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
+ set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+ elseif(NOT Boost_VERSION VERSION_LESS 105500 AND Boost_VERSION VERSION_LESS 105600)
+ set(_Boost_CHRONO_DEPENDENCIES system)
+ set(_Boost_COROUTINE_DEPENDENCIES context system)
+ set(_Boost_FILESYSTEM_DEPENDENCIES system)
+ set(_Boost_IOSTREAMS_DEPENDENCIES regex)
+ set(_Boost_LOG_DEPENDENCIES log_setup date_time system filesystem thread regex chrono)
+ set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l regex random)
+ set(_Boost_MPI_DEPENDENCIES serialization)
+ set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
+ set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
+ set(_Boost_TIMER_DEPENDENCIES chrono system)
+ set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
+ set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+ elseif(NOT Boost_VERSION VERSION_LESS 105600 AND Boost_VERSION VERSION_LESS 105900)
+ set(_Boost_CHRONO_DEPENDENCIES system)
+ set(_Boost_COROUTINE_DEPENDENCIES context system)
+ set(_Boost_FILESYSTEM_DEPENDENCIES system)
+ set(_Boost_IOSTREAMS_DEPENDENCIES regex)
+ set(_Boost_LOG_DEPENDENCIES log_setup date_time system filesystem thread regex chrono)
+ set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l atomic)
+ set(_Boost_MPI_DEPENDENCIES serialization)
+ set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
+ set(_Boost_RANDOM_DEPENDENCIES system)
+ set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
+ set(_Boost_TIMER_DEPENDENCIES chrono system)
+ set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
+ set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+ elseif(NOT Boost_VERSION VERSION_LESS 105900 AND Boost_VERSION VERSION_LESS 106000)
+ set(_Boost_CHRONO_DEPENDENCIES system)
+ set(_Boost_COROUTINE_DEPENDENCIES context system)
+ set(_Boost_FILESYSTEM_DEPENDENCIES system)
+ set(_Boost_IOSTREAMS_DEPENDENCIES regex)
+ set(_Boost_LOG_DEPENDENCIES log_setup date_time system filesystem thread regex chrono atomic)
+ set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l atomic)
+ set(_Boost_MPI_DEPENDENCIES serialization)
+ set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
+ set(_Boost_RANDOM_DEPENDENCIES system)
+ set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
+ set(_Boost_TIMER_DEPENDENCIES chrono system)
+ set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
+ set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+ elseif(NOT Boost_VERSION VERSION_LESS 106000 AND Boost_VERSION VERSION_LESS 106100)
+ set(_Boost_CHRONO_DEPENDENCIES system)
+ set(_Boost_COROUTINE_DEPENDENCIES context system)
+ set(_Boost_FILESYSTEM_DEPENDENCIES system)
+ set(_Boost_IOSTREAMS_DEPENDENCIES regex)
+ set(_Boost_LOG_DEPENDENCIES date_time log_setup system filesystem thread regex chrono atomic)
+ set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l atomic)
+ set(_Boost_MPI_DEPENDENCIES serialization)
+ set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
+ set(_Boost_RANDOM_DEPENDENCIES system)
+ set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
+ set(_Boost_TIMER_DEPENDENCIES chrono system)
+ set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
+ set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+ elseif(NOT Boost_VERSION VERSION_LESS 106100 AND Boost_VERSION VERSION_LESS 106200)
+ set(_Boost_CHRONO_DEPENDENCIES system)
+ set(_Boost_CONTEXT_DEPENDENCIES thread chrono system date_time)
+ set(_Boost_COROUTINE_DEPENDENCIES context system)
+ set(_Boost_FILESYSTEM_DEPENDENCIES system)
+ set(_Boost_IOSTREAMS_DEPENDENCIES regex)
+ set(_Boost_LOG_DEPENDENCIES date_time log_setup system filesystem thread regex chrono atomic)
+ set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l atomic)
+ set(_Boost_MPI_DEPENDENCIES serialization)
+ set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
+ set(_Boost_RANDOM_DEPENDENCIES system)
+ set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
+ set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
+ set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+ elseif(NOT Boost_VERSION VERSION_LESS 106200 AND Boost_VERSION VERSION_LESS 106300)
+ set(_Boost_CHRONO_DEPENDENCIES system)
+ set(_Boost_CONTEXT_DEPENDENCIES thread chrono system date_time)
+ set(_Boost_COROUTINE_DEPENDENCIES context system)
+ set(_Boost_FIBER_DEPENDENCIES context thread chrono system date_time)
+ set(_Boost_FILESYSTEM_DEPENDENCIES system)
+ set(_Boost_IOSTREAMS_DEPENDENCIES regex)
+ set(_Boost_LOG_DEPENDENCIES date_time log_setup system filesystem thread regex chrono atomic)
+ set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l atomic)
+ set(_Boost_MPI_DEPENDENCIES serialization)
+ set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
+ set(_Boost_RANDOM_DEPENDENCIES system)
+ set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
+ set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
+ set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+ elseif(NOT Boost_VERSION VERSION_LESS 106300 AND Boost_VERSION VERSION_LESS 106500)
+ set(_Boost_CHRONO_DEPENDENCIES system)
+ set(_Boost_CONTEXT_DEPENDENCIES thread chrono system date_time)
+ set(_Boost_COROUTINE_DEPENDENCIES context system)
+ set(_Boost_COROUTINE2_DEPENDENCIES context fiber thread chrono system date_time)
+ set(_Boost_FIBER_DEPENDENCIES context thread chrono system date_time)
+ set(_Boost_FILESYSTEM_DEPENDENCIES system)
+ set(_Boost_IOSTREAMS_DEPENDENCIES regex)
+ set(_Boost_LOG_DEPENDENCIES date_time log_setup system filesystem thread regex chrono atomic)
+ set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l atomic)
+ set(_Boost_MPI_DEPENDENCIES serialization)
+ set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
+ set(_Boost_RANDOM_DEPENDENCIES system)
+ set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
+ set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
+ set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+ elseif(NOT Boost_VERSION VERSION_LESS 106500 AND Boost_VERSION VERSION_LESS 106700)
+ set(_Boost_CHRONO_DEPENDENCIES system)
+ set(_Boost_CONTEXT_DEPENDENCIES thread chrono system date_time)
+ set(_Boost_COROUTINE_DEPENDENCIES context system)
+ set(_Boost_FIBER_DEPENDENCIES context thread chrono system date_time)
+ set(_Boost_FILESYSTEM_DEPENDENCIES system)
+ set(_Boost_IOSTREAMS_DEPENDENCIES regex)
+ set(_Boost_LOG_DEPENDENCIES date_time log_setup system filesystem thread regex chrono atomic)
+ set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l atomic)
+ set(_Boost_MPI_DEPENDENCIES serialization)
+ set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
+ set(_Boost_NUMPY_DEPENDENCIES python${component_python_version})
+ set(_Boost_RANDOM_DEPENDENCIES system)
+ set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
+ set(_Boost_TIMER_DEPENDENCIES chrono system)
+ set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
+ set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+ else()
+ if(NOT Boost_VERSION VERSION_LESS 106700)
+ set(_Boost_CHRONO_DEPENDENCIES system)
+ set(_Boost_CONTEXT_DEPENDENCIES thread chrono system date_time)
+ set(_Boost_COROUTINE_DEPENDENCIES context system)
+ set(_Boost_FIBER_DEPENDENCIES context thread chrono system date_time)
+ set(_Boost_FILESYSTEM_DEPENDENCIES system)
+ set(_Boost_IOSTREAMS_DEPENDENCIES regex)
+ set(_Boost_LOG_DEPENDENCIES date_time log_setup system filesystem thread regex chrono atomic)
+ set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l atomic)
+ set(_Boost_MPI_DEPENDENCIES serialization)
+ set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
+ set(_Boost_NUMPY_DEPENDENCIES python${component_python_version})
+ set(_Boost_RANDOM_DEPENDENCIES system)
+ set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
+ set(_Boost_TIMER_DEPENDENCIES chrono system)
+ set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
+ set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+ endif()
+ if(NOT Boost_VERSION VERSION_LESS 106800)
+ message(WARNING "New Boost version may have incorrect or missing dependencies and imported targets")
+ endif()
+ endif()
+
+ string(TOUPPER ${component} uppercomponent)
+ set(${_ret} ${_Boost_${uppercomponent}_DEPENDENCIES} PARENT_SCOPE)
+ set(_Boost_IMPORTED_TARGETS ${_Boost_IMPORTED_TARGETS} PARENT_SCOPE)
+
+ string(REGEX REPLACE ";" " " _boost_DEPS_STRING "${_Boost_${uppercomponent}_DEPENDENCIES}")
+ if (NOT _boost_DEPS_STRING)
+ set(_boost_DEPS_STRING "(none)")
+ endif()
+ # message(STATUS "Dependencies for Boost::${component}: ${_boost_DEPS_STRING}")
+endfunction()
+
+#
+# Get component headers. This is the primary header (or headers) for
+# a given component, and is used to check that the headers are present
+# as well as the library itself as an extra sanity check of the build
+# environment.
+#
+# component - the component to check
+# _hdrs
+#
+function(_Boost_COMPONENT_HEADERS component _hdrs)
+ # Handle Python version suffixes
+ if(component MATCHES "^(python|mpi_python|numpy)([0-9][0-9]?|[0-9]\\.[0-9])\$")
+ set(component "${CMAKE_MATCH_1}")
+ set(component_python_version "${CMAKE_MATCH_2}")
+ endif()
+
+ # Note: new boost components will require adding here. The header
+ # must be present in all versions of Boost providing a library.
+ set(_Boost_ATOMIC_HEADERS "boost/atomic.hpp")
+ set(_Boost_CHRONO_HEADERS "boost/chrono.hpp")
+ set(_Boost_CONTAINER_HEADERS "boost/container/container_fwd.hpp")
+ set(_Boost_CONTEXT_HEADERS "boost/context/all.hpp")
+ set(_Boost_COROUTINE_HEADERS "boost/coroutine/all.hpp")
+ set(_Boost_DATE_TIME_HEADERS "boost/date_time/date.hpp")
+ set(_Boost_EXCEPTION_HEADERS "boost/exception/exception.hpp")
+ set(_Boost_FIBER_HEADERS "boost/fiber/all.hpp")
+ set(_Boost_FILESYSTEM_HEADERS "boost/filesystem/path.hpp")
+ set(_Boost_GRAPH_HEADERS "boost/graph/adjacency_list.hpp")
+ set(_Boost_GRAPH_PARALLEL_HEADERS "boost/graph/adjacency_list.hpp")
+ set(_Boost_IOSTREAMS_HEADERS "boost/iostreams/stream.hpp")
+ set(_Boost_LOCALE_HEADERS "boost/locale.hpp")
+ set(_Boost_LOG_HEADERS "boost/log/core.hpp")
+ set(_Boost_LOG_SETUP_HEADERS "boost/log/detail/setup_config.hpp")
+ set(_Boost_MATH_HEADERS "boost/math_fwd.hpp")
+ set(_Boost_MATH_C99_HEADERS "boost/math/tr1.hpp")
+ set(_Boost_MATH_C99F_HEADERS "boost/math/tr1.hpp")
+ set(_Boost_MATH_C99L_HEADERS "boost/math/tr1.hpp")
+ set(_Boost_MATH_TR1_HEADERS "boost/math/tr1.hpp")
+ set(_Boost_MATH_TR1F_HEADERS "boost/math/tr1.hpp")
+ set(_Boost_MATH_TR1L_HEADERS "boost/math/tr1.hpp")
+ set(_Boost_MPI_HEADERS "boost/mpi.hpp")
+ set(_Boost_MPI_PYTHON_HEADERS "boost/mpi/python/config.hpp")
+ set(_Boost_NUMPY_HEADERS "boost/python/numpy.hpp")
+ set(_Boost_PRG_EXEC_MONITOR_HEADERS "boost/test/prg_exec_monitor.hpp")
+ set(_Boost_PROGRAM_OPTIONS_HEADERS "boost/program_options.hpp")
+ set(_Boost_PYTHON_HEADERS "boost/python.hpp")
+ set(_Boost_RANDOM_HEADERS "boost/random.hpp")
+ set(_Boost_REGEX_HEADERS "boost/regex.hpp")
+ set(_Boost_SERIALIZATION_HEADERS "boost/serialization/serialization.hpp")
+ set(_Boost_SIGNALS_HEADERS "boost/signals.hpp")
+ set(_Boost_SYSTEM_HEADERS "boost/system/config.hpp")
+ set(_Boost_TEST_EXEC_MONITOR_HEADERS "boost/test/test_exec_monitor.hpp")
+ set(_Boost_THREAD_HEADERS "boost/thread.hpp")
+ set(_Boost_TIMER_HEADERS "boost/timer.hpp")
+ set(_Boost_TYPE_ERASURE_HEADERS "boost/type_erasure/config.hpp")
+ set(_Boost_UNIT_TEST_FRAMEWORK_HEADERS "boost/test/framework.hpp")
+ set(_Boost_WAVE_HEADERS "boost/wave.hpp")
+ set(_Boost_WSERIALIZATION_HEADERS "boost/archive/text_wiarchive.hpp")
+ if(WIN32)
+ set(_Boost_BZIP2_HEADERS "boost/iostreams/filter/bzip2.hpp")
+ set(_Boost_ZLIB_HEADERS "boost/iostreams/filter/zlib.hpp")
+ endif()
+
+ string(TOUPPER ${component} uppercomponent)
+ set(${_hdrs} ${_Boost_${uppercomponent}_HEADERS} PARENT_SCOPE)
+
+ string(REGEX REPLACE ";" " " _boost_HDRS_STRING "${_Boost_${uppercomponent}_HEADERS}")
+ if (NOT _boost_HDRS_STRING)
+ set(_boost_HDRS_STRING "(none)")
+ endif()
+ # message(STATUS "Headers for Boost::${component}: ${_boost_HDRS_STRING}")
+endfunction()
+
+#
+# Determine if any missing dependencies require adding to the component list.
+#
+# Sets _Boost_${COMPONENT}_DEPENDENCIES for each required component,
+# plus _Boost_IMPORTED_TARGETS (TRUE if imported targets should be
+# defined; FALSE if dependency information is unavailable).
+#
+# componentvar - the component list variable name
+# extravar - the indirect dependency list variable name
+#
+#
+function(_Boost_MISSING_DEPENDENCIES componentvar extravar)
+ # _boost_unprocessed_components - list of components requiring processing
+ # _boost_processed_components - components already processed (or currently being processed)
+ # _boost_new_components - new components discovered for future processing
+ #
+ list(APPEND _boost_unprocessed_components ${${componentvar}})
+
+ while(_boost_unprocessed_components)
+ list(APPEND _boost_processed_components ${_boost_unprocessed_components})
+ foreach(component ${_boost_unprocessed_components})
+ string(TOUPPER ${component} uppercomponent)
+ set(${_ret} ${_Boost_${uppercomponent}_DEPENDENCIES} PARENT_SCOPE)
+ _Boost_COMPONENT_DEPENDENCIES("${component}" _Boost_${uppercomponent}_DEPENDENCIES)
+ set(_Boost_${uppercomponent}_DEPENDENCIES ${_Boost_${uppercomponent}_DEPENDENCIES} PARENT_SCOPE)
+ set(_Boost_IMPORTED_TARGETS ${_Boost_IMPORTED_TARGETS} PARENT_SCOPE)
+ foreach(componentdep ${_Boost_${uppercomponent}_DEPENDENCIES})
+ if (NOT ("${componentdep}" IN_LIST _boost_processed_components OR "${componentdep}" IN_LIST _boost_new_components))
+ list(APPEND _boost_new_components ${componentdep})
+ endif()
+ endforeach()
+ endforeach()
+ set(_boost_unprocessed_components ${_boost_new_components})
+ unset(_boost_new_components)
+ endwhile()
+ set(_boost_extra_components ${_boost_processed_components})
+ if(_boost_extra_components AND ${componentvar})
+ list(REMOVE_ITEM _boost_extra_components ${${componentvar}})
+ endif()
+ set(${componentvar} ${_boost_processed_components} PARENT_SCOPE)
+ set(${extravar} ${_boost_extra_components} PARENT_SCOPE)
+endfunction()
+
+#
+# Some boost libraries may require particular set of compler features.
+# The very first one was `boost::fiber` introduced in Boost 1.62.
+# One can check required compiler features of it in
+# `${Boost_ROOT}/libs/fiber/build/Jamfile.v2`.
+#
+function(_Boost_COMPILER_FEATURES component _ret)
+ # Boost >= 1.62 and < 1.67
+ if(NOT Boost_VERSION VERSION_LESS 106200 AND Boost_VERSION VERSION_LESS 106700)
+ set(_Boost_FIBER_COMPILER_FEATURES
+ cxx_alias_templates
+ cxx_auto_type
+ cxx_constexpr
+ cxx_defaulted_functions
+ cxx_final
+ cxx_lambdas
+ cxx_noexcept
+ cxx_nullptr
+ cxx_rvalue_references
+ cxx_thread_local
+ cxx_variadic_templates
+ )
+ endif()
+ string(TOUPPER ${component} uppercomponent)
+ set(${_ret} ${_Boost_${uppercomponent}_COMPILER_FEATURES} PARENT_SCOPE)
+endfunction()
+
+#
+# Update library search directory hint variable with paths used by prebuilt boost binaries.
+#
+# Prebuilt windows binaries (https://sourceforge.net/projects/boost/files/boost-binaries/)
+# have library directories named using MSVC compiler version and architecture.
+# This function would append corresponding directories if MSVC is a current compiler,
+# so having `BOOST_ROOT` would be enough to specify to find everything.
+#
+function(_Boost_UPDATE_WINDOWS_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS componentlibvar basedir)
+ if("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xMSVC")
+ if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+ set(_arch_suffix 64)
+ else()
+ set(_arch_suffix 32)
+ endif()
+ if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.10)
+ list(APPEND ${componentlibvar} ${basedir}/lib${_arch_suffix}-msvc-14.1)
+ list(APPEND ${componentlibvar} ${basedir}/lib${_arch_suffix}-msvc-14.0)
+ elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19)
+ list(APPEND ${componentlibvar} ${basedir}/lib${_arch_suffix}-msvc-14.0)
+ elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 18)
+ list(APPEND ${componentlibvar} ${basedir}/lib${_arch_suffix}-msvc-12.0)
+ elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 17)
+ list(APPEND ${componentlibvar} ${basedir}/lib${_arch_suffix}-msvc-11.0)
+ elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16)
+ list(APPEND ${componentlibvar} ${basedir}/lib${_arch_suffix}-msvc-10.0)
+ elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15)
+ list(APPEND ${componentlibvar} ${basedir}/lib${_arch_suffix}-msvc-9.0)
+ elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 14)
+ list(APPEND ${componentlibvar} ${basedir}/lib${_arch_suffix}-msvc-8.0)
+ endif()
+ set(${componentlibvar} ${${componentlibvar}} PARENT_SCOPE)
+ endif()
+endfunction()
+
+#
+# End functions/macros
+#
+#-------------------------------------------------------------------------------
+
+#-------------------------------------------------------------------------------
+# main.
+#-------------------------------------------------------------------------------
+
+
+# If the user sets Boost_LIBRARY_DIR, use it as the default for both
+# configurations.
+if(NOT Boost_LIBRARY_DIR_RELEASE AND Boost_LIBRARY_DIR)
+ set(Boost_LIBRARY_DIR_RELEASE "${Boost_LIBRARY_DIR}")
+endif()
+if(NOT Boost_LIBRARY_DIR_DEBUG AND Boost_LIBRARY_DIR)
+ set(Boost_LIBRARY_DIR_DEBUG "${Boost_LIBRARY_DIR}")
+endif()
+
+if(NOT DEFINED Boost_USE_DEBUG_LIBS)
+ set(Boost_USE_DEBUG_LIBS TRUE)
+endif()
+if(NOT DEFINED Boost_USE_RELEASE_LIBS)
+ set(Boost_USE_RELEASE_LIBS TRUE)
+endif()
+if(NOT DEFINED Boost_USE_MULTITHREADED)
+ set(Boost_USE_MULTITHREADED TRUE)
+endif()
+if(NOT DEFINED Boost_USE_DEBUG_RUNTIME)
+ set(Boost_USE_DEBUG_RUNTIME TRUE)
+endif()
+
+# Check the version of Boost against the requested version.
+if(Boost_FIND_VERSION AND NOT Boost_FIND_VERSION_MINOR)
+ message(SEND_ERROR "When requesting a specific version of Boost, you must provide at least the major and minor version numbers, e.g., 1.34")
+endif()
+
+if(Boost_FIND_VERSION_EXACT)
+ # The version may appear in a directory with or without the patch
+ # level, even when the patch level is non-zero.
+ set(_boost_TEST_VERSIONS
+ "${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}.${Boost_FIND_VERSION_PATCH}"
+ "${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}")
+else()
+ # The user has not requested an exact version. Among known
+ # versions, find those that are acceptable to the user request.
+ #
+ # Note: When adding a new Boost release, also update the dependency
+ # information in _Boost_COMPONENT_DEPENDENCIES and
+ # _Boost_COMPONENT_HEADERS. See the instructions at the top of
+ # _Boost_COMPONENT_DEPENDENCIES.
+ set(_Boost_KNOWN_VERSIONS ${Boost_ADDITIONAL_VERSIONS}
+ "1.67.0" "1.67" "1.66.0" "1.66" "1.65.1" "1.65.0" "1.65"
+ "1.64.0" "1.64" "1.63.0" "1.63" "1.62.0" "1.62" "1.61.0" "1.61" "1.60.0" "1.60"
+ "1.59.0" "1.59" "1.58.0" "1.58" "1.57.0" "1.57" "1.56.0" "1.56" "1.55.0" "1.55"
+ "1.54.0" "1.54" "1.53.0" "1.53" "1.52.0" "1.52" "1.51.0" "1.51"
+ "1.50.0" "1.50" "1.49.0" "1.49" "1.48.0" "1.48" "1.47.0" "1.47" "1.46.1"
+ "1.46.0" "1.46" "1.45.0" "1.45" "1.44.0" "1.44" "1.43.0" "1.43" "1.42.0" "1.42"
+ "1.41.0" "1.41" "1.40.0" "1.40" "1.39.0" "1.39" "1.38.0" "1.38" "1.37.0" "1.37"
+ "1.36.1" "1.36.0" "1.36" "1.35.1" "1.35.0" "1.35" "1.34.1" "1.34.0"
+ "1.34" "1.33.1" "1.33.0" "1.33")
+
+ set(_boost_TEST_VERSIONS)
+ if(Boost_FIND_VERSION)
+ set(_Boost_FIND_VERSION_SHORT "${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}")
+ # Select acceptable versions.
+ foreach(version ${_Boost_KNOWN_VERSIONS})
+ if(NOT "${version}" VERSION_LESS "${Boost_FIND_VERSION}")
+ # This version is high enough.
+ list(APPEND _boost_TEST_VERSIONS "${version}")
+ elseif("${version}.99" VERSION_EQUAL "${_Boost_FIND_VERSION_SHORT}.99")
+ # This version is a short-form for the requested version with
+ # the patch level dropped.
+ list(APPEND _boost_TEST_VERSIONS "${version}")
+ endif()
+ endforeach()
+ else()
+ # Any version is acceptable.
+ set(_boost_TEST_VERSIONS "${_Boost_KNOWN_VERSIONS}")
+ endif()
+endif()
+
+# The reason that we failed to find Boost. This will be set to a
+# user-friendly message when we fail to find some necessary piece of
+# Boost.
+set(Boost_ERROR_REASON)
+
+if(Boost_DEBUG)
+ # Output some of their choices
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ "_boost_TEST_VERSIONS = ${_boost_TEST_VERSIONS}")
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ "Boost_USE_MULTITHREADED = ${Boost_USE_MULTITHREADED}")
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ "Boost_USE_STATIC_LIBS = ${Boost_USE_STATIC_LIBS}")
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ "Boost_USE_STATIC_RUNTIME = ${Boost_USE_STATIC_RUNTIME}")
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ "Boost_ADDITIONAL_VERSIONS = ${Boost_ADDITIONAL_VERSIONS}")
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ "Boost_NO_SYSTEM_PATHS = ${Boost_NO_SYSTEM_PATHS}")
+endif()
+
+# Supply Boost_LIB_DIAGNOSTIC_DEFINITIONS as a convenience target. It
+# will only contain any interface definitions on WIN32, but is created
+# on all platforms to keep end user code free from platform dependent
+# code. Also provide convenience targets to disable autolinking and
+# enable dynamic linking.
+if(NOT TARGET Boost::diagnostic_definitions)
+ add_library(Boost::diagnostic_definitions INTERFACE IMPORTED)
+ add_library(Boost::disable_autolinking INTERFACE IMPORTED)
+ add_library(Boost::dynamic_linking INTERFACE IMPORTED)
+endif()
+if(WIN32)
+ # In windows, automatic linking is performed, so you do not have
+ # to specify the libraries. If you are linking to a dynamic
+ # runtime, then you can choose to link to either a static or a
+ # dynamic Boost library, the default is to do a static link. You
+ # can alter this for a specific library "whatever" by defining
+ # BOOST_WHATEVER_DYN_LINK to force Boost library "whatever" to be
+ # linked dynamically. Alternatively you can force all Boost
+ # libraries to dynamic link by defining BOOST_ALL_DYN_LINK.
+
+ # This feature can be disabled for Boost library "whatever" by
+ # defining BOOST_WHATEVER_NO_LIB, or for all of Boost by defining
+ # BOOST_ALL_NO_LIB.
+
+ # If you want to observe which libraries are being linked against
+ # then defining BOOST_LIB_DIAGNOSTIC will cause the auto-linking
+ # code to emit a #pragma message each time a library is selected
+ # for linking.
+ set(Boost_LIB_DIAGNOSTIC_DEFINITIONS "-DBOOST_LIB_DIAGNOSTIC")
+ set_target_properties(Boost::diagnostic_definitions PROPERTIES
+ INTERFACE_COMPILE_DEFINITIONS "BOOST_LIB_DIAGNOSTIC")
+ set_target_properties(Boost::disable_autolinking PROPERTIES
+ INTERFACE_COMPILE_DEFINITIONS "BOOST_ALL_NO_LIB")
+ set_target_properties(Boost::dynamic_linking PROPERTIES
+ INTERFACE_COMPILE_DEFINITIONS "BOOST_ALL_DYN_LINK")
+endif()
+
+_Boost_CHECK_SPELLING(Boost_ROOT)
+_Boost_CHECK_SPELLING(Boost_LIBRARYDIR)
+_Boost_CHECK_SPELLING(Boost_INCLUDEDIR)
+
+# Collect environment variable inputs as hints. Do not consider changes.
+foreach(v BOOSTROOT BOOST_ROOT BOOST_INCLUDEDIR BOOST_LIBRARYDIR)
+ set(_env $ENV{${v}})
+ if(_env)
+ file(TO_CMAKE_PATH "${_env}" _ENV_${v})
+ else()
+ set(_ENV_${v} "")
+ endif()
+endforeach()
+if(NOT _ENV_BOOST_ROOT AND _ENV_BOOSTROOT)
+ set(_ENV_BOOST_ROOT "${_ENV_BOOSTROOT}")
+endif()
+
+# Collect inputs and cached results. Detect changes since the last run.
+if(NOT BOOST_ROOT AND BOOSTROOT)
+ set(BOOST_ROOT "${BOOSTROOT}")
+endif()
+set(_Boost_VARS_DIR
+ BOOST_ROOT
+ Boost_NO_SYSTEM_PATHS
+ )
+
+if(Boost_DEBUG)
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ "Declared as CMake or Environmental Variables:")
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ " BOOST_ROOT = ${BOOST_ROOT}")
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ " BOOST_INCLUDEDIR = ${BOOST_INCLUDEDIR}")
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ " BOOST_LIBRARYDIR = ${BOOST_LIBRARYDIR}")
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ "_boost_TEST_VERSIONS = ${_boost_TEST_VERSIONS}")
+endif()
+
+# ------------------------------------------------------------------------
+# Search for Boost include DIR
+# ------------------------------------------------------------------------
+
+set(_Boost_VARS_INC BOOST_INCLUDEDIR Boost_INCLUDE_DIR Boost_ADDITIONAL_VERSIONS)
+_Boost_CHANGE_DETECT(_Boost_CHANGE_INCDIR ${_Boost_VARS_DIR} ${_Boost_VARS_INC})
+# Clear Boost_INCLUDE_DIR if it did not change but other input affecting the
+# location did. We will find a new one based on the new inputs.
+if(_Boost_CHANGE_INCDIR AND NOT _Boost_INCLUDE_DIR_CHANGED)
+ unset(Boost_INCLUDE_DIR CACHE)
+endif()
+
+if(NOT Boost_INCLUDE_DIR)
+ set(_boost_INCLUDE_SEARCH_DIRS "")
+ if(BOOST_INCLUDEDIR)
+ list(APPEND _boost_INCLUDE_SEARCH_DIRS ${BOOST_INCLUDEDIR})
+ elseif(_ENV_BOOST_INCLUDEDIR)
+ list(APPEND _boost_INCLUDE_SEARCH_DIRS ${_ENV_BOOST_INCLUDEDIR})
+ endif()
+
+ if( BOOST_ROOT )
+ list(APPEND _boost_INCLUDE_SEARCH_DIRS ${BOOST_ROOT}/include ${BOOST_ROOT})
+ elseif( _ENV_BOOST_ROOT )
+ list(APPEND _boost_INCLUDE_SEARCH_DIRS ${_ENV_BOOST_ROOT}/include ${_ENV_BOOST_ROOT})
+ endif()
+
+ if( Boost_NO_SYSTEM_PATHS)
+ list(APPEND _boost_INCLUDE_SEARCH_DIRS NO_CMAKE_SYSTEM_PATH NO_SYSTEM_ENVIRONMENT_PATH)
+ else()
+ if("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xMSVC")
+ foreach(ver ${_Boost_KNOWN_VERSIONS})
+ string(REPLACE "." "_" ver "${ver}")
+ list(APPEND _boost_INCLUDE_SEARCH_DIRS PATHS "C:/local/boost_${ver}")
+ endforeach()
+ endif()
+ list(APPEND _boost_INCLUDE_SEARCH_DIRS PATHS
+ C:/boost/include
+ C:/boost
+ /sw/local/include
+ )
+ endif()
+
+ # Try to find Boost by stepping backwards through the Boost versions
+ # we know about.
+ # Build a list of path suffixes for each version.
+ set(_boost_PATH_SUFFIXES)
+ foreach(_boost_VER ${_boost_TEST_VERSIONS})
+ # Add in a path suffix, based on the required version, ideally
+ # we could read this from version.hpp, but for that to work we'd
+ # need to know the include dir already
+ set(_boost_BOOSTIFIED_VERSION)
+
+ # Transform 1.35 => 1_35 and 1.36.0 => 1_36_0
+ if(_boost_VER MATCHES "([0-9]+)\\.([0-9]+)\\.([0-9]+)")
+ set(_boost_BOOSTIFIED_VERSION
+ "${CMAKE_MATCH_1}_${CMAKE_MATCH_2}_${CMAKE_MATCH_3}")
+ elseif(_boost_VER MATCHES "([0-9]+)\\.([0-9]+)")
+ set(_boost_BOOSTIFIED_VERSION
+ "${CMAKE_MATCH_1}_${CMAKE_MATCH_2}")
+ endif()
+
+ list(APPEND _boost_PATH_SUFFIXES
+ "boost-${_boost_BOOSTIFIED_VERSION}"
+ "boost_${_boost_BOOSTIFIED_VERSION}"
+ "boost/boost-${_boost_BOOSTIFIED_VERSION}"
+ "boost/boost_${_boost_BOOSTIFIED_VERSION}"
+ )
+
+ endforeach()
+
+ if(Boost_DEBUG)
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ "Include debugging info:")
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ " _boost_INCLUDE_SEARCH_DIRS = ${_boost_INCLUDE_SEARCH_DIRS}")
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ " _boost_PATH_SUFFIXES = ${_boost_PATH_SUFFIXES}")
+ endif()
+
+ # Look for a standard boost header file.
+ find_path(Boost_INCLUDE_DIR
+ NAMES boost/config.hpp
+ HINTS ${_boost_INCLUDE_SEARCH_DIRS}
+ PATH_SUFFIXES ${_boost_PATH_SUFFIXES}
+ )
+endif()
+
+# ------------------------------------------------------------------------
+# Extract version information from version.hpp
+# ------------------------------------------------------------------------
+
+# Set Boost_FOUND based only on header location and version.
+# It will be updated below for component libraries.
+if(Boost_INCLUDE_DIR)
+ if(Boost_DEBUG)
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ "location of version.hpp: ${Boost_INCLUDE_DIR}/boost/version.hpp")
+ endif()
+
+ # Extract Boost_VERSION and Boost_LIB_VERSION from version.hpp
+ set(Boost_VERSION 0)
+ set(Boost_LIB_VERSION "")
+ file(STRINGS "${Boost_INCLUDE_DIR}/boost/version.hpp" _boost_VERSION_HPP_CONTENTS REGEX "#define BOOST_(LIB_)?VERSION ")
+ set(_Boost_VERSION_REGEX "([0-9]+)")
+ set(_Boost_LIB_VERSION_REGEX "\"([0-9_]+)\"")
+ foreach(v VERSION LIB_VERSION)
+ if("${_boost_VERSION_HPP_CONTENTS}" MATCHES "#define BOOST_${v} ${_Boost_${v}_REGEX}")
+ set(Boost_${v} "${CMAKE_MATCH_1}")
+ endif()
+ endforeach()
+ unset(_boost_VERSION_HPP_CONTENTS)
+
+ math(EXPR Boost_MAJOR_VERSION "${Boost_VERSION} / 100000")
+ math(EXPR Boost_MINOR_VERSION "${Boost_VERSION} / 100 % 1000")
+ math(EXPR Boost_SUBMINOR_VERSION "${Boost_VERSION} % 100")
+
+ string(APPEND Boost_ERROR_REASON
+ "Boost version: ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}\nBoost include path: ${Boost_INCLUDE_DIR}")
+ if(Boost_DEBUG)
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ "version.hpp reveals boost "
+ "${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}")
+ endif()
+
+ if(Boost_FIND_VERSION)
+ # Set Boost_FOUND based on requested version.
+ set(_Boost_VERSION "${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}")
+ if("${_Boost_VERSION}" VERSION_LESS "${Boost_FIND_VERSION}")
+ set(Boost_FOUND 0)
+ set(_Boost_VERSION_AGE "old")
+ elseif(Boost_FIND_VERSION_EXACT AND
+ NOT "${_Boost_VERSION}" VERSION_EQUAL "${Boost_FIND_VERSION}")
+ set(Boost_FOUND 0)
+ set(_Boost_VERSION_AGE "new")
+ else()
+ set(Boost_FOUND 1)
+ endif()
+ if(NOT Boost_FOUND)
+ # State that we found a version of Boost that is too new or too old.
+ string(APPEND Boost_ERROR_REASON
+ "\nDetected version of Boost is too ${_Boost_VERSION_AGE}. Requested version was ${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}")
+ if (Boost_FIND_VERSION_PATCH)
+ string(APPEND Boost_ERROR_REASON
+ ".${Boost_FIND_VERSION_PATCH}")
+ endif ()
+ if (NOT Boost_FIND_VERSION_EXACT)
+ string(APPEND Boost_ERROR_REASON " (or newer)")
+ endif ()
+ string(APPEND Boost_ERROR_REASON ".")
+ endif ()
+ else()
+ # Caller will accept any Boost version.
+ set(Boost_FOUND 1)
+ endif()
+else()
+ set(Boost_FOUND 0)
+ string(APPEND Boost_ERROR_REASON
+ "Unable to find the Boost header files. Please set BOOST_ROOT to the root directory containing Boost or BOOST_INCLUDEDIR to the directory containing Boost's headers.")
+endif()
+
+# ------------------------------------------------------------------------
+# Prefix initialization
+# ------------------------------------------------------------------------
+
+set(Boost_LIB_PREFIX "")
+if ( (GHSMULTI AND Boost_USE_STATIC_LIBS) OR
+ (WIN32 AND Boost_USE_STATIC_LIBS AND NOT CYGWIN) )
+ set(Boost_LIB_PREFIX "lib")
+endif()
+
+if ( NOT Boost_NAMESPACE )
+ set(Boost_NAMESPACE "boost")
+endif()
+
+# ------------------------------------------------------------------------
+# Suffix initialization and compiler suffix detection.
+# ------------------------------------------------------------------------
+
+set(_Boost_VARS_NAME
+ Boost_NAMESPACE
+ Boost_COMPILER
+ Boost_THREADAPI
+ Boost_USE_DEBUG_PYTHON
+ Boost_USE_MULTITHREADED
+ Boost_USE_STATIC_LIBS
+ Boost_USE_STATIC_RUNTIME
+ Boost_USE_STLPORT
+ Boost_USE_STLPORT_DEPRECATED_NATIVE_IOSTREAMS
+ )
+_Boost_CHANGE_DETECT(_Boost_CHANGE_LIBNAME ${_Boost_VARS_NAME})
+
+# Setting some more suffixes for the library
+if (Boost_COMPILER)
+ set(_boost_COMPILER ${Boost_COMPILER})
+ if(Boost_DEBUG)
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ "using user-specified Boost_COMPILER = ${_boost_COMPILER}")
+ endif()
+else()
+ # Attempt to guess the compiler suffix
+ # NOTE: this is not perfect yet, if you experience any issues
+ # please report them and use the Boost_COMPILER variable
+ # to work around the problems.
+ _Boost_GUESS_COMPILER_PREFIX(_boost_COMPILER)
+ if(Boost_DEBUG)
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ "guessed _boost_COMPILER = ${_boost_COMPILER}")
+ endif()
+endif()
+
+set (_boost_MULTITHREADED "-mt")
+if( NOT Boost_USE_MULTITHREADED )
+ set (_boost_MULTITHREADED "")
+endif()
+if(Boost_DEBUG)
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ "_boost_MULTITHREADED = ${_boost_MULTITHREADED}")
+endif()
+
+#======================
+# Systematically build up the Boost ABI tag for the 'tagged' and 'versioned' layouts
+# http://boost.org/doc/libs/1_66_0/more/getting_started/windows.html#library-naming
+# http://boost.org/doc/libs/1_66_0/boost/config/auto_link.hpp
+# http://boost.org/doc/libs/1_66_0/tools/build/src/tools/common.jam
+# http://boost.org/doc/libs/1_66_0/boostcpp.jam
+set( _boost_RELEASE_ABI_TAG "-")
+set( _boost_DEBUG_ABI_TAG "-")
+# Key Use this library when:
+# s linking statically to the C++ standard library and
+# compiler runtime support libraries.
+if(Boost_USE_STATIC_RUNTIME)
+ set( _boost_RELEASE_ABI_TAG "${_boost_RELEASE_ABI_TAG}s")
+ set( _boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}s")
+endif()
+# g using debug versions of the standard and runtime
+# support libraries
+if(WIN32 AND Boost_USE_DEBUG_RUNTIME)
+ if("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xMSVC"
+ OR "x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xClang"
+ OR "x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xIntel")
+ string(APPEND _boost_DEBUG_ABI_TAG "g")
+ endif()
+endif()
+# y using special debug build of python
+if(Boost_USE_DEBUG_PYTHON)
+ string(APPEND _boost_DEBUG_ABI_TAG "y")
+endif()
+# d using a debug version of your code
+string(APPEND _boost_DEBUG_ABI_TAG "d")
+# p using the STLport standard library rather than the
+# default one supplied with your compiler
+if(Boost_USE_STLPORT)
+ string(APPEND _boost_RELEASE_ABI_TAG "p")
+ string(APPEND _boost_DEBUG_ABI_TAG "p")
+endif()
+# n using the STLport deprecated "native iostreams" feature
+# removed from the documentation in 1.43.0 but still present in
+# boost/config/auto_link.hpp
+if(Boost_USE_STLPORT_DEPRECATED_NATIVE_IOSTREAMS)
+ string(APPEND _boost_RELEASE_ABI_TAG "n")
+ string(APPEND _boost_DEBUG_ABI_TAG "n")
+endif()
+
+# -x86 Architecture and address model tag
+# First character is the architecture, then word-size, either 32 or 64
+# Only used in 'versioned' layout, added in Boost 1.66.0
+set(_boost_ARCHITECTURE_TAG "")
+# {CMAKE_CXX_COMPILER_ARCHITECTURE_ID} is not currently set for all compilers
+if(NOT "x${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "x" AND NOT Boost_VERSION VERSION_LESS 106600)
+ string(APPEND _boost_ARCHITECTURE_TAG "-")
+ # This needs to be kept in-sync with the section of CMakePlatformId.h.in
+ # inside 'defined(_WIN32) && defined(_MSC_VER)'
+ if(${CMAKE_CXX_COMPILER_ARCHITECTURE_ID} STREQUAL "IA64")
+ string(APPEND _boost_ARCHITECTURE_TAG "i")
+ elseif(${CMAKE_CXX_COMPILER_ARCHITECTURE_ID} STREQUAL "X86"
+ OR ${CMAKE_CXX_COMPILER_ARCHITECTURE_ID} STREQUAL "x64")
+ string(APPEND _boost_ARCHITECTURE_TAG "x")
+ elseif(${CMAKE_CXX_COMPILER_ARCHITECTURE_ID} MATCHES "^ARM")
+ string(APPEND _boost_ARCHITECTURE_TAG "a")
+ elseif(${CMAKE_CXX_COMPILER_ARCHITECTURE_ID} STREQUAL "MIPS")
+ string(APPEND _boost_ARCHITECTURE_TAG "m")
+ endif()
+
+ if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+ string(APPEND _boost_ARCHITECTURE_TAG "64")
+ else()
+ string(APPEND _boost_ARCHITECTURE_TAG "32")
+ endif()
+endif()
+
+if(Boost_DEBUG)
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ "_boost_RELEASE_ABI_TAG = ${_boost_RELEASE_ABI_TAG}")
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ "_boost_DEBUG_ABI_TAG = ${_boost_DEBUG_ABI_TAG}")
+endif()
+
+# ------------------------------------------------------------------------
+# Begin finding boost libraries
+# ------------------------------------------------------------------------
+
+set(_Boost_VARS_LIB "")
+foreach(c DEBUG RELEASE)
+ set(_Boost_VARS_LIB_${c} BOOST_LIBRARYDIR Boost_LIBRARY_DIR_${c})
+ list(APPEND _Boost_VARS_LIB ${_Boost_VARS_LIB_${c}})
+ _Boost_CHANGE_DETECT(_Boost_CHANGE_LIBDIR_${c} ${_Boost_VARS_DIR} ${_Boost_VARS_LIB_${c}} Boost_INCLUDE_DIR)
+ # Clear Boost_LIBRARY_DIR_${c} if it did not change but other input affecting the
+ # location did. We will find a new one based on the new inputs.
+ if(_Boost_CHANGE_LIBDIR_${c} AND NOT _Boost_LIBRARY_DIR_${c}_CHANGED)
+ unset(Boost_LIBRARY_DIR_${c} CACHE)
+ endif()
+
+ # If Boost_LIBRARY_DIR_[RELEASE,DEBUG] is set, prefer its value.
+ if(Boost_LIBRARY_DIR_${c})
+ set(_boost_LIBRARY_SEARCH_DIRS_${c} ${Boost_LIBRARY_DIR_${c}} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
+ else()
+ set(_boost_LIBRARY_SEARCH_DIRS_${c} "")
+ if(BOOST_LIBRARYDIR)
+ list(APPEND _boost_LIBRARY_SEARCH_DIRS_${c} ${BOOST_LIBRARYDIR})
+ elseif(_ENV_BOOST_LIBRARYDIR)
+ list(APPEND _boost_LIBRARY_SEARCH_DIRS_${c} ${_ENV_BOOST_LIBRARYDIR})
+ endif()
+
+ if(BOOST_ROOT)
+ list(APPEND _boost_LIBRARY_SEARCH_DIRS_${c} ${BOOST_ROOT}/lib ${BOOST_ROOT}/stage/lib)
+ _Boost_UPDATE_WINDOWS_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS(_boost_LIBRARY_SEARCH_DIRS_${c} "${BOOST_ROOT}")
+ elseif(_ENV_BOOST_ROOT)
+ list(APPEND _boost_LIBRARY_SEARCH_DIRS_${c} ${_ENV_BOOST_ROOT}/lib ${_ENV_BOOST_ROOT}/stage/lib)
+ _Boost_UPDATE_WINDOWS_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS(_boost_LIBRARY_SEARCH_DIRS_${c} "${_ENV_BOOST_ROOT}")
+ endif()
+
+ list(APPEND _boost_LIBRARY_SEARCH_DIRS_${c}
+ ${Boost_INCLUDE_DIR}/lib
+ ${Boost_INCLUDE_DIR}/../lib
+ ${Boost_INCLUDE_DIR}/stage/lib
+ )
+ _Boost_UPDATE_WINDOWS_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS(_boost_LIBRARY_SEARCH_DIRS_${c} "${Boost_INCLUDE_DIR}/..")
+ _Boost_UPDATE_WINDOWS_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS(_boost_LIBRARY_SEARCH_DIRS_${c} "${Boost_INCLUDE_DIR}")
+ if( Boost_NO_SYSTEM_PATHS )
+ list(APPEND _boost_LIBRARY_SEARCH_DIRS_${c} NO_CMAKE_SYSTEM_PATH NO_SYSTEM_ENVIRONMENT_PATH)
+ else()
+ foreach(ver ${_Boost_KNOWN_VERSIONS})
+ string(REPLACE "." "_" ver "${ver}")
+ _Boost_UPDATE_WINDOWS_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS(_boost_LIBRARY_SEARCH_DIRS_${c} "C:/local/boost_${ver}")
+ endforeach()
+ _Boost_UPDATE_WINDOWS_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS(_boost_LIBRARY_SEARCH_DIRS_${c} "C:/boost")
+ list(APPEND _boost_LIBRARY_SEARCH_DIRS_${c} PATHS
+ C:/boost/lib
+ C:/boost
+ /sw/local/lib
+ )
+ endif()
+ endif()
+endforeach()
+
+if(Boost_DEBUG)
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ "_boost_LIBRARY_SEARCH_DIRS_RELEASE = ${_boost_LIBRARY_SEARCH_DIRS_RELEASE}"
+ "_boost_LIBRARY_SEARCH_DIRS_DEBUG = ${_boost_LIBRARY_SEARCH_DIRS_DEBUG}")
+endif()
+
+# Support preference of static libs by adjusting CMAKE_FIND_LIBRARY_SUFFIXES
+if( Boost_USE_STATIC_LIBS )
+ set( _boost_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
+ if(WIN32)
+ list(INSERT CMAKE_FIND_LIBRARY_SUFFIXES 0 .lib .a)
+ else()
+ set(CMAKE_FIND_LIBRARY_SUFFIXES .a)
+ endif()
+endif()
+
+# We want to use the tag inline below without risking double dashes
+if(_boost_RELEASE_ABI_TAG)
+ if(${_boost_RELEASE_ABI_TAG} STREQUAL "-")
+ set(_boost_RELEASE_ABI_TAG "")
+ endif()
+endif()
+if(_boost_DEBUG_ABI_TAG)
+ if(${_boost_DEBUG_ABI_TAG} STREQUAL "-")
+ set(_boost_DEBUG_ABI_TAG "")
+ endif()
+endif()
+
+# The previous behavior of FindBoost when Boost_USE_STATIC_LIBS was enabled
+# on WIN32 was to:
+# 1. Search for static libs compiled against a SHARED C++ standard runtime library (use if found)
+# 2. Search for static libs compiled against a STATIC C++ standard runtime library (use if found)
+# We maintain this behavior since changing it could break people's builds.
+# To disable the ambiguous behavior, the user need only
+# set Boost_USE_STATIC_RUNTIME either ON or OFF.
+set(_boost_STATIC_RUNTIME_WORKAROUND false)
+if(WIN32 AND Boost_USE_STATIC_LIBS)
+ if(NOT DEFINED Boost_USE_STATIC_RUNTIME)
+ set(_boost_STATIC_RUNTIME_WORKAROUND TRUE)
+ endif()
+endif()
+
+# On versions < 1.35, remove the System library from the considered list
+# since it wasn't added until 1.35.
+if(Boost_VERSION AND Boost_FIND_COMPONENTS)
+ if(Boost_VERSION LESS 103500)
+ list(REMOVE_ITEM Boost_FIND_COMPONENTS system)
+ endif()
+endif()
+
+# Additional components may be required via component dependencies.
+# Add any missing components to the list.
+_Boost_MISSING_DEPENDENCIES(Boost_FIND_COMPONENTS _Boost_EXTRA_FIND_COMPONENTS)
+
+# If thread is required, get the thread libs as a dependency
+if("thread" IN_LIST Boost_FIND_COMPONENTS)
+ if(Boost_FIND_QUIETLY)
+ set(_Boost_find_quiet QUIET)
+ else()
+ set(_Boost_find_quiet "")
+ endif()
+ find_package(Threads ${_Boost_find_quiet})
+ unset(_Boost_find_quiet)
+endif()
+
+# If the user changed any of our control inputs flush previous results.
+if(_Boost_CHANGE_LIBDIR_DEBUG OR _Boost_CHANGE_LIBDIR_RELEASE OR _Boost_CHANGE_LIBNAME)
+ foreach(COMPONENT ${_Boost_COMPONENTS_SEARCHED})
+ string(TOUPPER ${COMPONENT} UPPERCOMPONENT)
+ foreach(c DEBUG RELEASE)
+ set(_var Boost_${UPPERCOMPONENT}_LIBRARY_${c})
+ unset(${_var} CACHE)
+ set(${_var} "${_var}-NOTFOUND")
+ endforeach()
+ endforeach()
+ set(_Boost_COMPONENTS_SEARCHED "")
+endif()
+
+foreach(COMPONENT ${Boost_FIND_COMPONENTS})
+ string(TOUPPER ${COMPONENT} UPPERCOMPONENT)
+
+ set( _boost_docstring_release "Boost ${COMPONENT} library (release)")
+ set( _boost_docstring_debug "Boost ${COMPONENT} library (debug)")
+
+ # Compute component-specific hints.
+ set(_Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT "")
+ if(${COMPONENT} STREQUAL "mpi" OR ${COMPONENT} STREQUAL "mpi_python" OR
+ ${COMPONENT} STREQUAL "graph_parallel")
+ foreach(lib ${MPI_CXX_LIBRARIES} ${MPI_C_LIBRARIES})
+ if(IS_ABSOLUTE "${lib}")
+ get_filename_component(libdir "${lib}" PATH)
+ string(REPLACE "\\" "/" libdir "${libdir}")
+ list(APPEND _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT ${libdir})
+ endif()
+ endforeach()
+ endif()
+
+ # Handle Python version suffixes
+ unset(COMPONENT_PYTHON_VERSION_MAJOR)
+ unset(COMPONENT_PYTHON_VERSION_MINOR)
+ if(${COMPONENT} MATCHES "^(python|mpi_python|numpy)([0-9])\$")
+ set(COMPONENT_UNVERSIONED "${CMAKE_MATCH_1}")
+ set(COMPONENT_PYTHON_VERSION_MAJOR "${CMAKE_MATCH_2}")
+ elseif(${COMPONENT} MATCHES "^(python|mpi_python|numpy)([0-9])\\.?([0-9])\$")
+ set(COMPONENT_UNVERSIONED "${CMAKE_MATCH_1}")
+ set(COMPONENT_PYTHON_VERSION_MAJOR "${CMAKE_MATCH_2}")
+ set(COMPONENT_PYTHON_VERSION_MINOR "${CMAKE_MATCH_3}")
+ endif()
+
+ unset(_Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME)
+ if (COMPONENT_PYTHON_VERSION_MINOR)
+ # Boost >= 1.67
+ list(APPEND _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME "${COMPONENT_UNVERSIONED}${COMPONENT_PYTHON_VERSION_MAJOR}${COMPONENT_PYTHON_VERSION_MINOR}")
+ # Debian/Ubuntu (Some versions omit the 2 and/or 3 from the suffix)
+ list(APPEND _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME "${COMPONENT_UNVERSIONED}${COMPONENT_PYTHON_VERSION_MAJOR}-py${COMPONENT_PYTHON_VERSION_MAJOR}${COMPONENT_PYTHON_VERSION_MINOR}")
+ list(APPEND _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME "${COMPONENT_UNVERSIONED}-py${COMPONENT_PYTHON_VERSION_MAJOR}${COMPONENT_PYTHON_VERSION_MINOR}")
+ # Gentoo
+ list(APPEND _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME "${COMPONENT_UNVERSIONED}-${COMPONENT_PYTHON_VERSION_MAJOR}${COMPONENT_PYTHON_VERSION_MINOR}")
+ # RPMs
+ list(APPEND _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME "${COMPONENT_UNVERSIONED}-${COMPONENT_PYTHON_VERSION_MAJOR}${COMPONENT_PYTHON_VERSION_MINOR}")
+ endif()
+ if (COMPONENT_PYTHON_VERSION_MAJOR AND NOT COMPONENT_PYTHON_VERSION_MINOR)
+ # Boost < 1.67
+ list(APPEND _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME "${COMPONENT_UNVERSIONED}${COMPONENT_PYTHON_VERSION_MAJOR}")
+ endif()
+
+ # Consolidate and report component-specific hints.
+ if(_Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME)
+ list(REMOVE_DUPLICATES _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME)
+ if(Boost_DEBUG)
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ "Component-specific library search names for ${COMPONENT_NAME}: "
+ "${_Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME}")
+ endif()
+ endif()
+ if(_Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT)
+ list(REMOVE_DUPLICATES _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT)
+ if(Boost_DEBUG)
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ "Component-specific library search paths for ${COMPONENT}: "
+ "${_Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT}")
+ endif()
+ endif()
+
+ #
+ # Find headers
+ #
+ _Boost_COMPONENT_HEADERS("${COMPONENT}" Boost_${UPPERCOMPONENT}_HEADER_NAME)
+ # Look for a standard boost header file.
+ if(Boost_${UPPERCOMPONENT}_HEADER_NAME)
+ if(EXISTS "${Boost_INCLUDE_DIR}/${Boost_${UPPERCOMPONENT}_HEADER_NAME}")
+ set(Boost_${UPPERCOMPONENT}_HEADER ON)
+ else()
+ set(Boost_${UPPERCOMPONENT}_HEADER OFF)
+ endif()
+ else()
+ set(Boost_${UPPERCOMPONENT}_HEADER ON)
+ message(WARNING "No header defined for ${COMPONENT}; skipping header check")
+ endif()
+
+ #
+ # Find RELEASE libraries
+ #
+ unset(_boost_RELEASE_NAMES)
+ foreach(component IN LISTS _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME COMPONENT)
+ foreach(compiler IN LISTS _boost_COMPILER)
+ list(APPEND _boost_RELEASE_NAMES
+ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${component}${compiler}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}${_boost_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${component}${compiler}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG} )
+ endforeach()
+ list(APPEND _boost_RELEASE_NAMES
+ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${component}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}${_boost_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${component}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}
+ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${component} )
+ if(_boost_STATIC_RUNTIME_WORKAROUND)
+ set(_boost_RELEASE_STATIC_ABI_TAG "-s${_boost_RELEASE_ABI_TAG}")
+ foreach(compiler IN LISTS _boost_COMPILER)
+ list(APPEND _boost_RELEASE_NAMES
+ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${component}${compiler}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}${_boost_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${component}${compiler}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG} )
+ endforeach()
+ list(APPEND _boost_RELEASE_NAMES
+ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${component}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}${_boost_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${component}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG} )
+ endif()
+ endforeach()
+ if(Boost_THREADAPI AND ${COMPONENT} STREQUAL "thread")
+ _Boost_PREPEND_LIST_WITH_THREADAPI(_boost_RELEASE_NAMES ${_boost_RELEASE_NAMES})
+ endif()
+ if(Boost_DEBUG)
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ "Searching for ${UPPERCOMPONENT}_LIBRARY_RELEASE: ${_boost_RELEASE_NAMES}")
+ endif()
+
+ # if Boost_LIBRARY_DIR_RELEASE is not defined,
+ # but Boost_LIBRARY_DIR_DEBUG is, look there first for RELEASE libs
+ if(NOT Boost_LIBRARY_DIR_RELEASE AND Boost_LIBRARY_DIR_DEBUG)
+ list(INSERT _boost_LIBRARY_SEARCH_DIRS_RELEASE 0 ${Boost_LIBRARY_DIR_DEBUG})
+ endif()
+
+ # Avoid passing backslashes to _Boost_FIND_LIBRARY due to macro re-parsing.
+ string(REPLACE "\\" "/" _boost_LIBRARY_SEARCH_DIRS_tmp "${_boost_LIBRARY_SEARCH_DIRS_RELEASE}")
+
+ if(Boost_USE_RELEASE_LIBS)
+ _Boost_FIND_LIBRARY(Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE RELEASE
+ NAMES ${_boost_RELEASE_NAMES}
+ HINTS ${_boost_LIBRARY_SEARCH_DIRS_tmp}
+ NAMES_PER_DIR
+ DOC "${_boost_docstring_release}"
+ )
+ endif()
+
+ #
+ # Find DEBUG libraries
+ #
+ unset(_boost_DEBUG_NAMES)
+ foreach(component IN LISTS _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME COMPONENT)
+ foreach(compiler IN LISTS _boost_COMPILER)
+ list(APPEND _boost_DEBUG_NAMES
+ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${component}${compiler}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}${_boost_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${component}${compiler}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG} )
+ endforeach()
+ list(APPEND _boost_DEBUG_NAMES
+ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${component}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}${_boost_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${component}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}
+ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${component}${_boost_MULTITHREADED}
+ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${component} )
+ if(_boost_STATIC_RUNTIME_WORKAROUND)
+ set(_boost_DEBUG_STATIC_ABI_TAG "-s${_boost_DEBUG_ABI_TAG}")
+ foreach(compiler IN LISTS _boost_COMPILER)
+ list(APPEND _boost_DEBUG_NAMES
+ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${component}${compiler}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}${_boost_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${component}${compiler}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG} )
+ endforeach()
+ list(APPEND _boost_DEBUG_NAMES
+ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${component}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}${_boost_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${component}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG} )
+ endif()
+ endforeach()
+ if(Boost_THREADAPI AND ${COMPONENT} STREQUAL "thread")
+ _Boost_PREPEND_LIST_WITH_THREADAPI(_boost_DEBUG_NAMES ${_boost_DEBUG_NAMES})
+ endif()
+ if(Boost_DEBUG)
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ "Searching for ${UPPERCOMPONENT}_LIBRARY_DEBUG: ${_boost_DEBUG_NAMES}")
+ endif()
+
+ # if Boost_LIBRARY_DIR_DEBUG is not defined,
+ # but Boost_LIBRARY_DIR_RELEASE is, look there first for DEBUG libs
+ if(NOT Boost_LIBRARY_DIR_DEBUG AND Boost_LIBRARY_DIR_RELEASE)
+ list(INSERT _boost_LIBRARY_SEARCH_DIRS_DEBUG 0 ${Boost_LIBRARY_DIR_RELEASE})
+ endif()
+
+ # Avoid passing backslashes to _Boost_FIND_LIBRARY due to macro re-parsing.
+ string(REPLACE "\\" "/" _boost_LIBRARY_SEARCH_DIRS_tmp "${_boost_LIBRARY_SEARCH_DIRS_DEBUG}")
+
+ if(Boost_USE_DEBUG_LIBS)
+ _Boost_FIND_LIBRARY(Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG DEBUG
+ NAMES ${_boost_DEBUG_NAMES}
+ HINTS ${_boost_LIBRARY_SEARCH_DIRS_tmp}
+ NAMES_PER_DIR
+ DOC "${_boost_docstring_debug}"
+ )
+ endif ()
+
+ if(Boost_REALPATH)
+ _Boost_SWAP_WITH_REALPATH(Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE "${_boost_docstring_release}")
+ _Boost_SWAP_WITH_REALPATH(Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG "${_boost_docstring_debug}" )
+ endif()
+
+ _Boost_ADJUST_LIB_VARS(${UPPERCOMPONENT})
+
+ # Check if component requires some compiler features
+ _Boost_COMPILER_FEATURES(${COMPONENT} _Boost_${UPPERCOMPONENT}_COMPILER_FEATURES)
+
+endforeach()
+
+# Restore the original find library ordering
+if( Boost_USE_STATIC_LIBS )
+ set(CMAKE_FIND_LIBRARY_SUFFIXES ${_boost_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
+endif()
+
+# ------------------------------------------------------------------------
+# End finding boost libraries
+# ------------------------------------------------------------------------
+
+set(Boost_INCLUDE_DIRS ${Boost_INCLUDE_DIR})
+set(Boost_LIBRARY_DIRS)
+if(Boost_LIBRARY_DIR_RELEASE)
+ list(APPEND Boost_LIBRARY_DIRS ${Boost_LIBRARY_DIR_RELEASE})
+endif()
+if(Boost_LIBRARY_DIR_DEBUG)
+ list(APPEND Boost_LIBRARY_DIRS ${Boost_LIBRARY_DIR_DEBUG})
+endif()
+if(Boost_LIBRARY_DIRS)
+ list(REMOVE_DUPLICATES Boost_LIBRARY_DIRS)
+endif()
+
+# The above setting of Boost_FOUND was based only on the header files.
+# Update it for the requested component libraries.
+if(Boost_FOUND)
+ # The headers were found. Check for requested component libs.
+ set(_boost_CHECKED_COMPONENT FALSE)
+ set(_Boost_MISSING_COMPONENTS "")
+ foreach(COMPONENT ${Boost_FIND_COMPONENTS})
+ string(TOUPPER ${COMPONENT} UPPERCOMPONENT)
+ set(_boost_CHECKED_COMPONENT TRUE)
+ if(NOT Boost_${UPPERCOMPONENT}_FOUND AND Boost_FIND_REQUIRED_${COMPONENT})
+ list(APPEND _Boost_MISSING_COMPONENTS ${COMPONENT})
+ endif()
+ endforeach()
+ if(_Boost_MISSING_COMPONENTS AND _Boost_EXTRA_FIND_COMPONENTS)
+ # Optional indirect dependencies are not counted as missing.
+ list(REMOVE_ITEM _Boost_MISSING_COMPONENTS ${_Boost_EXTRA_FIND_COMPONENTS})
+ endif()
+
+ if(Boost_DEBUG)
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] Boost_FOUND = ${Boost_FOUND}")
+ endif()
+
+ if (_Boost_MISSING_COMPONENTS)
+ set(Boost_FOUND 0)
+ # We were unable to find some libraries, so generate a sensible
+ # error message that lists the libraries we were unable to find.
+ string(APPEND Boost_ERROR_REASON
+ "\nCould not find the following")
+ if(Boost_USE_STATIC_LIBS)
+ string(APPEND Boost_ERROR_REASON " static")
+ endif()
+ string(APPEND Boost_ERROR_REASON
+ " Boost libraries:\n")
+ foreach(COMPONENT ${_Boost_MISSING_COMPONENTS})
+ string(TOUPPER ${COMPONENT} UPPERCOMPONENT)
+ string(APPEND Boost_ERROR_REASON
+ " ${Boost_NAMESPACE}_${COMPONENT}${Boost_ERROR_REASON_${UPPERCOMPONENT}}\n")
+ endforeach()
+
+ list(LENGTH Boost_FIND_COMPONENTS Boost_NUM_COMPONENTS_WANTED)
+ list(LENGTH _Boost_MISSING_COMPONENTS Boost_NUM_MISSING_COMPONENTS)
+ if (${Boost_NUM_COMPONENTS_WANTED} EQUAL ${Boost_NUM_MISSING_COMPONENTS})
+ string(APPEND Boost_ERROR_REASON
+ "No Boost libraries were found. You may need to set BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT to the location of Boost.")
+ else ()
+ string(APPEND Boost_ERROR_REASON
+ "Some (but not all) of the required Boost libraries were found. You may need to install these additional Boost libraries. Alternatively, set BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT to the location of Boost.")
+ endif ()
+ endif ()
+
+ if( NOT Boost_LIBRARY_DIRS AND NOT _boost_CHECKED_COMPONENT )
+ # Compatibility Code for backwards compatibility with CMake
+ # 2.4's FindBoost module.
+
+ # Look for the boost library path.
+ # Note that the user may not have installed any libraries
+ # so it is quite possible the Boost_LIBRARY_DIRS may not exist.
+ set(_boost_LIB_DIR ${Boost_INCLUDE_DIR})
+
+ if("${_boost_LIB_DIR}" MATCHES "boost-[0-9]+")
+ get_filename_component(_boost_LIB_DIR ${_boost_LIB_DIR} PATH)
+ endif()
+
+ if("${_boost_LIB_DIR}" MATCHES "/include$")
+ # Strip off the trailing "/include" in the path.
+ get_filename_component(_boost_LIB_DIR ${_boost_LIB_DIR} PATH)
+ endif()
+
+ if(EXISTS "${_boost_LIB_DIR}/lib")
+ string(APPEND _boost_LIB_DIR /lib)
+ elseif(EXISTS "${_boost_LIB_DIR}/stage/lib")
+ string(APPEND _boost_LIB_DIR "/stage/lib")
+ else()
+ set(_boost_LIB_DIR "")
+ endif()
+
+ if(_boost_LIB_DIR AND EXISTS "${_boost_LIB_DIR}")
+ set(Boost_LIBRARY_DIRS ${_boost_LIB_DIR})
+ endif()
+
+ endif()
+else()
+ # Boost headers were not found so no components were found.
+ foreach(COMPONENT ${Boost_FIND_COMPONENTS})
+ string(TOUPPER ${COMPONENT} UPPERCOMPONENT)
+ set(Boost_${UPPERCOMPONENT}_FOUND 0)
+ endforeach()
+endif()
+
+# ------------------------------------------------------------------------
+# Add imported targets
+# ------------------------------------------------------------------------
+
+if(Boost_FOUND)
+ # For header-only libraries
+ if(NOT TARGET Boost::boost)
+ add_library(Boost::boost INTERFACE IMPORTED)
+ if(Boost_INCLUDE_DIRS)
+ set_target_properties(Boost::boost PROPERTIES
+ INTERFACE_INCLUDE_DIRECTORIES "${Boost_INCLUDE_DIRS}")
+ endif()
+ endif()
+
+ foreach(COMPONENT ${Boost_FIND_COMPONENTS})
+ if(_Boost_IMPORTED_TARGETS AND NOT TARGET Boost::${COMPONENT})
+ string(TOUPPER ${COMPONENT} UPPERCOMPONENT)
+ if(Boost_${UPPERCOMPONENT}_FOUND)
+ if(Boost_USE_STATIC_LIBS)
+ add_library(Boost::${COMPONENT} STATIC IMPORTED)
+ else()
+ # Even if Boost_USE_STATIC_LIBS is OFF, we might have static
+ # libraries as a result.
+ add_library(Boost::${COMPONENT} UNKNOWN IMPORTED)
+ endif()
+ if(Boost_INCLUDE_DIRS)
+ set_target_properties(Boost::${COMPONENT} PROPERTIES
+ INTERFACE_INCLUDE_DIRECTORIES "${Boost_INCLUDE_DIRS}")
+ endif()
+ if(EXISTS "${Boost_${UPPERCOMPONENT}_LIBRARY}")
+ set_target_properties(Boost::${COMPONENT} PROPERTIES
+ IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
+ IMPORTED_LOCATION "${Boost_${UPPERCOMPONENT}_LIBRARY}")
+ endif()
+ if(EXISTS "${Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE}")
+ set_property(TARGET Boost::${COMPONENT} APPEND PROPERTY
+ IMPORTED_CONFIGURATIONS RELEASE)
+ set_target_properties(Boost::${COMPONENT} PROPERTIES
+ IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "CXX"
+ IMPORTED_LOCATION_RELEASE "${Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE}")
+ endif()
+ if(EXISTS "${Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG}")
+ set_property(TARGET Boost::${COMPONENT} APPEND PROPERTY
+ IMPORTED_CONFIGURATIONS DEBUG)
+ set_target_properties(Boost::${COMPONENT} PROPERTIES
+ IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "CXX"
+ IMPORTED_LOCATION_DEBUG "${Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG}")
+ endif()
+ if(_Boost_${UPPERCOMPONENT}_DEPENDENCIES)
+ unset(_Boost_${UPPERCOMPONENT}_TARGET_DEPENDENCIES)
+ foreach(dep ${_Boost_${UPPERCOMPONENT}_DEPENDENCIES})
+ list(APPEND _Boost_${UPPERCOMPONENT}_TARGET_DEPENDENCIES Boost::${dep})
+ endforeach()
+ if(COMPONENT STREQUAL "thread")
+ list(APPEND _Boost_${UPPERCOMPONENT}_TARGET_DEPENDENCIES Threads::Threads)
+ endif()
+ set_target_properties(Boost::${COMPONENT} PROPERTIES
+ INTERFACE_LINK_LIBRARIES "${_Boost_${UPPERCOMPONENT}_TARGET_DEPENDENCIES}")
+ endif()
+ if(_Boost_${UPPERCOMPONENT}_COMPILER_FEATURES)
+ set_target_properties(Boost::${COMPONENT} PROPERTIES
+ INTERFACE_COMPILE_FEATURES "${_Boost_${UPPERCOMPONENT}_COMPILER_FEATURES}")
+ endif()
+ endif()
+ endif()
+ endforeach()
+endif()
+
+# ------------------------------------------------------------------------
+# Notification to end user about what was found
+# ------------------------------------------------------------------------
+
+set(Boost_LIBRARIES "")
+if(Boost_FOUND)
+ if(NOT Boost_FIND_QUIETLY)
+ message(STATUS "Boost version: ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}")
+ if(Boost_FIND_COMPONENTS)
+ message(STATUS "Found the following Boost libraries:")
+ endif()
+ endif()
+ foreach( COMPONENT ${Boost_FIND_COMPONENTS} )
+ string( TOUPPER ${COMPONENT} UPPERCOMPONENT )
+ if( Boost_${UPPERCOMPONENT}_FOUND )
+ if(NOT Boost_FIND_QUIETLY)
+ message (STATUS " ${COMPONENT}")
+ endif()
+ list(APPEND Boost_LIBRARIES ${Boost_${UPPERCOMPONENT}_LIBRARY})
+ endif()
+ endforeach()
+else()
+ if(Boost_FIND_REQUIRED)
+ message(SEND_ERROR "Unable to find the requested Boost libraries.\n${Boost_ERROR_REASON}")
+ else()
+ if(NOT Boost_FIND_QUIETLY)
+ # we opt not to automatically output Boost_ERROR_REASON here as
+ # it could be quite lengthy and somewhat imposing in its requests
+ # Since Boost is not always a required dependency we'll leave this
+ # up to the end-user.
+ if(Boost_DEBUG OR Boost_DETAILED_FAILURE_MSG)
+ message(STATUS "Could NOT find Boost\n${Boost_ERROR_REASON}")
+ else()
+ message(STATUS "Could NOT find Boost")
+ endif()
+ endif()
+ endif()
+endif()
+
+# Configure display of cache entries in GUI.
+foreach(v BOOSTROOT BOOST_ROOT ${_Boost_VARS_INC} ${_Boost_VARS_LIB})
+ get_property(_type CACHE ${v} PROPERTY TYPE)
+ if(_type)
+ set_property(CACHE ${v} PROPERTY ADVANCED 1)
+ if("x${_type}" STREQUAL "xUNINITIALIZED")
+ if("x${v}" STREQUAL "xBoost_ADDITIONAL_VERSIONS")
+ set_property(CACHE ${v} PROPERTY TYPE STRING)
+ else()
+ set_property(CACHE ${v} PROPERTY TYPE PATH)
+ endif()
+ endif()
+ endif()
+endforeach()
+
+# Record last used values of input variables so we can
+# detect on the next run if the user changed them.
+foreach(v
+ ${_Boost_VARS_INC} ${_Boost_VARS_LIB}
+ ${_Boost_VARS_DIR} ${_Boost_VARS_NAME}
+ )
+ if(DEFINED ${v})
+ set(_${v}_LAST "${${v}}" CACHE INTERNAL "Last used ${v} value.")
+ else()
+ unset(_${v}_LAST CACHE)
+ endif()
+endforeach()
+
+# Maintain a persistent list of components requested anywhere since
+# the last flush.
+set(_Boost_COMPONENTS_SEARCHED "${_Boost_COMPONENTS_SEARCHED}")
+list(APPEND _Boost_COMPONENTS_SEARCHED ${Boost_FIND_COMPONENTS})
+list(REMOVE_DUPLICATES _Boost_COMPONENTS_SEARCHED)
+list(SORT _Boost_COMPONENTS_SEARCHED)
+set(_Boost_COMPONENTS_SEARCHED "${_Boost_COMPONENTS_SEARCHED}"
+ CACHE INTERNAL "Components requested for this build tree.")
+
+# Restore project's policies
+cmake_policy(POP)
diff --git a/cmake/FindGnuTLS.cmake b/cmake/FindGnuTLS.cmake
new file mode 100644
index 00000000..5395be3f
--- /dev/null
+++ b/cmake/FindGnuTLS.cmake
@@ -0,0 +1,65 @@
+#
+# This file is open source software, licensed to you under the terms
+# of the Apache License, Version 2.0 (the "License"). See the NOTICE file
+# distributed with this work for additional information regarding copyright
+# ownership. You may not use this file except in compliance with the License.
+#
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# Copyright (C) 2018 Scylladb, Ltd.
+#
+
+find_package (PkgConfig)
+
+pkg_search_module (PC_GnuTLS
+ QUIET
+ REQUIRED
+ gnutls)
+
+find_path (GnuTLS_INCLUDE_DIR
+ NAMES gnutls/gnutls.h
+ PATHS ${PC_GnuTLS_INCLUDE_DIRS})
+
+find_library (GnuTLS_LIBRARY
+ NAMES gnutls
+ PATHS ${PC_GnuTLS_LIBRARY_DIRS})
+
+set (GnuTLS_VERSION ${PC_GnuTLS_VERSION})
+
+include (FindPackageHandleStandardArgs)
+
+find_package_handle_standard_args (GnuTLS
+ FOUND_VAR GnuTLS_FOUND
+ REQUIRED_VARS
+ GnuTLS_INCLUDE_DIR
+ GnuTLS_LIBRARY
+ VERSION_VAR GnuTLS_VERSION)
+
+if (GnuTLS_FOUND)
+ set (GnuTLS_INCLUDE_DIRS ${GnuTLS_INCLUDE_DIR})
+endif ()
+
+if (GnuTLS_FOUND AND NOT (TARGET GnuTLS::gnutls))
+ add_library (GnuTLS::gnutls UNKNOWN IMPORTED)
+
+ set_target_properties (GnuTLS::gnutls
+ PROPERTIES
+ IMPORTED_LOCATION ${GnuTLS_LIBRARY}
+ INTERFACE_COMPILE_OPTIONS "${PC_GnuTLS_CFLAGS_OTHER}"
+ INTERFACE_INCLUDE_DIRECTORIES ${GnuTLS_INCLUDE_DIR})
+endif ()
+
+mark_as_advanced (
+ GnuTLS_INCLUDE_DIR
+ GnuTLS_LIBRARY)
diff --git a/cmake/FindLinuxMembarrier.cmake b/cmake/FindLinuxMembarrier.cmake
new file mode 100644
index 00000000..9cd19557
--- /dev/null
+++ b/cmake/FindLinuxMembarrier.cmake
@@ -0,0 +1,38 @@
+#
+# This file is open source software, licensed to you under the terms
+# of the Apache License, Version 2.0 (the "License"). See the NOTICE file
+# distributed with this work for additional information regarding copyright
+# ownership. You may not use this file except in compliance with the License.
+#
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# Copyright (C) 2018 Scylladb, Ltd.
+#
+
+find_path (LinuxMembarrier_INCLUDE_DIR
+ NAMES linux/membarrier.h)
+
+include (CheckCXXSourceCompiles)
+file (READ ${CMAKE_CURRENT_LIST_DIR}/code_test/LinuxMembarrier_test.cc _linuxmembarrier_test_code)
+check_cxx_source_compiles ("${_linuxmembarrier_test_code}" LinuxMembarrier_FOUND)
+
+include (FindPackageHandleStandardArgs)
+
+if (LinuxMembarrier_FOUND AND NOT (TARGET LinuxMembarrier::membarrier))
+ add_library (LinuxMembarrier::membarrier INTERFACE IMPORTED)
+
+ set_target_properties (LinuxMembarrier::membarrier
+ PROPERTIES
+ INTERFACE_INCLUDE_DIRECTORIES ${LinuxMembarrier_INCLUDE_DIR})
+endif ()
diff --git a/cmake/FindProtobuf.cmake b/cmake/FindProtobuf.cmake
new file mode 100644
index 00000000..76d1a3cc
--- /dev/null
+++ b/cmake/FindProtobuf.cmake
@@ -0,0 +1,578 @@
+# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
+# file Copyright.txt or https://cmake.org/licensing for details.
+
+#.rst:
+# FindProtobuf
+# ------------
+#
+# Locate and configure the Google Protocol Buffers library.
+#
+# The following variables can be set and are optional:
+#
+# ``Protobuf_SRC_ROOT_FOLDER``
+# When compiling with MSVC, if this cache variable is set
+# the protobuf-default VS project build locations
+# (vsprojects/Debug and vsprojects/Release
+# or vsprojects/x64/Debug and vsprojects/x64/Release)
+# will be searched for libraries and binaries.
+# ``Protobuf_IMPORT_DIRS``
+# List of additional directories to be searched for
+# imported .proto files.
+# ``Protobuf_DEBUG``
+# Show debug messages.
+# ``Protobuf_USE_STATIC_LIBS``
+# Set to ON to force the use of the static libraries.
+# Default is OFF.
+#
+# Defines the following variables:
+#
+# ``Protobuf_FOUND``
+# Found the Google Protocol Buffers library
+# (libprotobuf & header files)
+# ``Protobuf_VERSION``
+# Version of package found.
+# ``Protobuf_INCLUDE_DIRS``
+# Include directories for Google Protocol Buffers
+# ``Protobuf_LIBRARIES``
+# The protobuf libraries
+# ``Protobuf_PROTOC_LIBRARIES``
+# The protoc libraries
+# ``Protobuf_LITE_LIBRARIES``
+# The protobuf-lite libraries
+#
+# The following :prop_tgt:`IMPORTED` targets are also defined:
+#
+# ``protobuf::libprotobuf``
+# The protobuf library.
+# ``protobuf::libprotobuf-lite``
+# The protobuf lite library.
+# ``protobuf::libprotoc``
+# The protoc library.
+# ``protobuf::protoc``
+# The protoc compiler.
+#
+# The following cache variables are also available to set or use:
+#
+# ``Protobuf_LIBRARY``
+# The protobuf library
+# ``Protobuf_PROTOC_LIBRARY``
+# The protoc library
+# ``Protobuf_INCLUDE_DIR``
+# The include directory for protocol buffers
+# ``Protobuf_PROTOC_EXECUTABLE``
+# The protoc compiler
+# ``Protobuf_LIBRARY_DEBUG``
+# The protobuf library (debug)
+# ``Protobuf_PROTOC_LIBRARY_DEBUG``
+# The protoc library (debug)
+# ``Protobuf_LITE_LIBRARY``
+# The protobuf lite library
+# ``Protobuf_LITE_LIBRARY_DEBUG``
+# The protobuf lite library (debug)
+#
+# Example:
+#
+# .. code-block:: cmake
+#
+# find_package(Protobuf REQUIRED)
+# include_directories(${Protobuf_INCLUDE_DIRS})
+# include_directories(${CMAKE_CURRENT_BINARY_DIR})
+# protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS foo.proto)
+# protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS EXPORT_MACRO DLL_EXPORT foo.proto)
+# protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS DESCRIPTORS PROTO_DESCS foo.proto)
+# protobuf_generate_python(PROTO_PY foo.proto)
+# add_executable(bar bar.cc ${PROTO_SRCS} ${PROTO_HDRS})
+# target_link_libraries(bar ${Protobuf_LIBRARIES})
+#
+# .. note::
+# The ``protobuf_generate_cpp`` and ``protobuf_generate_python``
+# functions and :command:`add_executable` or :command:`add_library`
+# calls only work properly within the same directory.
+#
+# .. command:: protobuf_generate_cpp
+#
+# Add custom commands to process ``.proto`` files to C++::
+#
+# protobuf_generate_cpp (<SRCS> <HDRS>
+# [DESCRIPTORS <DESC>] [EXPORT_MACRO <MACRO>] [<ARGN>...])
+#
+# ``SRCS``
+# Variable to define with autogenerated source files
+# ``HDRS``
+# Variable to define with autogenerated header files
+# ``DESCRIPTORS``
+# Variable to define with autogenerated descriptor files, if requested.
+# ``EXPORT_MACRO``
+# is a macro which should expand to ``__declspec(dllexport)`` or
+# ``__declspec(dllimport)`` depending on what is being compiled.
+# ``ARGN``
+# ``.proto`` files
+#
+# .. command:: protobuf_generate_python
+#
+# Add custom commands to process ``.proto`` files to Python::
+#
+# protobuf_generate_python (<PY> [<ARGN>...])
+#
+# ``PY``
+# Variable to define with autogenerated Python files
+# ``ARGN``
+# ``.proto`` filess
+
+function(PROTOBUF_GENERATE_CPP SRCS HDRS)
+ cmake_parse_arguments(protobuf "" "EXPORT_MACRO;DESCRIPTORS" "" ${ARGN})
+
+ set(PROTO_FILES "${protobuf_UNPARSED_ARGUMENTS}")
+ if(NOT PROTO_FILES)
+ message(SEND_ERROR "Error: PROTOBUF_GENERATE_CPP() called without any proto files")
+ return()
+ endif()
+
+ if(protobuf_EXPORT_MACRO)
+ set(DLL_EXPORT_DECL "dllexport_decl=${protobuf_EXPORT_MACRO}:")
+ endif()
+
+ if(PROTOBUF_GENERATE_CPP_APPEND_PATH)
+ # Create an include path for each file specified
+ foreach(FIL ${PROTO_FILES})
+ get_filename_component(ABS_FIL ${FIL} ABSOLUTE)
+ get_filename_component(ABS_PATH ${ABS_FIL} PATH)
+ list(FIND _protobuf_include_path ${ABS_PATH} _contains_already)
+ if(${_contains_already} EQUAL -1)
+ list(APPEND _protobuf_include_path -I ${ABS_PATH})
+ endif()
+ endforeach()
+ else()
+ set(_protobuf_include_path -I ${CMAKE_CURRENT_SOURCE_DIR})
+ endif()
+
+ if(DEFINED PROTOBUF_IMPORT_DIRS AND NOT DEFINED Protobuf_IMPORT_DIRS)
+ set(Protobuf_IMPORT_DIRS "${PROTOBUF_IMPORT_DIRS}")
+ endif()
+
+ if(DEFINED Protobuf_IMPORT_DIRS)
+ foreach(DIR ${Protobuf_IMPORT_DIRS})
+ get_filename_component(ABS_PATH ${DIR} ABSOLUTE)
+ list(FIND _protobuf_include_path ${ABS_PATH} _contains_already)
+ if(${_contains_already} EQUAL -1)
+ list(APPEND _protobuf_include_path -I ${ABS_PATH})
+ endif()
+ endforeach()
+ endif()
+
+ set(${SRCS})
+ set(${HDRS})
+ if (protobuf_DESCRIPTORS)
+ set(${protobuf_DESCRIPTORS})
+ endif()
+
+ foreach(FIL ${PROTO_FILES})
+ get_filename_component(ABS_FIL ${FIL} ABSOLUTE)
+ get_filename_component(FIL_WE ${FIL} NAME_WE)
+ if(NOT PROTOBUF_GENERATE_CPP_APPEND_PATH)
+ get_filename_component(FIL_DIR ${FIL} DIRECTORY)
+ if(FIL_DIR)
+ set(FIL_WE "${FIL_DIR}/${FIL_WE}")
+ endif()
+ endif()
+
+ set(_protobuf_protoc_src "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.pb.cc")
+ set(_protobuf_protoc_hdr "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.pb.h")
+ list(APPEND ${SRCS} "${_protobuf_protoc_src}")
+ list(APPEND ${HDRS} "${_protobuf_protoc_hdr}")
+
+ if(protobuf_DESCRIPTORS)
+ set(_protobuf_protoc_desc "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.desc")
+ set(_protobuf_protoc_flags "--descriptor_set_out=${_protobuf_protoc_desc}")
+ list(APPEND ${protobuf_DESCRIPTORS} "${_protobuf_protoc_desc}")
+ else()
+ set(_protobuf_protoc_desc "")
+ set(_protobuf_protoc_flags "")
+ endif()
+
+ add_custom_command(
+ OUTPUT "${_protobuf_protoc_src}"
+ "${_protobuf_protoc_hdr}"
+ ${_protobuf_protoc_desc}
+ COMMAND protobuf::protoc
+ "--cpp_out=${DLL_EXPORT_DECL}${CMAKE_CURRENT_BINARY_DIR}"
+ ${_protobuf_protoc_flags}
+ ${_protobuf_include_path} ${ABS_FIL}
+ DEPENDS ${ABS_FIL} protobuf::protoc
+ COMMENT "Running C++ protocol buffer compiler on ${FIL}"
+ VERBATIM )
+ endforeach()
+
+ set(${SRCS} "${${SRCS}}" PARENT_SCOPE)
+ set(${HDRS} "${${HDRS}}" PARENT_SCOPE)
+ if(protobuf_DESCRIPTORS)
+ set(${protobuf_DESCRIPTORS} "${${protobuf_DESCRIPTORS}}" PARENT_SCOPE)
+ endif()
+endfunction()
+
+function(PROTOBUF_GENERATE_PYTHON SRCS)
+ if(NOT ARGN)
+ message(SEND_ERROR "Error: PROTOBUF_GENERATE_PYTHON() called without any proto files")
+ return()
+ endif()
+
+ if(PROTOBUF_GENERATE_CPP_APPEND_PATH)
+ # Create an include path for each file specified
+ foreach(FIL ${ARGN})
+ get_filename_component(ABS_FIL ${FIL} ABSOLUTE)
+ get_filename_component(ABS_PATH ${ABS_FIL} PATH)
+ list(FIND _protobuf_include_path ${ABS_PATH} _contains_already)
+ if(${_contains_already} EQUAL -1)
+ list(APPEND _protobuf_include_path -I ${ABS_PATH})
+ endif()
+ endforeach()
+ else()
+ set(_protobuf_include_path -I ${CMAKE_CURRENT_SOURCE_DIR})
+ endif()
+
+ if(DEFINED PROTOBUF_IMPORT_DIRS AND NOT DEFINED Protobuf_IMPORT_DIRS)
+ set(Protobuf_IMPORT_DIRS "${PROTOBUF_IMPORT_DIRS}")
+ endif()
+
+ if(DEFINED Protobuf_IMPORT_DIRS)
+ foreach(DIR ${Protobuf_IMPORT_DIRS})
+ get_filename_component(ABS_PATH ${DIR} ABSOLUTE)
+ list(FIND _protobuf_include_path ${ABS_PATH} _contains_already)
+ if(${_contains_already} EQUAL -1)
+ list(APPEND _protobuf_include_path -I ${ABS_PATH})
+ endif()
+ endforeach()
+ endif()
+
+ set(${SRCS})
+ foreach(FIL ${ARGN})
+ get_filename_component(ABS_FIL ${FIL} ABSOLUTE)
+ get_filename_component(FIL_WE ${FIL} NAME_WE)
+ if(NOT PROTOBUF_GENERATE_CPP_APPEND_PATH)
+ get_filename_component(FIL_DIR ${FIL} DIRECTORY)
+ if(FIL_DIR)
+ set(FIL_WE "${FIL_DIR}/${FIL_WE}")
+ endif()
+ endif()
+
+ list(APPEND ${SRCS} "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}_pb2.py")
+ add_custom_command(
+ OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}_pb2.py"
+ COMMAND protobuf::protoc --python_out ${CMAKE_CURRENT_BINARY_DIR} ${_protobuf_include_path} ${ABS_FIL}
+ DEPENDS ${ABS_FIL} protobuf::protoc
+ COMMENT "Running Python protocol buffer compiler on ${FIL}"
+ VERBATIM )
+ endforeach()
+
+ set(${SRCS} ${${SRCS}} PARENT_SCOPE)
+endfunction()
+
+
+if(Protobuf_DEBUG)
+ # Output some of their choices
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ "Protobuf_USE_STATIC_LIBS = ${Protobuf_USE_STATIC_LIBS}")
+endif()
+
+
+# Backwards compatibility
+# Define camel case versions of input variables
+foreach(UPPER
+ PROTOBUF_SRC_ROOT_FOLDER
+ PROTOBUF_IMPORT_DIRS
+ PROTOBUF_DEBUG
+ PROTOBUF_LIBRARY
+ PROTOBUF_PROTOC_LIBRARY
+ PROTOBUF_INCLUDE_DIR
+ PROTOBUF_PROTOC_EXECUTABLE
+ PROTOBUF_LIBRARY_DEBUG
+ PROTOBUF_PROTOC_LIBRARY_DEBUG
+ PROTOBUF_LITE_LIBRARY
+ PROTOBUF_LITE_LIBRARY_DEBUG
+ )
+ if (DEFINED ${UPPER})
+ string(REPLACE "PROTOBUF_" "Protobuf_" Camel ${UPPER})
+ if (NOT DEFINED ${Camel})
+ set(${Camel} ${${UPPER}})
+ endif()
+ endif()
+endforeach()
+
+if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+ set(_PROTOBUF_ARCH_DIR x64/)
+endif()
+
+
+# Support preference of static libs by adjusting CMAKE_FIND_LIBRARY_SUFFIXES
+if( Protobuf_USE_STATIC_LIBS )
+ set( _protobuf_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
+ if(WIN32)
+ set(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
+ else()
+ set(CMAKE_FIND_LIBRARY_SUFFIXES .a )
+ endif()
+endif()
+
+include(SelectLibraryConfigurations)
+
+# Internal function: search for normal library as well as a debug one
+# if the debug one is specified also include debug/optimized keywords
+# in *_LIBRARIES variable
+function(_protobuf_find_libraries name filename)
+ if(${name}_LIBRARIES)
+ # Use result recorded by a previous call.
+ return()
+ elseif(${name}_LIBRARY)
+ # Honor cache entry used by CMake 3.5 and lower.
+ set(${name}_LIBRARIES "${${name}_LIBRARY}" PARENT_SCOPE)
+ else()
+ find_library(${name}_LIBRARY_RELEASE
+ NAMES ${filename}
+ PATHS ${Protobuf_SRC_ROOT_FOLDER}/vsprojects/${_PROTOBUF_ARCH_DIR}Release)
+ mark_as_advanced(${name}_LIBRARY_RELEASE)
+
+ find_library(${name}_LIBRARY_DEBUG
+ NAMES ${filename}d ${filename}
+ PATHS ${Protobuf_SRC_ROOT_FOLDER}/vsprojects/${_PROTOBUF_ARCH_DIR}Debug)
+ mark_as_advanced(${name}_LIBRARY_DEBUG)
+
+ select_library_configurations(${name})
+ set(${name}_LIBRARY "${${name}_LIBRARY}" PARENT_SCOPE)
+ set(${name}_LIBRARIES "${${name}_LIBRARIES}" PARENT_SCOPE)
+ endif()
+endfunction()
+
+# Internal function: find threads library
+function(_protobuf_find_threads)
+ set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
+ find_package(Threads)
+ if(Threads_FOUND)
+ list(APPEND Protobuf_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
+ set(Protobuf_LIBRARIES "${Protobuf_LIBRARIES}" PARENT_SCOPE)
+ endif()
+endfunction()
+
+#
+# Main.
+#
+
+# By default have PROTOBUF_GENERATE_CPP macro pass -I to protoc
+# for each directory where a proto file is referenced.
+if(NOT DEFINED PROTOBUF_GENERATE_CPP_APPEND_PATH)
+ set(PROTOBUF_GENERATE_CPP_APPEND_PATH TRUE)
+endif()
+
+
+# Google's provided vcproj files generate libraries with a "lib"
+# prefix on Windows
+if(MSVC)
+ set(Protobuf_ORIG_FIND_LIBRARY_PREFIXES "${CMAKE_FIND_LIBRARY_PREFIXES}")
+ set(CMAKE_FIND_LIBRARY_PREFIXES "lib" "")
+
+ find_path(Protobuf_SRC_ROOT_FOLDER protobuf.pc.in)
+endif()
+
+# The Protobuf library
+_protobuf_find_libraries(Protobuf protobuf)
+#DOC "The Google Protocol Buffers RELEASE Library"
+
+_protobuf_find_libraries(Protobuf_LITE protobuf-lite)
+
+# The Protobuf Protoc Library
+_protobuf_find_libraries(Protobuf_PROTOC protoc)
+
+# Restore original find library prefixes
+if(MSVC)
+ set(CMAKE_FIND_LIBRARY_PREFIXES "${Protobuf_ORIG_FIND_LIBRARY_PREFIXES}")
+endif()
+
+if(UNIX)
+ _protobuf_find_threads()
+endif()
+
+# Find the include directory
+find_path(Protobuf_INCLUDE_DIR
+ google/protobuf/service.h
+ PATHS ${Protobuf_SRC_ROOT_FOLDER}/src
+)
+mark_as_advanced(Protobuf_INCLUDE_DIR)
+
+# Find the protoc Executable
+find_program(Protobuf_PROTOC_EXECUTABLE
+ NAMES protoc
+ DOC "The Google Protocol Buffers Compiler"
+ PATHS
+ ${Protobuf_SRC_ROOT_FOLDER}/vsprojects/${_PROTOBUF_ARCH_DIR}Release
+ ${Protobuf_SRC_ROOT_FOLDER}/vsprojects/${_PROTOBUF_ARCH_DIR}Debug
+)
+mark_as_advanced(Protobuf_PROTOC_EXECUTABLE)
+
+if(Protobuf_DEBUG)
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ "requested version of Google Protobuf is ${Protobuf_FIND_VERSION}")
+endif()
+
+if(Protobuf_INCLUDE_DIR)
+ set(_PROTOBUF_COMMON_HEADER ${Protobuf_INCLUDE_DIR}/google/protobuf/stubs/common.h)
+
+ if(Protobuf_DEBUG)
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ "location of common.h: ${_PROTOBUF_COMMON_HEADER}")
+ endif()
+
+ set(Protobuf_VERSION "")
+ set(Protobuf_LIB_VERSION "")
+ file(STRINGS ${_PROTOBUF_COMMON_HEADER} _PROTOBUF_COMMON_H_CONTENTS REGEX "#define[ \t]+GOOGLE_PROTOBUF_VERSION[ \t]+")
+ if(_PROTOBUF_COMMON_H_CONTENTS MATCHES "#define[ \t]+GOOGLE_PROTOBUF_VERSION[ \t]+([0-9]+)")
+ set(Protobuf_LIB_VERSION "${CMAKE_MATCH_1}")
+ endif()
+ unset(_PROTOBUF_COMMON_H_CONTENTS)
+
+ math(EXPR _PROTOBUF_MAJOR_VERSION "${Protobuf_LIB_VERSION} / 1000000")
+ math(EXPR _PROTOBUF_MINOR_VERSION "${Protobuf_LIB_VERSION} / 1000 % 1000")
+ math(EXPR _PROTOBUF_SUBMINOR_VERSION "${Protobuf_LIB_VERSION} % 1000")
+ set(Protobuf_VERSION "${_PROTOBUF_MAJOR_VERSION}.${_PROTOBUF_MINOR_VERSION}.${_PROTOBUF_SUBMINOR_VERSION}")
+
+ if(Protobuf_DEBUG)
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ "${_PROTOBUF_COMMON_HEADER} reveals protobuf ${Protobuf_VERSION}")
+ endif()
+
+ # Check Protobuf compiler version to be aligned with libraries version
+ execute_process(COMMAND ${Protobuf_PROTOC_EXECUTABLE} --version
+ OUTPUT_VARIABLE _PROTOBUF_PROTOC_EXECUTABLE_VERSION)
+
+ if("${_PROTOBUF_PROTOC_EXECUTABLE_VERSION}" MATCHES "libprotoc ([0-9.]+)")
+ set(_PROTOBUF_PROTOC_EXECUTABLE_VERSION "${CMAKE_MATCH_1}")
+ endif()
+
+ if(Protobuf_DEBUG)
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ "${Protobuf_PROTOC_EXECUTABLE} reveals version ${_PROTOBUF_PROTOC_EXECUTABLE_VERSION}")
+ endif()
+
+ if(NOT "${_PROTOBUF_PROTOC_EXECUTABLE_VERSION}" VERSION_EQUAL "${Protobuf_VERSION}")
+ message(WARNING "Protobuf compiler version ${_PROTOBUF_PROTOC_EXECUTABLE_VERSION}"
+ " doesn't match library version ${Protobuf_VERSION}")
+ endif()
+
+ if(Protobuf_LIBRARY)
+ if(NOT TARGET protobuf::libprotobuf)
+ add_library(protobuf::libprotobuf UNKNOWN IMPORTED)
+ set_target_properties(protobuf::libprotobuf PROPERTIES
+ INTERFACE_INCLUDE_DIRECTORIES "${Protobuf_INCLUDE_DIR}")
+ if(EXISTS "${Protobuf_LIBRARY}")
+ set_target_properties(protobuf::libprotobuf PROPERTIES
+ IMPORTED_LOCATION "${Protobuf_LIBRARY}")
+ endif()
+ if(EXISTS "${Protobuf_LIBRARY_RELEASE}")
+ set_property(TARGET protobuf::libprotobuf APPEND PROPERTY
+ IMPORTED_CONFIGURATIONS RELEASE)
+ set_target_properties(protobuf::libprotobuf PROPERTIES
+ IMPORTED_LOCATION_RELEASE "${Protobuf_LIBRARY_RELEASE}")
+ endif()
+ if(EXISTS "${Protobuf_LIBRARY_DEBUG}")
+ set_property(TARGET protobuf::libprotobuf APPEND PROPERTY
+ IMPORTED_CONFIGURATIONS DEBUG)
+ set_target_properties(protobuf::libprotobuf PROPERTIES
+ IMPORTED_LOCATION_DEBUG "${Protobuf_LIBRARY_DEBUG}")
+ endif()
+ endif()
+ endif()
+
+ if(Protobuf_LITE_LIBRARY)
+ if(NOT TARGET protobuf::libprotobuf-lite)
+ add_library(protobuf::libprotobuf-lite UNKNOWN IMPORTED)
+ set_target_properties(protobuf::libprotobuf-lite PROPERTIES
+ INTERFACE_INCLUDE_DIRECTORIES "${Protobuf_INCLUDE_DIR}")
+ if(EXISTS "${Protobuf_LITE_LIBRARY}")
+ set_target_properties(protobuf::libprotobuf-lite PROPERTIES
+ IMPORTED_LOCATION "${Protobuf_LITE_LIBRARY}")
+ endif()
+ if(EXISTS "${Protobuf_LITE_LIBRARY_RELEASE}")
+ set_property(TARGET protobuf::libprotobuf-lite APPEND PROPERTY
+ IMPORTED_CONFIGURATIONS RELEASE)
+ set_target_properties(protobuf::libprotobuf-lite PROPERTIES
+ IMPORTED_LOCATION_RELEASE "${Protobuf_LITE_LIBRARY_RELEASE}")
+ endif()
+ if(EXISTS "${Protobuf_LITE_LIBRARY_DEBUG}")
+ set_property(TARGET protobuf::libprotobuf-lite APPEND PROPERTY
+ IMPORTED_CONFIGURATIONS DEBUG)
+ set_target_properties(protobuf::libprotobuf-lite PROPERTIES
+ IMPORTED_LOCATION_DEBUG "${Protobuf_LITE_LIBRARY_DEBUG}")
+ endif()
+ endif()
+ endif()
+
+ if(Protobuf_PROTOC_LIBRARY)
+ if(NOT TARGET protobuf::libprotoc)
+ add_library(protobuf::libprotoc UNKNOWN IMPORTED)
+ set_target_properties(protobuf::libprotoc PROPERTIES
+ INTERFACE_INCLUDE_DIRECTORIES "${Protobuf_INCLUDE_DIR}")
+ if(EXISTS "${Protobuf_PROTOC_LIBRARY}")
+ set_target_properties(protobuf::libprotoc PROPERTIES
+ IMPORTED_LOCATION "${Protobuf_PROTOC_LIBRARY}")
+ endif()
+ if(EXISTS "${Protobuf_PROTOC_LIBRARY_RELEASE}")
+ set_property(TARGET protobuf::libprotoc APPEND PROPERTY
+ IMPORTED_CONFIGURATIONS RELEASE)
+ set_target_properties(protobuf::libprotoc PROPERTIES
+ IMPORTED_LOCATION_RELEASE "${Protobuf_PROTOC_LIBRARY_RELEASE}")
+ endif()
+ if(EXISTS "${Protobuf_PROTOC_LIBRARY_DEBUG}")
+ set_property(TARGET protobuf::libprotoc APPEND PROPERTY
+ IMPORTED_CONFIGURATIONS DEBUG)
+ set_target_properties(protobuf::libprotoc PROPERTIES
+ IMPORTED_LOCATION_DEBUG "${Protobuf_PROTOC_LIBRARY_DEBUG}")
+ endif()
+ endif()
+ endif()
+
+ if(Protobuf_PROTOC_EXECUTABLE)
+ if(NOT TARGET protobuf::protoc)
+ add_executable(protobuf::protoc IMPORTED)
+ if(EXISTS "${Protobuf_PROTOC_EXECUTABLE}")
+ set_target_properties(protobuf::protoc PROPERTIES
+ IMPORTED_LOCATION "${Protobuf_PROTOC_EXECUTABLE}")
+ endif()
+ endif()
+ endif()
+endif()
+
+include(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Protobuf
+ REQUIRED_VARS Protobuf_LIBRARIES Protobuf_INCLUDE_DIR
+ VERSION_VAR Protobuf_VERSION
+)
+
+if(Protobuf_FOUND)
+ set(Protobuf_INCLUDE_DIRS ${Protobuf_INCLUDE_DIR})
+endif()
+
+# Restore the original find library ordering
+if( Protobuf_USE_STATIC_LIBS )
+ set(CMAKE_FIND_LIBRARY_SUFFIXES ${_protobuf_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
+endif()
+
+# Backwards compatibility
+# Define upper case versions of output variables
+foreach(Camel
+ Protobuf_SRC_ROOT_FOLDER
+ Protobuf_IMPORT_DIRS
+ Protobuf_DEBUG
+ Protobuf_INCLUDE_DIRS
+ Protobuf_LIBRARIES
+ Protobuf_PROTOC_LIBRARIES
+ Protobuf_LITE_LIBRARIES
+ Protobuf_LIBRARY
+ Protobuf_PROTOC_LIBRARY
+ Protobuf_INCLUDE_DIR
+ Protobuf_PROTOC_EXECUTABLE
+ Protobuf_LIBRARY_DEBUG
+ Protobuf_PROTOC_LIBRARY_DEBUG
+ Protobuf_LITE_LIBRARY
+ Protobuf_LITE_LIBRARY_DEBUG
+ )
+ string(TOUPPER ${Camel} UPPER)
+ set(${UPPER} ${${Camel}})
+endforeach()
diff --git a/cmake/FindSanitizers.cmake b/cmake/FindSanitizers.cmake
new file mode 100644
index 00000000..4084ea4a
--- /dev/null
+++ b/cmake/FindSanitizers.cmake
@@ -0,0 +1,78 @@
+#
+# This file is open source software, licensed to you under the terms
+# of the Apache License, Version 2.0 (the "License"). See the NOTICE file
+# distributed with this work for additional information regarding copyright
+# ownership. You may not use this file except in compliance with the License.
+#
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# Copyright (C) 2018 Scylladb, Ltd.
+#
+
+include (CheckCXXSourceCompiles)
+
+set (CMAKE_REQUIRED_FLAGS -fsanitize=address)
+check_cxx_source_compiles ("int main() {}" Sanitizers_ADDRESS_FOUND)
+
+if (Sanitizers_ADDRESS_FOUND)
+ set (Sanitizers_ADDRESS_COMPILER_OPTIONS -fsanitize=address)
+endif ()
+
+set (CMAKE_REQUIRED_FLAGS -fsanitize=undefined)
+check_cxx_source_compiles ("int main() {}" Sanitizers_UNDEFINED_BEHAVIOR_FOUND)
+
+if (Sanitizers_UNDEFINED_BEHAVIOR_FOUND)
+ set (Sanitizers_UNDEFINED_BEHAVIOR_COMPILER_OPTIONS -fsanitize=undefined)
+endif ()
+
+if (Sanitizers_ADDRESS_FOUND AND Sanitizers_UNDEFINED_BEHAVIOR_FOUND)
+ set (Sanitizers_FOUND ON)
+endif ()
+
+set (Sanitizers_COMPILER_OPTIONS
+ ${Sanitizers_ADDRESS_COMPILER_OPTIONS}
+ ${Sanitizers_UNDEFINED_BEHAVIOR_COMPILER_OPTIONS})
+
+file (READ ${CMAKE_CURRENT_LIST_DIR}/code_test/Sanitizers_fiber_test.cc _sanitizers_fiber_test_code)
+set (CMAKE_REQUIRED_FLAGS ${Sanitizers_COMPILER_OPTIONS})
+check_cxx_source_compiles ("${_sanitizers_fiber_test_code}" Sanitizers_FIBER_SUPPORT)
+
+include (FindPackageHandleStandardArgs)
+
+find_package_handle_standard_args (Sanitizers
+ FOUND_VAR Sanitizers_FOUND
+ REQUIRED_VARS
+ Sanitizers_FIBER_SUPPORT
+ Sanitizers_ADDRESS_COMPILER_OPTIONS
+ Sanitizers_UNDEFINED_BEHAVIOR_COMPILER_OPTIONS)
+
+if (Sanitizers_FOUND)
+ if (NOT (TARGET Sanitizers::address))
+ add_library (Sanitizers::address INTERFACE IMPORTED)
+
+ set_target_properties (Sanitizers::address
+ PROPERTIES
+ INTERFACE_COMPILE_OPTIONS ${Sanitizers_ADDRESS_COMPILER_OPTIONS}
+ INTERFACE_LINK_LIBRARIES ${Sanitizers_ADDRESS_COMPILER_OPTIONS})
+ endif ()
+
+ if (NOT (TARGET Sanitizers::undefined_behavior))
+ add_library (Sanitizers::undefined_behavior INTERFACE IMPORTED)
+
+ set_target_properties (Sanitizers::undefined_behavior
+ PROPERTIES
+ INTERFACE_COMPILE_OPTIONS ${Sanitizers_UNDEFINED_BEHAVIOR_COMPILER_OPTIONS}
+ INTERFACE_LINK_LIBRARIES ${Sanitizers_UNDEFINED_BEHAVIOR_COMPILER_OPTIONS})
+ endif ()
+endif ()
diff --git a/cmake/FindStdFilesystem.cmake b/cmake/FindStdFilesystem.cmake
new file mode 100644
index 00000000..70d24221
--- /dev/null
+++ b/cmake/FindStdFilesystem.cmake
@@ -0,0 +1,63 @@
+#
+# This file is open source software, licensed to you under the terms
+# of the Apache License, Version 2.0 (the "License"). See the NOTICE file
+# distributed with this work for additional information regarding copyright
+# ownership. You may not use this file except in compliance with the License.
+#
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# Copyright (C) 2018 Scylladb, Ltd.
+#
+
+set (_stdfilesystem_test_source ${CMAKE_CURRENT_LIST_DIR}/code_test/StdFilesystem_test.cc)
+
+try_compile (StdFilesystem_test_stdc++fs
+ ${CMAKE_CURRENT_BINARY_DIR}
+ SOURCES ${_stdfilesystem_test_source}
+ LINK_LIBRARIES stdc++fs)
+
+if (StdFilesystem_test_stdc++fs)
+ set (StdFilesystem_LIBRARY_NAME stdc++fs)
+else ()
+ # Try libc++.
+ try_compile (StdFilesystem_test_c++experimental
+ ${CMAKE_CURRENT_BINARY_DIR}
+ SOURCES ${_stdfilesystem_test_source}
+ LINK_LIBRARIES libc++experimental)
+
+ if (StdFilesystem_test_c++experimental)
+ set (StdFilesystem_LIBRARY_NAME c++experimental)
+ endif ()
+endif ()
+
+if (StdFilesystem_LIBRARY_NAME)
+ set (StdFilesystem_FOUND ON)
+ set (StdFilesystem_LIBRARIES -l${StdFilesystem_LIBRARY_NAME})
+endif ()
+
+include (FindPackageHandleStandardArgs)
+
+find_package_handle_standard_args (StdFilesystem
+ FOUND_VAR StdFilesystem_FOUND
+ REQUIRED_VARS StdFilesystem_LIBRARY_NAME)
+
+if (StdFilesystem_FOUND AND NOT (TARGET StdFilesystem::filesystem))
+ add_library (StdFilesystem::filesystem INTERFACE IMPORTED)
+
+ set_target_properties (StdFilesystem::filesystem
+ PROPERTIES
+ INTERFACE_LINK_LIBRARIES ${StdFilesystem_LIBRARIES})
+endif ()
+
+mark_as_advanced (StdFilesystem_LIBRARY_NAME)
diff --git a/cmake/Findc-ares.cmake b/cmake/Findc-ares.cmake
new file mode 100644
index 00000000..bd9f5cf7
--- /dev/null
+++ b/cmake/Findc-ares.cmake
@@ -0,0 +1,55 @@
+#
+# This file is open source software, licensed to you under the terms
+# of the Apache License, Version 2.0 (the "License"). See the NOTICE file
+# distributed with this work for additional information regarding copyright
+# ownership. You may not use this file except in compliance with the License.
+#
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# Copyright (C) 2018 Scylladb, Ltd.
+#
+
+find_path (c-ares_INCLUDE_DIR
+ NAMES ares_dns.h)
+
+find_library (c-ares_LIBRARY
+ NAMES cares)
+
+if (c-ares_INCLUDE_DIR AND c-ares_LIBRARY)
+ set (c-ares_FOUND ON)
+ set (c-ares_LIBRARIES ${c-ares_LIBRARY})
+ set (c-ares_INCLUDE_DIRS ${c-ares_INCLUDE_DIR})
+endif ()
+
+include (FindPackageHandleStandardArgs)
+
+find_package_handle_standard_args (c-ares
+ FOUND_VAR c-ares_FOUND
+ REQUIRED_VARS
+ c-ares_INCLUDE_DIR
+ c-ares_LIBRARY
+ VERSION_VAR c-ares_VERSION)
+
+if (c-ares_FOUND AND NOT (TARGET c-ares::c-ares))
+ add_library (c-ares::c-ares UNKNOWN IMPORTED)
+
+ set_target_properties (c-ares::c-ares
+ PROPERTIES
+ IMPORTED_LOCATION ${c-ares_LIBRARY}
+ INTERFACE_INCLUDE_DIRECTORIES ${c-ares_INCLUDE_DIRS})
+endif ()
+
+mark_as_advanced (
+ c-ares_INCLUDE_DIR
+ c-ares_LIBRARY)
diff --git a/cmake/Findcryptopp.cmake b/cmake/Findcryptopp.cmake
new file mode 100644
index 00000000..c5a5ad42
--- /dev/null
+++ b/cmake/Findcryptopp.cmake
@@ -0,0 +1,55 @@
+#
+# This file is open source software, licensed to you under the terms
+# of the Apache License, Version 2.0 (the "License"). See the NOTICE file
+# distributed with this work for additional information regarding copyright
+# ownership. You may not use this file except in compliance with the License.
+#
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# Copyright (C) 2018 Scylladb, Ltd.
+#
+
+find_path (cryptopp_INCLUDE_DIR
+ NAMES cryptopp/aes.h)
+
+find_library (cryptopp_LIBRARY
+ NAMES cryptopp)
+
+if (cryptopp_INCLUDE_DIR AND cryptopp_LIBRARY)
+ set (cryptopp_FOUND ON)
+ set (cryptopp_LIBRARIES ${cryptopp_LIBRARY})
+ set (cryptopp_INCLUDE_DIRS ${cryptopp_INCLUDE_DIR})
+endif ()
+
+include (FindPackageHandleStandardArgs)
+
+find_package_handle_standard_args (cryptopp
+ FOUND_VAR cryptopp_FOUND
+ REQUIRED_VARS
+ cryptopp_INCLUDE_DIR
+ cryptopp_LIBRARY
+ VERSION_VAR cryptopp_VERSION)
+
+if (cryptopp_FOUND AND NOT (TARGET cryptopp::cryptopp))
+ add_library (cryptopp::cryptopp UNKNOWN IMPORTED)
+
+ set_target_properties (cryptopp::cryptopp
+ PROPERTIES
+ IMPORTED_LOCATION ${cryptopp_LIBRARY}
+ INTERFACE_INCLUDE_DIRECTORIES ${cryptopp_INCLUDE_DIRS})
+endif ()
+
+mark_as_advanced (
+ cryptopp_INCLUDE_DIR
+ cryptopp_LIBRARY)
diff --git a/cmake/Finddl.cmake b/cmake/Finddl.cmake
new file mode 100644
index 00000000..b1d023d7
--- /dev/null
+++ b/cmake/Finddl.cmake
@@ -0,0 +1,62 @@
+#
+# This file is open source software, licensed to you under the terms
+# of the Apache License, Version 2.0 (the "License"). See the NOTICE file
+# distributed with this work for additional information regarding copyright
+# ownership. You may not use this file except in compliance with the License.
+#
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# Copyright (C) 2018 Scylladb, Ltd.
+#
+
+set (_dl_test_source ${CMAKE_CURRENT_LIST_DIR}/code_test/dl_test.cc)
+
+# Try to compile without the library first.
+try_compile (_dl_test_nil
+ ${CMAKE_CURRENT_BINARY_DIR}
+ SOURCES ${_dl_test_source})
+
+if (NOT _dl_test_nil)
+ # The `dl` library is required.
+
+ try_compile (_dl_test
+ ${CMAKE_CURRENT_BINARY_DIR}
+ SOURCES ${_dl_test_source}
+ LINK_LIBRARIES dl)
+
+ if (_dl_test)
+ set (dl_LIBRARY_NAME dl)
+ endif ()
+endif ()
+
+if (_dl_test_nil OR dl_LIBRARY_NAME)
+ set (dl_FOUND ON)
+ set (dl_LIBRARIES -l${dl_LIBRARY_NAME})
+endif ()
+
+include (FindPackageHandleStandardArgs)
+
+find_package_handle_standard_args (dl
+ FOUND_VAR dl_FOUND
+ REQUIRED_VARS dl_LIBRARY_NAME)
+
+if (dl_FOUND AND NOT (TARGET dl::dl))
+ add_library (dl::dl INTERFACE IMPORTED)
+
+ set_target_properties (dl::dl
+ PROPERTIES
+ INTERFACE_LINK_LIBRARIES ${dl_LIBRARIES})
+endif ()
+
+mark_as_advanced (dl_LIBRARY_NAME)
diff --git a/cmake/Finddpdk.cmake b/cmake/Finddpdk.cmake
new file mode 100644
index 00000000..fb44141c
--- /dev/null
+++ b/cmake/Finddpdk.cmake
@@ -0,0 +1,405 @@
+#
+# This file is open source software, licensed to you under the terms
+# of the Apache License, Version 2.0 (the "License"). See the NOTICE file
+# distributed with this work for additional information regarding copyright
+# ownership. You may not use this file except in compliance with the License.
+#
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# Copyright (C) 2018 Scylladb, Ltd.
+#
+
+find_path (dpdk_INCLUDE_DIR
+ NAMES rte_atomic.h
+ PATH_SUFFIXES dpdk)
+
+if (dpdk_INCLUDE_DIR)
+ set (dpdk_FOUND ON)
+endif ()
+
+find_library (dpdk_PMD_VMXNET3_UIO_LIBRARY rte_pmd_vmxnet3_uio)
+find_library (dpdk_PMD_I40E_LIBRARY rte_pmd_i40e)
+find_library (dpdk_PMD_IXGBE_LIBRARY rte_pmd_ixgbe)
+find_library (dpdk_PMD_E1000_LIBRARY rte_pmd_e1000)
+find_library (dpdk_PMD_BNXT_LIBRARY rte_pmd_bnxt)
+find_library (dpdk_PMD_RING_LIBRARY rte_pmd_ring)
+find_library (dpdk_PMD_CXGBE_LIBRARY rte_pmd_cxgbe)
+find_library (dpdk_PMD_ENA_LIBRARY rte_pmd_ena)
+find_library (dpdk_PMD_ENIC_LIBRARY rte_pmd_enic)
+find_library (dpdk_PMD_FM10K_LIBRARY rte_pmd_fm10k)
+find_library (dpdk_PMD_NFP_LIBRARY rte_pmd_nfp)
+find_library (dpdk_PMD_QEDE_LIBRARY rte_pmd_qede)
+find_library (dpdk_RING_LIBRARY rte_ring)
+find_library (dpdk_KVARGS_LIBRARY rte_kvargs)
+find_library (dpdk_MEMPOOL_LIBRARY rte_mempool)
+find_library (dpdk_MEMPOOL_RING_LIBRARY rte_mempool_ring)
+find_library (dpdk_PMD_SFC_EFX_LIBRARY rte_pmd_sfc_efx)
+find_library (dpdk_HASH_LIBRARY rte_hash)
+find_library (dpdk_CMDLINE_LIBRARY rte_cmdline)
+find_library (dpdk_MBUF_LIBRARY rte_mbuf)
+find_library (dpdk_CFGFILE_LIBRARY rte_cfgfile)
+find_library (dpdk_EAL_LIBRARY rte_eal)
+find_library (dpdk_ETHDEV_LIBRARY rte_ethdev)
+
+set (dpdk_LIBRARIES
+ ${dpdk_CFGFILE_LIBRARY}
+ ${dpdk_CMDLINE_LIBRARY}
+ ${dpdk_EAL_LIBRARY}
+ ${dpdk_ETHDEV_LIBRARY}
+ ${dpdk_HASH_LIBRARY}
+ ${dpdk_KVARGS_LIBRARY}
+ ${dpdk_MBUF_LIBRARY}
+ ${dpdk_MEMPOOL_LIBRARY}
+ ${dpdk_MEMPOOL_RING_LIBRARY}
+ ${dpdk_PMD_BNXT_LIBRARY}
+ ${dpdk_PMD_E1000_LIBRARY}
+ ${dpdk_PMD_ENA_LIBRARY}
+ ${dpdk_PMD_ENIC_LIBRARY}
+ ${dpdk_PMD_FM10K_LIBRARY}
+ ${dpdk_PMD_QEDE_LIBRARY}
+ ${dpdk_PMD_I40E_LIBRARY}
+ ${dpdk_PMD_IXGBE_LIBRARY}
+ ${dpdk_PMD_NFP_LIBRARY}
+ ${dpdk_PMD_RING_LIBRARY}
+ ${dpdk_PMD_SFC_EFX_LIBRARY}
+ ${dpdk_PMD_VMXNET3_UIO_LIBRARY}
+ ${dpdk_RING_LIBRARY})
+
+include (FindPackageHandleStandardArgs)
+
+find_package_handle_standard_args (dpdk
+ FOUND_VAR dpdk_FOUND
+ REQUIRED_VARS
+ dpdk_INCLUDE_DIR
+ dpdk_LIBRARIES)
+
+if (dpdk_FOUND AND NOT (TARGET dpdk::dpdk))
+ add_library (_dpdk_common INTERFACE IMPORTED)
+
+ set_target_properties (_dpdk_common
+ PROPERTIES
+ INTERFACE_COMPILE_OPTIONS -march=native)
+
+ #
+ # pmd_vmxnet3_uio
+ #
+
+ add_library (dpdk::pmd_vmxnet3_uio UNKNOWN IMPORTED)
+
+ set_target_properties (dpdk::pmd_vmxnet3_uio
+ PROPERTIES
+ IMPORTED_LOCATION ${dpdk_PMD_VMXNET3_UIO_LIBRARY}
+ INTERFACE_INCLUDE_DIRECTORIES ${dpdk_INCLUDE_DIR})
+
+ #
+ # pmd_i40e
+ #
+
+ add_library (dpdk::pmd_i40e UNKNOWN IMPORTED)
+
+ set_target_properties (dpdk::pmd_i40e
+ PROPERTIES
+ IMPORTED_LOCATION ${dpdk_PMD_I40E_LIBRARY}
+ INTERFACE_LINK_LIBRARIES _dpdk_common
+ INTERFACE_INCLUDE_DIRECTORIES ${dpdk_INCLUDE_DIR})
+
+ #
+ # pmd_ixgbe
+ #
+
+ add_library (dpdk::pmd_ixgbe UNKNOWN IMPORTED)
+
+ set_target_properties (dpdk::pmd_ixgbe
+ PROPERTIES
+ IMPORTED_LOCATION ${dpdk_PMD_IXGBE_LIBRARY}
+ INTERFACE_LINK_LIBRARIES _dpdk_common
+ INTERFACE_INCLUDE_DIRECTORIES ${dpdk_INCLUDE_DIR})
+
+ #
+ # pmd_e1000
+ #
+
+ add_library (dpdk::pmd_e1000 UNKNOWN IMPORTED)
+
+ set_target_properties (dpdk::pmd_e1000
+ PROPERTIES
+ IMPORTED_LOCATION ${dpdk_PMD_E1000_LIBRARY}
+ INTERFACE_LINK_LIBRARIES _dpdk_common
+ INTERFACE_INCLUDE_DIRECTORIES ${dpdk_INCLUDE_DIR})
+
+ #
+ # pmd_bnxt
+ #
+
+ add_library (dpdk::pmd_bnxt UNKNOWN IMPORTED)
+
+ set_target_properties (dpdk::pmd_bnxt
+ PROPERTIES
+ IMPORTED_LOCATION ${dpdk_PMD_BNXT_LIBRARY}
+ INTERFACE_LINK_LIBRARIES _dpdk_common
+ INTERFACE_INCLUDE_DIRECTORIES ${dpdk_INCLUDE_DIR})
+
+ #
+ # pmd_ring
+ #
+
+ add_library (dpdk::pmd_ring UNKNOWN IMPORTED)
+
+ set_target_properties (dpdk::pmd_ring
+ PROPERTIES
+ IMPORTED_LOCATION ${dpdk_PMD_RING_LIBRARY}
+ INTERFACE_LINK_LIBRARIES _dpdk_common
+ INTERFACE_INCLUDE_DIRECTORIES ${dpdk_INCLUDE_DIR})
+
+ #
+ # pmd_cxgbe
+ #
+
+ add_library (dpdk::pmd_cxgbe UNKNOWN IMPORTED)
+
+ set_target_properties (dpdk::pmd_cxgbe
+ PROPERTIES
+ IMPORTED_LOCATION ${dpdk_PMD_CXGBE_LIBRARY}
+ INTERFACE_LINK_LIBRARIES _dpdk_common
+ INTERFACE_INCLUDE_DIRECTORIES ${dpdk_INCLUDE_DIR})
+
+ #
+ # pmd_ena
+ #
+
+ add_library (dpdk::pmd_ena UNKNOWN IMPORTED)
+
+ set_target_properties (dpdk::pmd_ena
+ PROPERTIES
+ IMPORTED_LOCATION ${dpdk_PMD_ENA_LIBRARY}
+ INTERFACE_LINK_LIBRARIES _dpdk_common
+ INTERFACE_INCLUDE_DIRECTORIES ${dpdk_INCLUDE_DIR})
+
+ #
+ # pmd_enic
+ #
+
+ add_library (dpdk::pmd_enic UNKNOWN IMPORTED)
+
+ set_target_properties (dpdk::pmd_enic
+ PROPERTIES
+ IMPORTED_LOCATION ${dpdk_PMD_ENIC_LIBRARY}
+ INTERFACE_LINK_LIBRARIES _dpdk_common
+ INTERFACE_INCLUDE_DIRECTORIES ${dpdk_INCLUDE_DIR})
+
+ #
+ # pmd_fm10k
+ #
+
+ add_library (dpdk::pmd_fm10k UNKNOWN IMPORTED)
+
+ set_target_properties (dpdk::pmd_fm10k
+ PROPERTIES
+ IMPORTED_LOCATION ${dpdk_PMD_FM10K_LIBRARY}
+ INTERFACE_LINK_LIBRARIES _dpdk_common
+ INTERFACE_INCLUDE_DIRECTORIES ${dpdk_INCLUDE_DIR})
+
+ #
+ # pmd_nfp
+ #
+
+ add_library (dpdk::pmd_nfp UNKNOWN IMPORTED)
+
+ set_target_properties (dpdk::pmd_nfp
+ PROPERTIES
+ IMPORTED_LOCATION ${dpdk_PMD_NFP_LIBRARY}
+ INTERFACE_LINK_LIBRARIES _dpdk_common
+ INTERFACE_INCLUDE_DIRECTORIES ${dpdk_INCLUDE_DIR})
+
+ #
+ # pmd_qede
+ #
+
+ add_library (dpdk::pmd_qede UNKNOWN IMPORTED)
+
+ set_target_properties (dpdk::pmd_qede
+ PROPERTIES
+ IMPORTED_LOCATION ${dpdk_PMD_QEDE_LIBRARY}
+ INTERFACE_LINK_LIBRARIES _dpdk_common
+ INTERFACE_INCLUDE_DIRECTORIES ${dpdk_INCLUDE_DIR})
+
+ #
+ # pmd_sfc_efx
+ #
+
+ add_library (dpdk::pmd_sfc_efx UNKNOWN IMPORTED)
+
+ set_target_properties (dpdk::pmd_sfc_efx
+ PROPERTIES
+ IMPORTED_LOCATION ${dpdk_PMD_SFC_EFX_LIBRARY}
+ INTERFACE_LINK_LIBRARIES _dpdk_common
+ INTERFACE_INCLUDE_DIRECTORIES ${dpdk_INCLUDE_DIR})
+
+ #
+ # hash
+ #
+
+ add_library (dpdk::hash UNKNOWN IMPORTED)
+
+ set_target_properties (dpdk::hash
+ PROPERTIES
+ IMPORTED_LOCATION ${dpdk_HASH_LIBRARY}
+ INTERFACE_LINK_LIBRARIES _dpdk_common
+ INTERFACE_INCLUDE_DIRECTORIES ${dpdk_INCLUDE_DIR})
+
+ #
+ # kvargs
+ #
+
+ add_library (dpdk::kvargs UNKNOWN IMPORTED)
+
+ set_target_properties (dpdk::kvargs
+ PROPERTIES
+ IMPORTED_LOCATION ${dpdk_KVARGS_LIBRARY}
+ INTERFACE_LINK_LIBRARIES _dpdk_common
+ INTERFACE_INCLUDE_DIRECTORIES ${dpdk_INCLUDE_DIR})
+
+ #
+ # mbuf
+ #
+
+ add_library (dpdk::mbuf UNKNOWN IMPORTED)
+
+ set_target_properties (dpdk::mbuf
+ PROPERTIES
+ IMPORTED_LOCATION ${dpdk_MBUF_LIBRARY}
+ INTERFACE_LINK_LIBRARIES _dpdk_common
+ INTERFACE_INCLUDE_DIRECTORIES ${dpdk_INCLUDE_DIR}
+ INTERFACE_LINK_LIBRARIES dpdk::eal)
+
+ #
+ # eal
+ #
+
+ add_library (dpdk::eal UNKNOWN IMPORTED)
+
+ set_target_properties (dpdk::eal
+ PROPERTIES
+ IMPORTED_LOCATION ${dpdk_EAL_LIBRARY}
+ INTERFACE_LINK_LIBRARIES _dpdk_common
+ INTERFACE_INCLUDE_DIRECTORIES ${dpdk_INCLUDE_DIR})
+
+ #
+ # ethdev
+ #
+
+ add_library (dpdk::ethdev UNKNOWN IMPORTED)
+
+ set_target_properties (dpdk::ethdev
+ PROPERTIES
+ IMPORTED_LOCATION ${dpdk_ETHDEV_LIBRARY}
+ INTERFACE_LINK_LIBRARIES _dpdk_common
+ INTERFACE_INCLUDE_DIRECTORIES ${dpdk_INCLUDE_DIR}
+ INTERACE_LINK_LIBRARIES dpdk::eal)
+
+ #
+ # mempool
+ #
+
+ add_library (dpdk::mempool UNKNOWN IMPORTED)
+
+ set_target_properties (dpdk::mempool
+ PROPERTIES
+ IMPORTED_LOCATION ${dpdk_MEMPOOL_LIBRARY}
+ INTERFACE_LINK_LIBRARIES _dpdk_common
+ INTERFACE_INCLUDE_DIRECTORIES ${dpdk_INCLUDE_DIR})
+
+ #
+ # mempool_ring
+ #
+
+ add_library (dpdk::mempool_ring UNKNOWN IMPORTED)
+
+ set_target_properties (dpdk::mempool_ring
+ PROPERTIES
+ IMPORTED_LOCATION ${dpdk_MEMPOOL_RING_LIBRARY}
+ INTERFACE_LINK_LIBRARIES _dpdk_common
+ INTERFACE_INCLUDE_DIRECTORIES ${dpdk_INCLUDE_DIR})
+
+ #
+ # ring
+ #
+
+ add_library (dpdk::ring UNKNOWN IMPORTED)
+
+ set_target_properties (dpdk::ring
+ PROPERTIES
+ IMPORTED_LOCATION ${dpdk_RING_LIBRARY}
+ INTERFACE_LINK_LIBRARIES _dpdk_common
+ INTERFACE_INCLUDE_DIRECTORIES ${dpdk_INCLUDE_DIR})
+
+ #
+ # cmdline
+ #
+
+ add_library (dpdk::cmdline UNKNOWN IMPORTED)
+
+ set_target_properties (dpdk::cmdline
+ PROPERTIES
+ IMPORTED_LOCATION ${dpdk_CMDLINE_LIBRARY}
+ INTERFACE_LINK_LIBRARIES _dpdk_common
+ INTERFACE_INCLUDE_DIRECTORIES ${dpdk_INCLUDE_DIR})
+
+ #
+ # cfgfile
+ #
+
+ add_library (dpdk::cfgfile UNKNOWN IMPORTED)
+
+ set_target_properties (dpdk::cfgfile
+ PROPERTIES
+ IMPORTED_LOCATION ${dpdk_CFGFILE_LIBRARY}
+ INTERFACE_LINK_LIBRARIES _dpdk_common
+ INTERFACE_INCLUDE_DIRECTORIES ${dpdk_INCLUDE_DIR})
+
+ #
+ # Summary.
+ #
+
+ add_library (dpdk::dpdk INTERFACE IMPORTED)
+
+ set (_dpdk_libraries
+ dpdk::cfgfile
+ dpdk::cmdline
+ dpdk::eal
+ dpdk::ethdev
+ dpdk::hash
+ dpdk::kvargs
+ dpdk::mbuf
+ dpdk::mempool
+ dpdk::mempool_ring
+ dpdk::pmd_bnxt
+ dpdk::pmd_cxgbe
+ dpdk::pmd_e1000
+ dpdk::pmd_ena
+ dpdk::pmd_enic
+ dpdk::pmd_fm10k
+ dpdk::pmd_qede
+ dpdk::pmd_i40e
+ dpdk::pmd_ixgbe
+ dpdk::pmd_nfp
+ dpdk::pmd_ring
+ dpdk::pmd_sfc_efx
+ dpdk::pmd_vmxnet3_uio
+ dpdk::ring)
+
+ set_target_properties (dpdk::dpdk
+ PROPERTIES
+ INTERFACE_LINK_LIBRARIES "${_dpdk_libraries}")
+endif ()
diff --git a/cmake/Findhwloc.cmake b/cmake/Findhwloc.cmake
new file mode 100644
index 00000000..36939237
--- /dev/null
+++ b/cmake/Findhwloc.cmake
@@ -0,0 +1,65 @@
+#
+# This file is open source software, licensed to you under the terms
+# of the Apache License, Version 2.0 (the "License"). See the NOTICE file
+# distributed with this work for additional information regarding copyright
+# ownership. You may not use this file except in compliance with the License.
+#
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# Copyright (C) 2018 Scylladb, Ltd.
+#
+
+find_package (PkgConfig)
+
+pkg_search_module (PC_hwloc
+ REQUIRED
+ QUIET
+ hwloc)
+
+find_path (hwloc_INCLUDE_DIR
+ NAMES hwloc.h
+ PATHS ${PC_hwloc_INCLUDE_DIRS})
+
+find_library (hwloc_LIBRARY
+ NAMES hwloc
+ PATHS ${PC_hwloc_LIBRARY_DIRS})
+
+set (hwloc_VERSION ${PC_hwloc_VERSION})
+
+include (FindPackageHandleStandardArgs)
+
+find_package_handle_standard_args (hwloc
+ FOUND_VAR hwloc_FOUND
+ REQUIRED_VARS
+ hwloc_INCLUDE_DIR
+ hwloc_LIBRARY
+ VERSION_VAR hwloc_VERSION)
+
+if (hwloc_FOUND)
+ set (hwloc_INCLUDE_DIRS ${hwloc_INCLUDE_DIR})
+endif ()
+
+if (hwloc_FOUND AND NOT (TARGET hwloc::hwloc))
+ add_library (hwloc::hwloc UNKNOWN IMPORTED)
+
+ set_target_properties (hwloc::hwloc
+ PROPERTIES
+ IMPORTED_LOCATION ${hwloc_LIBRARY}
+ INTERFACE_COMPILE_OPTIONS "${PC_hwloc_CFLAGS_OTHER}"
+ INTERFACE_INCLUDE_DIRECTORIES ${hwloc_INCLUDE_DIR})
+endif ()
+
+mark_as_advanced (
+ hwloc_INCLUDE_DIR
+ hwloc_LIBRARY)
diff --git a/cmake/Findlksctp-tools.cmake b/cmake/Findlksctp-tools.cmake
new file mode 100644
index 00000000..5db26e6f
--- /dev/null
+++ b/cmake/Findlksctp-tools.cmake
@@ -0,0 +1,54 @@
+#
+# This file is open source software, licensed to you under the terms
+# of the Apache License, Version 2.0 (the "License"). See the NOTICE file
+# distributed with this work for additional information regarding copyright
+# ownership. You may not use this file except in compliance with the License.
+#
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# Copyright (C) 2018 Scylladb, Ltd.
+#
+
+find_path (lksctp-tools_INCLUDE_DIR
+ NAMES netinet/sctp.h)
+
+find_library (lksctp-tools_LIBRARY
+ NAMES sctp)
+
+if (lksctp-tools_INCLUDE_DIR AND lksctp-tools_LIBRARY)
+ set (lksctp-tools_FOUND ON)
+ set (lksctp-tools_INCLUDE_DIRS ${lksctp-tools_INCLUDE_DIR})
+ set (lksctp-tools_LIBRARIES ${lksctp-tools_LIBRARY})
+endif ()
+
+include (FindPackageHandleStandardArgs)
+
+find_package_handle_standard_args (lksctp-tools
+ FOUND_VAR lksctp-tools_FOUND
+ REQUIRED_VARS
+ lksctp-tools_INCLUDE_DIR
+ lksctp-tools_LIBRARY)
+
+if (lksctp-tools_FOUND AND NOT (TARGET lksctp-tools::lksctp-tools))
+ add_library (lksctp-tools::lksctp-tools UNKNOWN IMPORTED)
+
+ set_target_properties (lksctp-tools::lksctp-tools
+ PROPERTIES
+ IMPORTED_LOCATION ${lksctp-tools_LIBRARY}
+ INTERFACE_INCLUDE_DIRECTORIES ${lksctp-tools_INCLUDE_DIRS})
+endif ()
+
+mark_as_advanced (
+ lksctp-tools_INCLUDE_DIR
+ lksctp-tools_LIBRARY)
diff --git a/cmake/Findlz4.cmake b/cmake/Findlz4.cmake
new file mode 100644
index 00000000..e5c90ba8
--- /dev/null
+++ b/cmake/Findlz4.cmake
@@ -0,0 +1,72 @@
+#
+# This file is open source software, licensed to you under the terms
+# of the Apache License, Version 2.0 (the "License"). See the NOTICE file
+# distributed with this work for additional information regarding copyright
+# ownership. You may not use this file except in compliance with the License.
+#
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# Copyright (C) 2018 Scylladb, Ltd.
+#
+
+find_package (PkgConfig)
+
+pkg_search_module (PC_lz4
+ REQUIRED
+ QUIET
+ liblz4)
+
+find_path (lz4_INCLUDE_DIR
+ NAMES lz4.h
+ PATHS ${PC_lz4_INCLUDE_DIRS})
+
+find_library (lz4_LIBRARY
+ NAMES lz4
+ PATHS ${PC_lz4_LIBRARY_DIRS})
+
+set (lz4_VERSION ${PC_lz4_VERSION})
+
+include (FindPackageHandleStandardArgs)
+
+find_package_handle_standard_args (lz4
+ FOUND_VAR lz4_FOUND
+ REQUIRED_VARS
+ lz4_INCLUDE_DIR
+ lz4_LIBRARY
+ VERSION_VAR lz4_VERSION)
+
+if (lz4_FOUND)
+ set (CMAKE_REQUIRED_LIBRARIES ${lz4_LIBRARY})
+ include (CheckSymbolExists)
+
+ check_symbol_exists (LZ4_compress_default
+ ${lz4_INCLUDE_DIR}/lz4.h
+ lz4_HAVE_COMPRESS_DEFAULT)
+
+ set (lz4_INCLUDE_DIRS ${lz4_INCLUDE_DIR})
+endif ()
+
+if (lz4_FOUND AND NOT (TARGET lz4::lz4))
+ add_library (lz4::lz4 UNKNOWN IMPORTED)
+
+ set_target_properties (lz4::lz4
+ PROPERTIES
+ IMPORTED_LOCATION ${lz4_LIBRARY}
+ INTERFACE_COMPILE_OPTIONS "${PC_lz4_CFLAGS_OTHER}"
+ INTERFACE_INCLUDE_DIRECTORIES ${lz4_INCLUDE_DIR})
+endif ()
+
+mark_as_advanced (
+ lz4_INCLUDE_DIR
+ lz4_LIBRARY)
diff --git a/cmake/Findnumactl.cmake b/cmake/Findnumactl.cmake
new file mode 100644
index 00000000..8a114041
--- /dev/null
+++ b/cmake/Findnumactl.cmake
@@ -0,0 +1,54 @@
+#
+# This file is open source software, licensed to you under the terms
+# of the Apache License, Version 2.0 (the "License"). See the NOTICE file
+# distributed with this work for additional information regarding copyright
+# ownership. You may not use this file except in compliance with the License.
+#
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# Copyright (C) 2018 Scylladb, Ltd.
+#
+
+find_path (numactl_INCLUDE_DIR
+ NAMES numaif.h)
+
+find_library (numactl_LIBRARY
+ NAMES numa)
+
+if (numactl_INCLUDE_DIR AND numactl_LIBRARY)
+ set (numactl_FOUND ON)
+ set (numactl_INCLUDE_DIRS ${numactl_INCLUDE_DIR})
+ set (numactl_LIBRARIES ${numactl_LIBRARY})
+endif ()
+
+include (FindPackageHandleStandardArgs)
+
+find_package_handle_standard_args (numactl
+ FOUND_VAR numactl_FOUND
+ REQUIRED_VARS
+ numactl_INCLUDE_DIR
+ numactl_LIBRARY)
+
+if (numactl_FOUND AND NOT (TARGET numactl::numactl))
+ add_library (numactl::numactl UNKNOWN IMPORTED)
+
+ set_target_properties (numactl::numactl
+ PROPERTIES
+ IMPORTED_LOCATION ${numactl_LIBRARY}
+ INTERFACE_INCLUDE_DIRECTORIES ${numactl_INCLUDE_DIRS})
+endif ()
+
+mark_as_advanced (
+ numactl_INCLUDE_DIR
+ numactl_LIBRARY)
diff --git a/cmake/Findragel.cmake b/cmake/Findragel.cmake
new file mode 100644
index 00000000..86853af5
--- /dev/null
+++ b/cmake/Findragel.cmake
@@ -0,0 +1,46 @@
+#
+# This file is open source software, licensed to you under the terms
+# of the Apache License, Version 2.0 (the "License"). See the NOTICE file
+# distributed with this work for additional information regarding copyright
+# ownership. You may not use this file except in compliance with the License.
+#
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# Copyright (C) 2018 Scylladb, Ltd.
+#
+
+find_program (
+ ragel_RAGEL_EXECUTABLE
+ ragel)
+
+set (_ragel_version_pattern "[0-9]+\\.[0-9]+\\.[0-9]+(\\.[0-9]+)?")
+
+if (ragel_RAGEL_EXECUTABLE)
+ set (ragel_FOUND ON)
+
+ exec_program (${ragel_RAGEL_EXECUTABLE}
+ ARGS -v
+ OUTPUT_VARIABLE _ragel_version_output)
+
+ if (${_ragel_version_output} MATCHES "version (${_ragel_version_pattern})")
+ set (ragel_VERSION ${CMAKE_MATCH_1})
+ endif ()
+endif ()
+
+find_package_handle_standard_args (ragel
+ FOUND_VAR ragel_FOUND
+ REQUIRED_VARS ragel_RAGEL_EXECUTABLE
+ VERSION_VAR ragel_VERSION)
+
+mark_as_advanced (ragel_RAGEL_EXECUTABLE)
diff --git a/cmake/Findrt.cmake b/cmake/Findrt.cmake
new file mode 100644
index 00000000..9ba95670
--- /dev/null
+++ b/cmake/Findrt.cmake
@@ -0,0 +1,60 @@
+#
+# This file is open source software, licensed to you under the terms
+# of the Apache License, Version 2.0 (the "License"). See the NOTICE file
+# distributed with this work for additional information regarding copyright
+# ownership. You may not use this file except in compliance with the License.
+#
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# Copyright (C) 2018 Scylladb, Ltd.
+#
+
+set (_rt_test_source ${CMAKE_CURRENT_LIST_DIR}/code_test/rt_test.cc)
+
+# Try to compile without the library first.
+try_compile (_rt_test_nil
+ ${CMAKE_CURRENT_BINARY_DIR}
+ SOURCES ${_rt_test_source})
+
+if (NOT _rt_test_nil)
+ # The `rt` library is required.
+
+ try_compile (_rt_test
+ ${CMAKE_CURRENT_BINARY_DIR}
+ SOURCES ${_rt_test_source}
+ LINK_LIBRARIES rt)
+
+ if (_rt_test)
+ set (rt_LIBRARY_NAME rt)
+ endif ()
+endif ()
+
+if (_rt_test_nil OR rt_LIBRARY_NAME)
+ set (rt_FOUND ON)
+ set (rt_LIBRARIES -l${rt_LIBRARY_NAME})
+endif ()
+
+find_package_handle_standard_args (rt
+ FOUND_VAR rt_FOUND
+ REQUIRED_VARS rt_LIBRARY_NAME)
+
+if (rt_FOUND AND NOT (TARGET rt::rt))
+ add_library (rt::rt INTERFACE IMPORTED)
+
+ set_target_properties (rt::rt
+ PROPERTIES
+ INTERFACE_LINK_LIBRARIES ${rt_LIBRARIES})
+endif ()
+
+mark_as_advanced (rt_LIBRARY_NAME)
diff --git a/cmake/Findyaml-cpp.cmake b/cmake/Findyaml-cpp.cmake
new file mode 100644
index 00000000..07a6324d
--- /dev/null
+++ b/cmake/Findyaml-cpp.cmake
@@ -0,0 +1,65 @@
+#
+# This file is open source software, licensed to you under the terms
+# of the Apache License, Version 2.0 (the "License"). See the NOTICE file
+# distributed with this work for additional information regarding copyright
+# ownership. You may not use this file except in compliance with the License.
+#
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# Copyright (C) 2018 Scylladb, Ltd.
+#
+
+find_package (PkgConfig)
+
+pkg_search_module (PC_yaml-cpp
+ REQUIRED
+ QUIET
+ yaml-cpp)
+
+find_path (yaml-cpp_INCLUDE_DIR
+ NAMES yaml-cpp/yaml.h
+ PATHS ${PC_yaml-cpp_INCLUDE_DIRS})
+
+find_library (yaml-cpp_LIBRARY
+ NAMES yaml-cpp
+ PATHS ${PC_yaml-cpp_LIBRARY_DIRS})
+
+set (yaml-cpp_VERSION ${PC_yaml-cpp_VERSION})
+
+include (FindPackageHandleStandardArgs)
+
+find_package_handle_standard_args (yaml-cpp
+ FOUND_VAR yaml-cpp_FOUND
+ REQUIRED_VARS
+ yaml-cpp_INCLUDE_DIR
+ yaml-cpp_LIBRARY
+ VERSION_VAR yaml-cpp_VERSION)
+
+if (yaml-cpp_FOUND)
+ set (yaml-cpp_INCLUDE_DIRS ${yaml-cpp_INCLUDE_DIR})
+endif ()
+
+if (yaml-cpp_FOUND AND NOT (TARGET yaml-cpp::yaml-cpp))
+ add_library (yaml-cpp::yaml-cpp UNKNOWN IMPORTED)
+
+ set_target_properties (yaml-cpp::yaml-cpp
+ PROPERTIES
+ IMPORTED_LOCATION ${yaml-cpp_LIBRARY}
+ INTERFACE_COMPILE_OPTIONS "${PC_yaml-cpp_CFLAGS_OTHER}"
+ INTERFACE_INCLUDE_DIRECTORIES ${yaml-cpp_INCLUDE_DIR})
+endif ()
+
+mark_as_advanced (
+ yaml-cpp_INCLUDE_DIR
+ yaml-cpp_LIBRARY)
diff --git a/cmake/SeastarConfig.cmake.in b/cmake/SeastarConfig.cmake.in
new file mode 100644
index 00000000..0e3fe948
--- /dev/null
+++ b/cmake/SeastarConfig.cmake.in
@@ -0,0 +1,64 @@
+#
+# This file is open source software, licensed to you under the terms
+# of the Apache License, Version 2.0 (the "License"). See the NOTICE file
+# distributed with this work for additional information regarding copyright
+# ownership. You may not use this file except in compliance with the License.
+#
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# Copyright (C) 2018 Scylladb, Ltd.
+#
+
+# We would like to use `find_dependency`, but it is not supported properly until CMake 3.8.
+#include (FindDependencyMacro)
+
+list (APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
+
+#
+# Public dependencies.
+#
+
+find_package (Boost
+ 1.64.0
+ REQUIRED
+ COMPONENTS
+ filesystem
+ program_options
+ thread)
+
+find_package (c-ares 1.13 REQUIRED MODULE)
+find_package (cryptopp 5.6.5 REQUIRED)
+find_package (dpdk)
+find_package (fmt 4.0.0 REQUIRED)
+find_package (lz4 1.8.0 REQUIRED)
+
+#
+# Private and private/public dependencies.
+#
+
+find_package (GnuTLS 3.5.18 REQUIRED)
+find_package (LinuxMembarrier)
+find_package (Protobuf 3.3.1 REQUIRED)
+find_package (Sanitizers REQUIRED)
+find_package (StdFilesystem REQUIRED)
+find_package (dl REQUIRED)
+find_package (hwloc 1.11.5)
+find_package (lksctp-tools)
+find_package (numactl)
+find_package (rt REQUIRED)
+find_package (yaml-cpp 0.5.3 REQUIRED)
+
+if (NOT TARGET Seastar::seastar)
+ include ("${CMAKE_CURRENT_LIST_DIR}/SeastarTargets.cmake")
+endif ()
diff --git a/cmake/code_test/LinuxMembarrier_test.cc b/cmake/code_test/LinuxMembarrier_test.cc
new file mode 100644
index 00000000..7cb1fdfb
--- /dev/null
+++ b/cmake/code_test/LinuxMembarrier_test.cc
@@ -0,0 +1,8 @@
+extern "C" {
+#include <linux/membarrier.h>
+}
+
+int main() {
+ int x = MEMBARRIER_CMD_PRIVATE_EXPEDITED | MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED;
+ (void)x;
+}
diff --git a/cmake/code_test/Sanitizers_fiber_test.cc b/cmake/code_test/Sanitizers_fiber_test.cc
new file mode 100644
index 00000000..9df531f2
--- /dev/null
+++ b/cmake/code_test/Sanitizers_fiber_test.cc
@@ -0,0 +1,11 @@
+#include <cstddef>
+
+extern "C" {
+ void __sanitizer_start_switch_fiber(void**, const void*, size_t);
+ void __sanitizer_finish_switch_fiber(void*, const void**, size_t*);
+}
+
+int main() {
+ __sanitizer_start_switch_fiber(nullptr, nullptr, 0);
+ __sanitizer_finish_switch_fiber(nullptr, nullptr, nullptr);
+}
diff --git a/cmake/code_test/StdFilesystem_test.cc b/cmake/code_test/StdFilesystem_test.cc
new file mode 100644
index 00000000..267de3b7
--- /dev/null
+++ b/cmake/code_test/StdFilesystem_test.cc
@@ -0,0 +1,6 @@
+#include <experimental/filesystem>
+
+int main() {
+ std::experimental::filesystem::path path("/root");
+ (void)path;
+}
diff --git a/cmake/code_test/dl_test.cc b/cmake/code_test/dl_test.cc
new file mode 100644
index 00000000..927b377d
--- /dev/null
+++ b/cmake/code_test/dl_test.cc
@@ -0,0 +1,7 @@
+extern "C" {
+#include <dlfcn.h>
+}
+
+int main() {
+ dlopen("foobar", 42);
+}
diff --git a/cmake/code_test/rt_test.cc b/cmake/code_test/rt_test.cc
new file mode 100644
index 00000000..c0bf83e3
--- /dev/null
+++ b/cmake/code_test/rt_test.cc
@@ -0,0 +1,10 @@
+extern "C" {
+#include <signal.h>
+#include <time.h>
+}
+
+int main() {
+ timer_t td;
+ struct sigevent sev;
+ timer_create(CLOCK_MONOTONIC, &sev, &td);
+}
diff --git a/configure.py b/configure.py
deleted file mode 100755
index cf8288c7..00000000
--- a/configure.py
+++ /dev/null
@@ -1,1033 +0,0 @@
-#!/usr/bin/python3
-#
-# This file is open source software, licensed to you under the terms
-# of the Apache License, Version 2.0 (the "License"). See the NOTICE file
-# distributed with this work for additional information regarding copyright
-# ownership. You may not use this file except in compliance with the License.
-#
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-import os, os.path, textwrap, argparse, sys, shlex, subprocess, tempfile, re
-import distutils.dir_util
-import distutils.spawn
-
-configure_args = str.join(' ', [shlex.quote(x) for x in sys.argv[1:]])
-
-tempfile.tempdir = "./build/tmp"
-
-srcdir = os.getcwd()
-
-ninja_exe = distutils.spawn.find_executable('ninja-build') or distutils.spawn.find_executable('ninja')
-
-def get_flags():
- with open('/proc/cpuinfo') as f:
- for line in f:
- if line.strip():
- if line.rstrip('\n').startswith('flags'):
- return re.sub(r'^flags\s+: ', '', line).split()
-
-def add_tristate(arg_parser, name, dest, help):
- arg_parser.add_argument('--enable-' + name, dest = dest, action = 'store_true', default = None,
- help = 'Enable ' + help)
- arg_parser.add_argument('--disable-' + name, dest = dest, action = 'store_false', default = None,
- help = 'Disable ' + help)
-
-def apply_tristate(var, test, note, missing):
- if (var is None) or var:
- if test():
- return True
- elif var == True:
- print(missing)
- sys.exit(1)
- else:
- print(note)
- return False
- return False
-
-#
-# dpdk_cflags - fetch the DPDK specific CFLAGS
-#
-# Run a simple makefile that "includes" the DPDK main makefile and prints the
-# MACHINE_CFLAGS value
-#
-def dpdk_cflags (dpdk_target):
- ensure_tmp_dir_exists()
- with tempfile.NamedTemporaryFile() as sfile:
- dpdk_target = os.path.abspath(dpdk_target)
- dpdk_target = re.sub(r'\/+$', '', dpdk_target)
- dpdk_sdk_path = os.path.dirname(dpdk_target)
- dpdk_target_name = os.path.basename(dpdk_target)
- dpdk_arch = dpdk_target_name.split('-')[0]
- if args.dpdk:
- dpdk_sdk_path = 'dpdk'
- dpdk_target = os.getcwd() + '/build/dpdk'
- dpdk_target_name = 'x86_64-{}-linuxapp-gcc'.format(dpdk_machine)
- dpdk_arch = 'x86_64'
-
- sfile.file.write(bytes('include ' + dpdk_sdk_path + '/mk/rte.vars.mk' + "\n", 'utf-8'))
- sfile.file.write(bytes('all:' + "\n\t", 'utf-8'))
- sfile.file.write(bytes('@echo $(MACHINE_CFLAGS)' + "\n", 'utf-8'))
- sfile.file.flush()
-
- dpdk_cflags = subprocess.check_output(['make', '--no-print-directory',
- '-f', sfile.name,
- 'RTE_SDK=' + dpdk_sdk_path,
- 'RTE_OUTPUT=' + dpdk_target,
- 'RTE_TARGET=' + dpdk_target_name,
- 'RTE_SDK_BIN=' + dpdk_target,
- 'RTE_ARCH=' + dpdk_arch])
- dpdk_cflags_str = dpdk_cflags.decode('utf-8')
- dpdk_cflags_str = re.sub(r'\n+$', '', dpdk_cflags_str)
- dpdk_cflags_final = ''
-
- return dpdk_cflags_str
-
-def try_compile(compiler, source = '', flags = []):
- return try_compile_and_link(compiler, source, flags = flags + ['-c'])
-
-def ensure_tmp_dir_exists():
- if not os.path.exists(tempfile.tempdir):
- os.makedirs(tempfile.tempdir)
-
-def try_compile_and_link(compiler, source = '', flags = []):
- ensure_tmp_dir_exists()
- with tempfile.NamedTemporaryFile() as sfile:
- ofile = tempfile.mktemp()
- try:
- sfile.file.write(bytes(source, 'utf-8'))
- sfile.file.flush()
- # We can't write to /dev/null, since in some cases (-ftest-coverage) gcc will create an auxiliary
- # output file based on the name of the output file, and "/dev/null.gcsa" is not a good name
- return subprocess.call([compiler, '-x', 'c++', '-o', ofile, sfile.name] + flags,
- stdout = subprocess.DEVNULL,
- stderr = subprocess.DEVNULL) == 0
- finally:
- if os.path.exists(ofile):
- os.unlink(ofile)
-
-def try_compile_and_run(compiler, flags, source, env = {}):
- ensure_tmp_dir_exists()
- mktemp = tempfile.NamedTemporaryFile
- with mktemp() as sfile, mktemp(mode='rb') as xfile:
- sfile.file.write(bytes(source, 'utf-8'))
- sfile.file.flush()
- xfile.file.close()
- if subprocess.call([compiler, '-x', 'c++', '-o', xfile.name, sfile.name] + args.user_cflags.split() + flags,
- stdout = subprocess.DEVNULL, stderr = subprocess.DEVNULL) != 0:
- # The compiler may delete the target on failure, and lead to
- # NamedTemporaryFile's destructor throwing an exception.
- open(xfile.name, 'a').close()
- return False
- e = os.environ.copy()
- e.update(env)
- env = e
- return subprocess.call([xfile.name], stdout = subprocess.DEVNULL, stderr = subprocess.DEVNULL, env=env) == 0
-
-def warning_supported(warning, compiler, flags):
- # gcc ignores -Wno-x even if it is not supported
- adjusted = re.sub('^-Wno-', '-W', warning)
- return try_compile(flags=flags + [adjusted, '-Werror'], compiler = compiler)
-
-def debug_flag(compiler, flags):
- src_with_auto = textwrap.dedent('''\
- template <typename T>
- struct x { auto f() {} };
-
- x<int> a;
- ''')
- if try_compile(source = src_with_auto, flags = flags + ['-g', '-std=gnu++1y'], compiler = compiler):
- return '-g'
- else:
- print('Note: debug information disabled; upgrade your compiler')
- return ''
-
-def dialect_supported(dialect, compiler='g++'):
- return try_compile(compiler=compiler, source='', flags=['-std=' + dialect])
-
-def detect_membarrier(compiler, flags):
- return try_compile(compiler=compiler, flags=flags, source=textwrap.dedent('''\
- #include <linux/membarrier.h>
-
- int x = MEMBARRIER_CMD_PRIVATE_EXPEDITED | MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED;
- '''))
-
-def sanitize_vptr_flag(compiler, flags):
- # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67258
- if (not try_compile(compiler, flags=flags + ['-fsanitize=vptr'])
- or (try_compile_and_run(compiler, flags=flags + ['-fsanitize=undefined', '-fno-sanitize-recover'],
- env={'UBSAN_OPTIONS': 'exitcode=1'}, source=textwrap.dedent('''
- struct A
- {
- virtual ~A() {}
- };
- struct B : virtual A {};
- struct C : virtual A {};
- struct D : B, virtual C {};
-
- int main()
- {
- D d;
- }
- '''))
- and False)): # -fsanitize=vptr is broken even when the test above passes
- return ''
- else:
- print('Notice: -fsanitize=vptr is broken, disabling; some debug mode tests are bypassed.')
- return '-fno-sanitize=vptr'
-
-
-def adjust_visibility_flags(compiler, flags):
- # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80947
- flags = flags + ['-fvisibility=hidden', '-std=gnu++1y', '-Werror=attributes']
- if not try_compile(compiler, flags=flags, source=textwrap.dedent('''
- template <class T>
- class MyClass {
- public:
- MyClass() {
- auto outer = [this] ()
- {
- auto fn = [this] { };
- //use fn for something here
- };
- }
- };
-
- template<typename T>
- void foo() {
- struct inner {
- inner() {
- (void)([this] { });
- }
- };
- }
-
- int main() {
- MyClass<int> r;
- foo<int>();
- }
- ''')):
- print('Notice: disabling -Wattributes due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80947')
- return '-Wno-attributes'
- else:
- return ''
-
-def configure_fmt(mode, cxx='g++', cc='gcc'):
- builddir = 'build/{}/fmt'.format(mode)
- os.makedirs(builddir, exist_ok=True)
- subprocess.check_output(args=['cmake', '-G', 'Ninja', '../../../fmt', '-DCMAKE_CXX_COMPILER=' + cxx, '-DCMAKE_C_COMPILER=' + cc], cwd=builddir)
-
-modes = {
- 'debug': {
- 'sanitize': '-fsanitize=address -fsanitize=leak -fsanitize=undefined',
- 'sanitize_libs': '-lasan -lubsan',
- 'opt': '-O0 -DSEASTAR_DEBUG -DSEASTAR_DEBUG_SHARED_PTR -DSEASTAR_DEFAULT_ALLOCATOR -DSEASTAR_THREAD_STACK_GUARDS -DSEASTAR_NO_EXCEPTION_HACK -DSEASTAR_SHUFFLE_TASK_QUEUE',
- 'libs': '',
- 'cares_opts': '-DCARES_STATIC=ON -DCARES_SHARED=OFF -DCMAKE_BUILD_TYPE=Debug',
- },
- 'release': {
- 'sanitize': '',
- 'sanitize_libs': '',
- 'opt': '-O2',
- 'libs': '',
- 'cares_opts': '-DCARES_STATIC=ON -DCARES_SHARED=OFF -DCMAKE_BUILD_TYPE=Release',
- },
-}
-
-perf_tests = [
- 'test/perf/future_util_perf',
-]
-
-tests = [
- 'test/unit/file_io_test',
- 'test/unit/directory_test',
- 'demo/line_count_demo',
- 'demo/echo_demo',
- 'demo/l3_demo',
- 'demo/ip_demo',
- 'test/unit/timer_test',
- 'demo/tcp_demo',
- 'test/unit/futures_test',
- 'test/unit/alloc_test',
- 'test/unit/foreign_ptr_test',
- 'test/unit/smp_test',
- 'test/unit/thread_test',
- 'test/unit/thread_context_switch_test',
- 'demo/udp_server_demo',
- 'demo/udp_client_demo',
- 'demo/block_discard_demo',
- 'test/unit/sstring_test',
- 'test/unit/unwind_test',
- 'test/unit/defer_test',
- 'test/unit/httpd_test',
- 'app/memcached/test/memcached_ascii_parser_test',
- 'demo/tcp_sctp_server_demo',
- 'demo/tcp_sctp_client_demo',
- 'test/unit/allocator_test',
- 'test/unit/output_stream_test',
- 'demo/udp_zero_copy_demo',
- 'test/unit/shared_ptr_test',
- 'test/unit/weak_ptr_test',
- 'test/unit/checked_ptr_test',
- 'test/unit/slab_test',
- 'test/unit/fstream_test',
- 'test/unit/distributed_test',
- 'demo/rpc_demo',
- 'test/unit/semaphore_test',
- 'test/unit/expiring_fifo_test',
- 'test/unit/packet_test',
- 'test/unit/tls_test',
- 'test/unit/fair_queue_test',
- 'test/unit/rpc_test',
- 'test/unit/connect_test',
- 'test/unit/chunked_fifo_test',
- 'test/unit/circular_buffer_test',
- 'test/perf/fstream_perf',
- 'test/unit/json_formatter_test',
- 'test/unit/dns_test',
- 'test/unit/execution_stage_test',
- 'test/unit/lowres_clock_test',
- 'test/unit/program_options_test',
- 'test/unit/tuple_utils_test',
- 'demo/tls_echo_server_demo',
- 'demo/tls_simple_client_demo',
- 'test/unit/circular_buffer_fixed_capacity_test',
- 'test/unit/noncopyable_function_test',
- 'test/unit/net_config_test',
- 'test/unit/abort_source_test',
- 'test/unit/alien_test',
- ] + perf_tests
-
-apps = [
- 'app/httpd/httpd',
- 'app/seawreck/seawreck',
- 'app/io_tester/io_tester',
- 'app/memcached/memcached',
- 'app/iotune/iotune',
- 'demo/scheduling_group_demo',
- ]
-
-extralibs = {
- 'app/io_tester/io_tester': [ '-lyaml-cpp' ]
-}
-
-all_artifacts = apps + tests + ['libseastar.a', 'seastar.pc', 'fmt/fmt/libfmt.a']
-
-cpp_dialects = ['gnu++17', 'gnu++1z', 'gnu++14', 'gnu++1y']
-try:
- default_cpp_dialect = [x for x in cpp_dialects if dialect_supported(x, compiler='g++')][0]
-except:
- # if g++ is not available, fallback to something safe-ish
- default_cpp_dialect='gnu++1y'
-
-arg_parser = argparse.ArgumentParser('Configure seastar')
-arg_parser.add_argument('--static', dest = 'static', action = 'store_const', default = '',
- const = '-static',
- help = 'Static link (useful for running on hosts outside the build environment')
-arg_parser.add_argument('--pie', dest = 'pie', action = 'store_true',
- help = 'Build position-independent executable (PIE)')
-arg_parser.add_argument('--so', dest = 'so', action = 'store_true',
- help = 'Build shared object (SO) instead of executable')
-arg_parser.add_argument('--mode', action='store', choices=list(modes.keys()) + ['all'], default='all')
-arg_parser.add_argument('--with', dest='artifacts', action='append', choices=all_artifacts, default=[])
-arg_parser.add_argument('--cflags', action = 'store', dest = 'user_cflags', default = '',
- help = 'Extra flags for the C++ compiler')
-arg_parser.add_argument('--ldflags', action = 'store', dest = 'user_ldflags', default = '',
- help = 'Extra flags for the linker')
-arg_parser.add_argument('--optflags', action = 'store', dest = 'user_optflags', default = '',
- help = 'Extra optimization flags for the release mode')
-arg_parser.add_argument('--compiler', action = 'store', dest = 'cxx', default = 'g++',
- help = 'C++ compiler path')
-arg_parser.add_argument('--c-compiler', action='store', dest='cc', default='gcc',
- help = 'C compiler path (for bundled libraries such as dpdk and c-ares)')
-arg_parser.add_argument('--c++-dialect', action='store', dest='cpp_dialect', default=default_cpp_dialect,
- help='C++ dialect to build with [default: %(default)s]')
-arg_parser.add_argument('--with-osv', action = 'store', dest = 'with_osv', default = '',
- help = 'Shortcut for compile for OSv')
-arg_parser.add_argument('--enable-dpdk', action = 'store_true', dest = 'dpdk', default = False,
- help = 'Enable dpdk (from included dpdk sources)')
-arg_parser.add_argument('--dpdk-target', action = 'store', dest = 'dpdk_target', default = '',
- help = 'Path to DPDK SDK target location (e.g. <DPDK SDK dir>/x86_64-native-linuxapp-gcc)')
-arg_parser.add_argument('--debuginfo', action = 'store', dest = 'debuginfo', type = int, default = 1,
- help = 'Enable(1)/disable(0)compiler debug information generation')
-arg_parser.add_argument('--tests-debuginfo', action='store', dest='tests_debuginfo', type=int, default=0,
- help='Enable(1)/disable(0)compiler debug information generation for tests')
-arg_parser.add_argument('--static-stdc++', dest = 'staticcxx', action = 'store_true',
- help = 'Link libgcc and libstdc++ statically')
-arg_parser.add_argument('--static-boost', dest = 'staticboost', action = 'store_true',
- help = 'Link with boost statically')
-arg_parser.add_argument('--static-yaml-cpp', dest = 'staticyamlcpp', action = 'store_true',
- help = 'Link libyaml-cpp statically')
-add_tristate(arg_parser, name = 'hwloc', dest = 'hwloc', help = 'hwloc support')
-arg_parser.add_argument('--enable-gcc6-concepts', dest='gcc6_concepts', action='store_true', default=False,
- help='enable experimental support for C++ Concepts as implemented in GCC 6')
-arg_parser.add_argument('--enable-alloc-failure-injector', dest='alloc_failure_injector', action='store_true', default=False,
- help='enable allocation failure injection')
-add_tristate(arg_parser, name = 'exception-scalability-workaround', dest='exception_workaround',
- help='disabling override of dl_iterate_phdr symbol to workaround C++ exception scalability issues')
-arg_parser.add_argument('--allocator-page-size', dest='allocator_page_size', type=int, help='override allocator page size')
-arg_parser.add_argument('--protoc-compiler', action = 'store', dest='protoc', default='protoc',
- help = 'Path to protoc compiler, the default is protoc')
-args = arg_parser.parse_args()
-
-libnet = [
- 'src/net/proxy.cc',
- 'src/net/virtio.cc',
- 'src/net/dpdk.cc',
- 'src/net/ip.cc',
- 'src/net/ethernet.cc',
- 'src/net/arp.cc',
- 'src/net/native-stack.cc',
- 'src/net/ip_checksum.cc',
- 'src/net/udp.cc',
- 'src/net/tcp.cc',
- 'src/net/dhcp.cc',
- 'src/net/tls.cc',
- 'src/net/dns.cc',
- 'src/net/config.cc',
- ]
-
-core = [
- 'src/core/reactor.cc',
- 'src/core/alien.cc',
- 'src/core/execution_stage.cc',
- 'src/core/systemwide_memory_barrier.cc',
- 'src/core/fstream.cc',
- 'src/core/posix.cc',
- 'src/core/memory.cc',
- 'src/core/resource.cc',
- 'src/core/scollectd.cc',
- 'src/core/metrics.cc',
- 'src/core/app-template.cc',
- 'src/core/thread.cc',
- 'src/core/dpdk_rte.cc',
- 'src/core/fsqual.cc',
- 'src/core/linux-aio.cc',
- 'src/util/conversions.cc',
- 'src/util/program-options.cc',
- 'src/util/log.cc',
- 'src/util/backtrace.cc',
- 'src/util/alloc_failure_injector.cc',
- 'src/net/packet.cc',
- 'src/net/posix-stack.cc',
- 'src/net/net.cc',
- 'src/net/stack.cc',
- 'src/net/inet_address.cc',
- 'src/rpc/rpc.cc',
- 'src/rpc/lz4_compressor.cc',
- 'src/core/exception_hacks.cc',
- 'src/core/future-util.cc',
- ]
-
-protobuf = [
- 'gen/proto/metrics2.proto',
- ]
-
-prometheus = [
- 'src/core/prometheus.cc',
- ]
-
-http = ['src/http/transformers.cc',
- 'src/http/json_path.cc',
- 'src/http/file_handler.cc',
- 'src/http/common.cc',
- 'src/http/routes.cc',
- 'src/json/json_elements.cc',
- 'src/json/formatter.cc',
- 'src/http/matcher.cc',
- 'src/http/mime_types.cc',
- 'src/http/httpd.cc',
- 'src/http/reply.cc',
- 'gen/http/request_parser.rl',
- 'src/http/api_docs.cc',
- ]
-
-boost_test_lib = [
- 'test/test-utils.cc',
- 'test/test_runner.cc',
-]
-
-
-def maybe_static(flag, libs):
- if flag and not args.static:
- libs = '-Wl,-Bstatic {} -Wl,-Bdynamic'.format(libs)
- return libs
-
-defines = []
-libs = ' '.join([maybe_static(args.staticboost,
- '-lboost_program_options -lboost_system -lboost_filesystem'),
- '-lstdc++ -lm', '-lstdc++fs',
- maybe_static(args.staticboost, '-lboost_thread'),
- '-lcryptopp -lrt -lgnutls -lgnutlsxx -llz4 -lprotobuf -ldl -lgcc_s ',
- maybe_static(args.staticyamlcpp, '-lyaml-cpp'),
- ])
-
-boost_unit_test_lib = maybe_static(args.staticboost, '-lboost_unit_test_framework')
-
-
-hwloc_libs = '-lhwloc -lnuma -lpciaccess -lxml2 -lz'
-
-if args.gcc6_concepts or try_compile(args.cxx, source="""#if __cpp_concepts == 201507
-int main() { return 0; }
-#endif""", flags=['-fconcepts']):
- defines.append('SEASTAR_HAVE_GCC6_CONCEPTS')
- args.user_cflags += ' -fconcepts'
-
-if args.alloc_failure_injector:
- defines.append('SEASTAR_ENABLE_ALLOC_FAILURE_INJECTION')
-
-if not apply_tristate(args.exception_workaround, test = lambda: not args.staticcxx and not args.static,
- note = "Note: disabling exception scalability workaround due to static linkage of libgcc and libstdc++",
- missing = "Error: cannot enable exception scalability workaround with static linkage of libgcc and libstdc++"):
- defines.append('SEASTAR_NO_EXCEPTION_HACK')
-
-if args.staticcxx:
- libs = libs.replace('-lstdc++ ', ' ')
- libs += ' -static-libgcc -static-libstdc++'
-
-if args.staticcxx or args.static:
- defines.append("NO_EXCEPTION_INTERCEPT");
-
-memcache_base = [
- 'app/memcached/ascii.rl'
-] + libnet + core
-
-deps = {
- 'libseastar.a' : core + libnet + http + protobuf + prometheus,
- 'seastar.pc': [],
- 'fmt/fmt/libfmt.a': [],
- 'app/httpd/httpd': ['app/httpd/demo.json', 'app/httpd/main.cc'] + http + libnet + core,
- 'app/memcached/memcached': ['app/memcached/memcache.cc'] + memcache_base,
- 'app/memcached/test/memcached_ascii_parser_test': ['app/memcached/test/test_ascii_parser.cc'] + memcache_base,
- 'test/unit/file_io_test': ['test/unit/file_io_test.cc'] + core,
- 'test/unit/directory_test': ['test/unit/directory_test.cc'] + core,
- 'demo/line_count_demo': ['demo/line_count_demo.cc'] + core,
- 'demo/echo_demo': ['demo/echo_demo.cc'] + core + libnet,
- 'demo/l3_demo': ['demo/l3_demo.cc'] + core + libnet,
- 'demo/ip_demo': ['demo/ip_demo.cc'] + core + libnet,
- 'demo/tcp_demo': ['demo/tcp_demo.cc'] + core + libnet,
- 'test/unit/timer_test': ['test/unit/timer_test.cc'] + core,
- 'test/unit/futures_test': ['test/unit/futures_test.cc'] + core,
- 'test/unit/alloc_test': ['test/unit/alloc_test.cc'] + core,
- 'test/unit/foreign_ptr_test': ['test/unit/foreign_ptr_test.cc'] + core,
- 'test/unit/semaphore_test': ['test/unit/semaphore_test.cc'] + core,
- 'test/unit/expiring_fifo_test': ['test/unit/expiring_fifo_test.cc'] + core,
- 'test/unit/smp_test': ['test/unit/smp_test.cc'] + core,
- 'test/unit/thread_test': ['test/unit/thread_test.cc'] + core,
- 'test/unit/thread_context_switch_test': ['test/unit/thread_context_switch_test.cc'] + core,
- 'demo/udp_server_demo': ['demo/udp_server_demo.cc'] + core + libnet,
- 'demo/udp_client_demo': ['demo/udp_client_demo.cc'] + core + libnet,
- 'demo/tcp_sctp_server_demo': ['demo/tcp_sctp_server_demo.cc'] + core + libnet,
- 'demo/tcp_sctp_client_demo': ['demo/tcp_sctp_client_demo.cc'] + core + libnet,
- 'test/unit/tls_test': ['test/unit/tls_test.cc'] + core + libnet,
- 'test/unit/fair_queue_test': ['test/unit/fair_queue_test.cc'] + core,
- 'app/seawreck/seawreck': ['app/seawreck/seawreck.cc', 'gen/http/response_parser.rl'] + core + libnet,
- 'app/io_tester/io_tester': ['app/io_tester/io_tester.cc'] + core,
- 'app/iotune/iotune': ['app/iotune/iotune.cc'] + core,
- 'demo/block_discard_demo': ['demo/block_discard_demo.cc'] + core,
- 'test/unit/sstring_test': ['test/unit/sstring_test.cc'] + core,
- 'test/unit/unwind_test': ['test/unit/unwind_test.cc'] + core,
- 'test/unit/defer_test': ['test/unit/defer_test.cc'] + core,
- 'test/unit/httpd_test': ['test/unit/httpd_test.cc'] + http + core,
- 'test/unit/allocator_test': ['test/unit/allocator_test.cc'] + core,
- 'test/unit/output_stream_test': ['test/unit/output_stream_test.cc'] + core + libnet,
- 'demo/udp_zero_copy_demo': ['demo/udp_zero_copy_demo.cc'] + core + libnet,
- 'test/unit/shared_ptr_test': ['test/unit/shared_ptr_test.cc'] + core,
- 'test/unit/weak_ptr_test': ['test/unit/weak_ptr_test.cc'] + core,
- 'test/unit/checked_ptr_test': ['test/unit/checked_ptr_test.cc'] + core,
- 'test/unit/slab_test': ['test/unit/slab_test.cc'] + core,
- 'test/unit/fstream_test': ['test/unit/fstream_test.cc'] + core,
- 'test/unit/distributed_test': ['test/unit/distributed_test.cc'] + core,
- 'demo/rpc_demo': ['demo/rpc_demo.cc'] + core + libnet,
- 'test/unit/rpc_test': ['test/unit/rpc_test.cc'] + core + libnet,
- 'test/unit/packet_test': ['test/unit/packet_test.cc'] + core + libnet,
- 'test/unit/connect_test': ['test/unit/connect_test.cc'] + core + libnet,
- 'test/unit/chunked_fifo_test': ['test/unit/chunked_fifo_test.cc'] + core,
- 'test/unit/circular_buffer_test': ['test/unit/circular_buffer_test.cc'] + core,
- 'test/perf/fstream_perf': ['test/perf/fstream_perf.cc'] + core,
- 'test/unit/json_formatter_test': ['test/unit/json_formatter_test.cc'] + core + http,
- 'test/unit/dns_test': ['test/unit/dns_test.cc'] + core + libnet,
- 'test/unit/execution_stage_test': ['test/unit/execution_stage_test.cc'] + core,
- 'test/unit/lowres_clock_test': ['test/unit/lowres_clock_test.cc'] + core,
- 'test/unit/program_options_test': ['test/unit/program_options_test.cc'] + core,
- 'test/unit/tuple_utils_test': ['test/unit/tuple_utils_test.cc'],
- 'demo/tls_echo_server_demo': ['demo/tls_echo_server_demo.cc'] + core + libnet,
- 'demo/tls_simple_client_demo': ['demo/tls_simple_client_demo.cc'] + core + libnet,
- 'test/unit/circular_buffer_fixed_capacity_test': ['test/unit/circular_buffer_fixed_capacity_test.cc'],
- 'demo/scheduling_group_demo': ['demo/scheduling_group_demo.cc'] + core,
- 'test/unit/noncopyable_function_test': ['test/unit/noncopyable_function_test.cc'],
- 'test/unit/net_config_test': ['test/unit/net_config_test.cc'] + core + libnet,
- 'test/unit/abort_source_test': ['test/unit/abort_source_test.cc'] + core,
- 'test/unit/alien_test': ['test/unit/alien_test.cc'] + core,
-}
-
-boost_tests = [
- 'app/memcached/test/memcached_ascii_parser_test',
- 'test/unit/file_io_test',
- 'test/unit/futures_test',
- 'test/unit/alloc_test',
- 'test/unit/foreign_ptr_test',
- 'test/unit/semaphore_test',
- 'test/unit/expiring_fifo_test',
- 'test/unit/thread_test',
- 'test/unit/tls_test',
- 'test/unit/fair_queue_test',
- 'test/unit/httpd_test',
- 'test/unit/output_stream_test',
- 'test/unit/fstream_test',
- 'test/unit/rpc_test',
- 'test/unit/connect_test',
- 'test/unit/json_formatter_test',
- 'test/unit/dns_test',
- 'test/unit/execution_stage_test',
- 'test/unit/lowres_clock_test',
- 'test/unit/abort_source_test',
- ]
-
-for bt in boost_tests:
- deps[bt] += boost_test_lib
-
-for pt in perf_tests:
- deps[pt] = [pt + '.cc'] + core + ['test/perf/perf_tests.cc']
-
-warnings = [
- '-Wno-mismatched-tags', # clang-only
- '-Wno-pessimizing-move', # clang-only: moving a temporary object prevents copy elision
- '-Wno-redundant-move', # clang-only: redundant move in return statement
- '-Wno-ignored-attributes', # clang-only: clang does not support [[gnu::code]]unlikely, but GCC does
- '-Wno-inconsistent-missing-override', # clang-only: 'x' overrides a member function but is not marked 'override'
- '-Wno-unused-private-field', # clang-only: private field 'x' is not used
- '-Wno-unknown-attributes', # clang-only: unknown attribute 'x' ignored (x in this case is gnu::externally_visible)
- '-Wno-unneeded-internal-declaration', # clang-only: 'x' function 'x' declared in header file shouldb e declared 'x'
- '-Wno-undefined-inline', # clang-only: inline function 'x' is not defined
- '-Wno-overloaded-virtual', # clang-only: 'x' hides overloaded virtual functions
- '-Wno-maybe-uninitialized',
- '-Wno-error=cpp', # Allow preprocessor warnings
- '-Wno-stringop-overflow', # gcc: overzealous, false positives
- ]
-
-# The "--with-osv=<path>" parameter is a shortcut for a bunch of other
-# settings:
-if args.with_osv:
- args.so = True
- args.hwloc = False
- args.user_cflags = (args.user_cflags +
- ' -DSEASTAR_DEFAULT_ALLOCATOR -fvisibility=default -DHAVE_OSV -I' +
- args.with_osv + ' -I' + args.with_osv + '/include -I' +
- args.with_osv + '/arch/x64')
-
-if args.allocator_page_size:
- args.user_cflags += ' -DSEASTAR_OVERRIDE_ALLOCATOR_PAGE_SIZE=' + str(args.allocator_page_size)
-
-dpdk_arch_xlat = {
- 'native': 'native',
- 'nehalem': 'nhm',
- 'westmere': 'wsm',
- 'sandybridge': 'snb',
- 'ivybridge': 'ivb',
- }
-
-dpdk_machine = 'native'
-
-if args.dpdk:
- if not os.path.exists('dpdk') or not os.listdir('dpdk'):
- raise Exception('--enable-dpdk: dpdk/ is empty. Run "git submodule update --init".')
- cflags = args.user_cflags.split()
- dpdk_machine = ([dpdk_arch_xlat[cflag[7:]]
- for cflag in cflags
- if cflag.startswith('-march')] or ['native'])[0]
- subprocess.check_call('make -C dpdk RTE_OUTPUT=$PWD/build/dpdk/ config T=x86_64-native-linuxapp-gcc'.format(
- dpdk_machine=dpdk_machine),
- shell = True)
- # adjust configutation to taste
- dotconfig = 'build/dpdk/.config'
- lines = open(dotconfig, encoding='UTF-8').readlines()
- def update(lines, vars):
- ret = []
- for line in lines:
- for var, val in vars.items():
- if line.startswith(var + '='):
- line = var + '=' + val + '\n'
- ret.append(line)
- return ret
- lines = update(lines, {'CONFIG_RTE_LIBRTE_PMD_BOND': 'n',
- 'CONFIG_RTE_MBUF_SCATTER_GATHER': 'n',
- 'CONFIG_RTE_LIBRTE_IP_FRAG': 'n',
- 'CONFIG_RTE_APP_TEST': 'n',
- 'CONFIG_RTE_TEST_PMD': 'n',
- 'CONFIG_RTE_MBUF_REFCNT_ATOMIC': 'n',
- 'CONFIG_RTE_MAX_MEMSEG': '8192',
- 'CONFIG_RTE_EAL_IGB_UIO': 'n',
- 'CONFIG_RTE_LIBRTE_KNI': 'n',
- 'CONFIG_RTE_KNI_KMOD': 'n',
- 'CONFIG_RTE_LIBRTE_JOBSTATS': 'n',
- 'CONFIG_RTE_LIBRTE_LPM': 'n',
- 'CONFIG_RTE_LIBRTE_ACL': 'n',
- 'CONFIG_RTE_LIBRTE_POWER': 'n',
- 'CONFIG_RTE_LIBRTE_IP_FRAG': 'n',
- 'CONFIG_RTE_LIBRTE_METER': 'n',
- 'CONFIG_RTE_LIBRTE_SCHED': 'n',
- 'CONFIG_RTE_LIBRTE_DISTRIBUTOR': 'n',
- 'CONFIG_RTE_LIBRTE_PMD_CRYPTO_SCHEDULER': 'n',
- 'CONFIG_RTE_LIBRTE_REORDER': 'n',
- 'CONFIG_RTE_LIBRTE_PORT': 'n',
- 'CONFIG_RTE_LIBRTE_TABLE': 'n',
- 'CONFIG_RTE_LIBRTE_PIPELINE': 'n',
- })
- lines += 'CONFIG_RTE_MACHINE={}'.format(dpdk_machine)
- open(dotconfig, 'w', encoding='UTF-8').writelines(lines)
- args.dpdk_target = os.getcwd() + '/build/dpdk'
-
-if args.dpdk_target:
- args.user_cflags = (args.user_cflags +
- ' -DSEASTAR_HAVE_DPDK -I' + args.dpdk_target + '/include ' +
- dpdk_cflags(args.dpdk_target) +
- ' -Wno-error=literal-suffix -Wno-literal-suffix -Wno-invalid-offsetof')
- libs += (' -L' + args.dpdk_target + '/lib ')
- if args.with_osv:
- libs += '-lintel_dpdk -lrt -lm -ldl'
- else:
- libs += '-Wl,--whole-archive -lrte_pmd_vmxnet3_uio -lrte_pmd_i40e -lrte_pmd_ixgbe -lrte_pmd_e1000 -lrte_pmd_ring -lrte_pmd_bnxt -lrte_pmd_cxgbe -lrte_pmd_ena -lrte_pmd_enic -lrte_pmd_fm10k -lrte_pmd_nfp -lrte_pmd_qede -lrte_pmd_sfc_efx -lrte_hash -lrte_kvargs -lrte_mbuf -lrte_ethdev -lrte_eal -lrte_mempool -lrte_mempool_ring -lrte_ring -lrte_cmdline -lrte_cfgfile -Wl,--no-whole-archive -lrt -lm -ldl'
-
-args.user_cflags += ' -I{srcdir}/fmt'.format(**globals())
-
-if not args.staticboost:
- args.user_cflags += ' -DBOOST_TEST_DYN_LINK'
-
-warnings = [w
- for w in warnings
- if warning_supported(warning = w, compiler = args.cxx, flags=args.user_cflags.split())]
-
-warnings = ' '.join(warnings)
-
-dbgflag = debug_flag(args.cxx, flags=args.user_cflags.split()) if args.debuginfo else ''
-tests_link_rule = 'link' if args.tests_debuginfo else 'link_stripped'
-
-sanitize_flags = sanitize_vptr_flag(args.cxx, flags=args.user_cflags.split())
-
-visibility_flags = adjust_visibility_flags(args.cxx, flags=args.user_cflags.split())
-
-if not try_compile(args.cxx, source='#include <gnutls/gnutls.h>', flags=args.user_cflags.split()):
- print('Seastar requires gnutls. Install gnutls-devel/libgnutls-dev')
- sys.exit(1)
-
-if not try_compile(args.cxx, source='#include <gnutls/gnutls.h>\nint x = GNUTLS_NONBLOCK;', flags=args.user_cflags.split()):
- print('Seastar requires gnutls >= 2.8. Install libgnutls28-dev or later.')
- sys.exit(1)
-
-if not try_compile(args.cxx, source='#include <experimental/string_view>', flags=['-std=gnu++1y'] + args.user_cflags.split()):
- print('Seastar requires g++ >= 4.9. Install g++-4.9 or later (use --compiler option).')
- sys.exit(1)
-
-if not try_compile(args.cxx, '''#include <boost/version.hpp>\n\
- #if BOOST_VERSION < 105800\n\
- #error "Invalid boost version"\n\
- #endif''', flags=args.user_cflags.split()):
- print("Seastar requires boost >= 1.58")
- sys.exit(1)
-
-
-modes['debug']['sanitize'] += ' ' + sanitize_flags
-modes['release']['opt'] += ' ' + args.user_optflags
-
-def have_hwloc():
- return try_compile(compiler = args.cxx, source = '#include <hwloc.h>\n#include <numa.h>', flags=args.user_cflags.split())
-
-if apply_tristate(args.hwloc, test = have_hwloc,
- note = 'Note: hwloc-devel/numactl-devel not installed. No NUMA support.',
- missing = 'Error: required packages hwloc-devel/numactl-devel not installed.'):
- libs += ' ' + hwloc_libs
- defines.append('SEASTAR_HAVE_HWLOC')
- defines.append('SEASTAR_HAVE_NUMA')
-
-if detect_membarrier(compiler=args.cxx, flags=args.user_cflags.split()):
- defines.append('SEASTAR_HAS_MEMBARRIER')
-
-if try_compile(args.cxx, source = textwrap.dedent('''\
- #include <lz4.h>
-
- void m() {
- LZ4_compress_default(static_cast<const char*>(0), static_cast<char*>(0), 0, 0);
- }
- '''), flags=args.user_cflags.split()):
- defines.append("SEASTAR_HAVE_LZ4_COMPRESS_DEFAULT")
-
-if try_compile_and_link(args.cxx, flags=['-fsanitize=address'] + args.user_cflags.split(), source = textwrap.dedent('''\
- #include <cstddef>
-
- extern "C" {
- void __sanitizer_start_switch_fiber(void**, const void*, size_t);
- void __sanitizer_finish_switch_fiber(void*, const void**, size_t*);
- }
-
- int main() {
- __sanitizer_start_switch_fiber(nullptr, nullptr, 0);
- __sanitizer_finish_switch_fiber(nullptr, nullptr, nullptr);
- }
- ''')):
- defines.append("SEASTAR_HAVE_ASAN_FIBER_SUPPORT")
-
-if args.so:
- args.pie = '-shared'
- args.fpie = '-fpic'
-elif args.pie:
- args.pie = '-pie'
- args.fpie = '-fpie'
-else:
- args.pie = ''
- args.fpie = ''
-
-defines = ' '.join(['-D' + d for d in defines])
-
-globals().update(vars(args))
-
-total_memory = os.sysconf('SC_PAGE_SIZE') * os.sysconf('SC_PHYS_PAGES')
-link_pool_depth = max(int(total_memory / 7e9), 1)
-
-build_modes = modes if args.mode == 'all' else [args.mode]
-build_artifacts = all_artifacts if not args.artifacts else args.artifacts
-protoc = args.protoc
-dpdk_sources = []
-if args.dpdk:
- for root, dirs, files in os.walk('dpdk'):
- dpdk_sources += [os.path.join(root, file)
- for file in files
- if file.endswith('.h') or file.endswith('.c')]
-dpdk_sources = ' '.join(dpdk_sources)
-
-# both source and builddir location
-cares_dir = 'c-ares'
-cares_lib = 'cares-seastar'
-cares_src_lib = cares_dir + '/lib/libcares.a'
-
-if not os.path.exists(cares_dir) or not os.listdir(cares_dir):
- raise Exception(cares_dir + ' is empty. Run "git submodule update --init".')
-
-cares_sources = []
-for root, dirs, files in os.walk('c-ares'):
- cares_sources += [os.path.join(root, file)
- for file in files
- if file.endswith('.h') or file.endswith('.c')]
-cares_sources = ' '.join(cares_sources)
-libs += ' -l' + cares_lib
-
-# "libs" contains mostly pre-existing libraries, but if we want to add to
-# it a library which we built here, we need to ensure that this library
-# gets built before actually using "libs". So let's make a list "built_libs"
-# of libraries which are targets built here. These libraries are all relative
-# to the current mode's build directory.
-built_libs = []
-built_libs += ['lib' + cares_lib + '.a']
-built_libs += ['fmt/fmt/libfmt.a']
-
-for mode in build_modes:
- configure_fmt(mode, cxx=args.cxx, cc=args.cc)
-
-libs += ' -lfmt'
-
-fmt_deps = []
-for dirpath, dirnames, filenames in os.walk('fmt'):
- fmt_deps += [os.path.join(dirpath, filename) for filename in filenames]
-fmt_deps = ' '.join(fmt_deps)
-
-outdir = 'build'
-buildfile = 'build.ninja'
-os.makedirs(outdir, exist_ok = True)
-do_sanitize = True
-if args.static:
- do_sanitize = False
-with open(buildfile, 'w') as f:
- dpdk_deps = ''
- if args.dpdk:
- # fake dependencies on dpdk, so that it is built before anything else
- dpdk_deps = ' {dpdk_target}/include/rte_eal.h {dpdk_target}/lib/librte_eal.a'.format(dpdk_target=args.dpdk_target)
- f.write(textwrap.dedent('''\
- configure_args = {configure_args}
- builddir = {outdir}
- full_builddir = {srcdir}/$builddir
- cxx = {cxx}
- # we disable _FORTIFY_SOURCE because it generates false positives with longjmp() (core/thread.cc)
- cxxflags = -std={cpp_dialect} {dbgflag} {fpie} -Wall -Werror -Wno-error=deprecated-declarations -fvisibility=hidden {visibility_flags} -pthread -I{srcdir} -U_FORTIFY_SOURCE {user_cflags} {warnings} {defines}
- ldflags = {dbgflag} -Wl,--no-as-needed {static} {pie} -fvisibility=hidden {visibility_flags} -pthread {user_ldflags}
- libs = {libs}
- pool link_pool
- depth = {link_pool_depth}
- rule ragel
- # sed away a bug in ragel 7 that emits some extraneous _nfa* variables
- # (the $$ is collapsed to a single one by ninja)
- command = ragel -G2 -o $out $in && sed -i -e '1h;2,$$H;$$!d;g' -re 's/static const char _nfa[^;]*;//g' $out
- description = RAGEL $out
- rule gen
- command = /bin/echo -e $text > $out
- description = GEN $out
- rule swagger
- command = gen/json2code.py -f $in -o $out
- description = SWAGGER $out
- rule protobuf
- command = {protoc} --cpp_out=$outdir $in && rm -r $outdir/proto && ln -s gen/proto $outdir/proto
- description = PROTOC $out
- rule copy_file
- command = cp $in $out
- rule ninja
- command = {ninja_exe} -C $subdir
- ''').format(**globals()))
- if args.dpdk:
- f.write(textwrap.dedent('''\
- rule dpdkmake
- command = make -C build/dpdk CC={args.cc}
- build {dpdk_deps} : dpdkmake {dpdk_sources}
- ''').format(**globals()))
- for mode in build_modes:
- objdeps = {}
- modeval = modes[mode]
- if modeval['sanitize'] and not do_sanitize:
- print('Note: --static disables debug mode sanitizers')
- modeval['sanitize'] = ''
- modeval['sanitize_libs'] = ''
- elif modeval['sanitize']:
- modeval['sanitize'] += ' -DSEASTAR_ASAN_ENABLED'
- f.write(textwrap.dedent('''\
- cxxflags_{mode} = {sanitize} {opt} -I. -Itest -Iinclude -Isrc -I$full_builddir/{mode}/gen/seastar -I$full_builddir/{mode}/gen -I$full_builddir/{mode}/c-ares
- libs_{mode} = {sanitize_libs} {libs}
- rule cxx.{mode}
- command = $cxx -MD -MT $out -MF $out.d $cxxflags_{mode} $cxxflags -c -o $out $in
- description = CXX $out
- depfile = $out.d
- rule link.{mode}
- command = $cxx $cxxflags_{mode} -L$builddir/{mode} -L$builddir/{mode}/fmt/fmt $ldflags -o $out $in $libs $libs_{mode} $extralibs
- description = LINK $out
- pool = link_pool
- rule link_stripped.{mode}
- command = $cxx $cxxflags_{mode} -s -L$builddir/{mode} -L$builddir/{mode}/fmt/fmt $ldflags -o $out $in $libs $libs_{mode} $extralibs
- description = LINK (stripped) $out
- pool = link_pool
- rule ar.{mode}
- command = rm -f $out; ar cr $out $in; ranlib $out
- description = AR $out
- ''').format(mode = mode, **modeval))
- f.write('build {mode}: phony $builddir/{mode}/lib{cares_lib}.a {artifacts}\n'.format(mode = mode, cares_lib=cares_lib,
- artifacts = str.join(' ', ('$builddir/' + mode + '/' + x for x in build_artifacts))))
- f.write(textwrap.dedent('''\
- rule caresmake_{mode}
- command = make -C build/{mode}/{cares_dir} CC={args.cc}
- rule carescmake_{mode}
- command = mkdir -p $builddir/{mode}/{cares_dir} && cd $builddir/{mode}/{cares_dir} && CC={args.cc} cmake {cares_opts} {srcdir}/$in
- build $builddir/{mode}/{cares_dir}/Makefile : carescmake_{mode} {cares_dir}
- build $builddir/{mode}/{cares_dir}/ares_build.h : phony $builddir/{mode}/{cares_dir}/Makefile
- build $builddir/{mode}/{cares_src_lib} : caresmake_{mode} $builddir/{mode}/{cares_dir}/Makefile | {cares_sources}
- build $builddir/{mode}/lib{cares_lib}.a : copy_file $builddir/{mode}/{cares_src_lib}
- ''').format(cares_opts=(modeval['cares_opts']), **globals()))
- objdeps['$builddir/' + mode + '/net/dns.o'] = ' $builddir/' + mode + '/' + cares_dir + '/ares_build.h'
- compiles = {}
- ragels = {}
- swaggers = {}
- protobufs = {}
- for binary in build_artifacts:
- srcs = deps[binary]
- objs = ['$builddir/' + mode + '/' + src.replace('.cc', '.o')
- for src in srcs
- if src.endswith('.cc')]
- objs += ['$builddir/' + mode + '/gen/seastar/' + src.replace('gen/', '').replace('.proto', '.pb.o')
- for src in srcs
- if src.endswith('.proto')]
- if binary.endswith('.pc'):
- vars = modeval.copy()
- vars.update(globals())
- pc = textwrap.dedent('''\
- Name: Seastar
- URL: http://seastar-project.org/
- Description: Advanced C++ framework for high-performance server applications on modern hardware.
- Version: 2.0.0
- Libs: -L$full_builddir/{mode} -L$full_builddir/{mode}/fmt/fmt -Wl,--whole-archive,-lseastar,--no-whole-archive -lfmt $cxxflags $cxflags_{mode} -Wl,--no-as-needed {static} {pie} {user_ldflags} {sanitize_libs} {libs}
- Cflags: $cxxflags $cxxflags_{mode}
- ''').format(**vars)
- f.write('build $builddir/{}/{}: gen\n text = {}\n'.format(mode, binary, repr(pc)))
- elif binary == 'fmt/fmt/libfmt.a':
- f.write('build $builddir/{}/fmt/fmt//libfmt.a: ninja | {}\n'.format(mode, fmt_deps))
- f.write(' subdir=build/{}/fmt\n'.format(mode))
- elif binary.endswith('.a'):
- f.write('build $builddir/{}/{}: ar.{} {}\n'.format(mode, binary, mode, str.join(' ', objs)))
- else:
- libdeps = str.join(' ', ('$builddir/{}/{}'.format(mode, i) for i in built_libs))
- test_extralibs = [maybe_static(args.staticyamlcpp, '-lyaml-cpp')]
- if binary.startswith('test/'):
- if binary in boost_tests:
- test_extralibs += [maybe_static(args.staticboost, '-lboost_unit_test_framework')]
- # Our code's debugging information is huge, and multiplied
- # by many tests yields ridiculous amounts of disk space.
- # So we strip the tests by default; The user can very
- # quickly re-link the test unstripped by adding a "_g"
- # to the test name, e.g., "ninja build/release/testname_g"
- f.write('build $builddir/{}/{}: {}.{} {} | {} {}\n'.format(mode, binary, tests_link_rule, mode, str.join(' ', objs), dpdk_deps, libdeps))
- f.write(' extralibs = {}\n'.format(' '.join(test_extralibs)))
- f.write('build $builddir/{}/{}_g: link.{} {} | {} {}\n'.format(mode, binary, mode, str.join(' ', objs), dpdk_deps, libdeps))
- f.write(' extralibs = {}\n'.format(' '.join(test_extralibs)))
- else:
- f.write('build $builddir/{}/{}: link.{} {} | {} {} $builddir/{}/lib{}.a $builddir/{}/fmt/fmt/libfmt.a\n'.format(mode, binary, mode, str.join(' ', objs), dpdk_deps, libdeps, mode, cares_lib, mode))
- if binary in extralibs.keys():
- app_extralibs = extralibs[binary]
- f.write(' extralibs = {}\n'.format(' '.join(app_extralibs)))
-
- for src in srcs:
- if src.endswith('.cc'):
- obj = '$builddir/' + mode + '/' + src.replace('.cc', '.o')
- compiles[obj] = src
- elif src.endswith('.proto'):
- hh = '$builddir/' + mode + '/gen/seastar/' + src.replace('gen/', '').replace('.proto', '.pb.h')
- protobufs[hh] = src
- compiles[hh.replace('.h', '.o')] = hh.replace('.h', '.cc')
- elif src.endswith('.rl'):
- hh = '$builddir/' + mode + '/gen/seastar/' + src.replace('gen/', '').replace('.rl', '.hh')
- ragels[hh] = src
- elif src.endswith('.json'):
- hh = '$builddir/' + mode + '/gen/seastar/' + src.replace('gen/', '') + '.hh'
- swaggers[hh] = src
- else:
- raise Exception('No rule for ' + src)
- for obj in compiles:
- src = compiles[obj]
- gen_headers = list(ragels.keys()) + list(swaggers.keys()) + list(protobufs.keys())
- f.write('build {}: cxx.{} {} || {} \n'.format(obj, mode, src, ' '.join(gen_headers) + dpdk_deps + objdeps.get(obj, '')))
- for hh in ragels:
- src = ragels[hh]
- f.write('build {}: ragel {}\n'.format(hh, src))
- for hh in swaggers:
- src = swaggers[hh]
- f.write('build {}: swagger {} | gen/json2code.py\n'.format(hh,src))
- for pb in protobufs:
- src = protobufs[pb]
- c_pb = pb.replace('.h','.cc')
- outd = os.path.dirname(os.path.dirname(pb))
- f.write('build {} {}: protobuf {}\n outdir = {}\n'.format(c_pb, pb, src, outd))
-
- f.write(textwrap.dedent('''\
- rule configure
- command = python3 configure.py $configure_args
- generator = 1
- build build.ninja: configure | configure.py
- rule cscope
- command = find -name '*.[chS]' -o -name "*.cc" -o -name "*.hh" | cscope -bq -i-
- description = CSCOPE
- build cscope: cscope
- rule md2html
- command = doc/md2html "$in" "$out"
- description = PANDOC $out
- rule md2pdf
- command = doc/md2pdf "$in" "$out"
- description = PANDOC $out
- rule htmlsplit
- command = cd doc; ./htmlsplit.py
- description = HTMLSPLIT $out
- build doc/tutorial.html: md2html doc/tutorial.md
- build doc/tutorial.pdf: md2pdf doc/tutorial.md
- build doc/split: htmlsplit doc/tutorial.html
- default {modes_list}
- ''').format(modes_list = ' '.join(build_modes), **globals()))
diff --git a/cooking.sh b/cooking.sh
new file mode 100755
index 00000000..110e7c38
--- /dev/null
+++ b/cooking.sh
@@ -0,0 +1,552 @@
+#!/bin/bash
+
+# MIT License
+#
+# Copyright (c) 2018 Jesse Haber-Kucharsky
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in all
+# copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+#
+# This is cmake-cooking v0.4.0
+#
+
+set -e
+
+CMAKE=${CMAKE:-cmake}
+
+source_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+
+recipe=""
+declare -a excluded_ingredients
+declare -a included_ingredients
+build_dir="${source_dir}/build"
+build_type="Debug"
+# Depends on `build_dir`.
+ingredients_dir=""
+generator="Ninja"
+list_only=""
+nested=""
+
+usage() {
+ cat <<EOF
+
+Fetch, configure, build, and install dependencies ("ingredients") for a CMake project
+in a local and repeatable development environment.
+
+Usage: $0 [OPTIONS]
+
+where OPTIONS are:
+
+-r RECIPE
+-e INGREDIENT
+-i INGREDIENT
+-d BUILD_DIR (=${build_dir})
+-p INGREDIENTS_DIR (=${build_dir}/_cooking/installed)
+-t BUILD_TYPE (=${build_type})
+-g GENERATOR (=${generator})
+-l
+-h
+
+If neither [-i] nor [-e] are specified with a recipe ([-r]), then all ingredients of the recipe
+will be fetched and built.
+
+[-i] and [-e] are mutually-exclusive options: only provide one.
+
+Option details:
+
+-r RECIPE
+
+ Prepare the named recipe. Recipes are stored in 'recipe/RECIPE.cmake'.
+ If no recipe is indicated, then configure the build without any ingredients.
+
+-e INGREDIENT
+
+ Exclude an ingredient from a recipe. This option can be supplied many times.
+
+ For example, if a recipe consists of 'apple', 'banana', 'carrot', and 'donut', then
+
+ ./cooking.sh -r dev -e apple -e donut
+
+ will prepare 'banana' and 'carrot' but not prepare 'apple' and 'donut'.
+
+ If an ingredient is excluded, then it is assumed that all ingredients that depend on it
+ can satisfy that dependency in some other way from the system (ie, the dependency is
+ removed internally).
+
+-i INGREDIENT
+
+ Include an ingredient from a recipe, ignoring the others. This option can be supplied
+ many times.
+
+ Similar to [-e], but the opposite.
+
+ For example, if a recipe consists of 'apple', 'banana', 'carrot', and 'donut' then
+
+ ./cooking.sh -r dev -i apple -i donut
+
+ will prepare 'apple' and 'donut' but not prepare 'banana' and 'carrot'.
+
+ If an ingredient is not in the "include-list", then it is assumed that all
+ ingredients that are in the list and which depend on it can satisfy that dependency
+ in some other way from the system.
+
+-d BUILD_DIR (=${build_dir})
+
+ Configure the project and build it in the named directory.
+
+-p INGREDIENTS_DIR (=${build_dir}/_cooking/installed)
+
+ Install compiled ingredients into this directory.
+
+-t BUILD_TYPE (=${build_type})
+
+ Configure all ingredients and the project with the named CMake build-type.
+ An example build type is "Release".
+
+-g GENERATOR (=${generator})
+
+ Use the named CMake generator for building all ingredients and the project.
+ An example generator is "Unix Makfiles".
+
+-l
+
+ Only list available ingredients for a given recipe, and don't do anything else.
+
+-h
+
+ Show this help information and exit.
+
+EOF
+}
+
+yell_include_exclude_mutually_exclusive() {
+ echo "Cooking: [-e] and [-i] are mutually exclusive options!" >&2
+}
+
+while getopts "r:e:i:d:p:t:g:lhx" arg; do
+ case "${arg}" in
+ r) recipe=${OPTARG} ;;
+ e)
+ if [[ ${#included_ingredients[@]} -ne 0 ]]; then
+ yell_include_exclude_mutually_exclusive
+ exit 1
+ fi
+
+ excluded_ingredients+=(${OPTARG})
+ ;;
+ i)
+ if [[ ${#excluded_ingredients[@]} -ne 0 ]]; then
+ yell_include_exclude_mutually_exclusive
+ exit 1
+ fi
+
+ included_ingredients+=(${OPTARG})
+ ;;
+ d) build_dir=$(realpath "${OPTARG}") ;;
+ p) ingredients_dir=$(realpath "${OPTARG}") ;;
+ t) build_type=${OPTARG} ;;
+ g) generator=${OPTARG} ;;
+ l) list_only="1" ;;
+ h) usage; exit 0 ;;
+ x) nested="1" ;;
+ *) usage; exit 1 ;;
+ esac
+done
+
+shift $((OPTIND - 1))
+
+cooking_dir="${build_dir}/_cooking"
+cmake_dir="${source_dir}/cmake"
+cache_file="${build_dir}/CMakeCache.txt"
+ingredients_ready_file="${cooking_dir}/ready.txt"
+
+if [ -z "${ingredients_dir}" ]; then
+ ingredients_dir="${cooking_dir}/installed"
+fi
+
+mkdir -p "${cmake_dir}"
+
+cat <<'EOF' > "${cmake_dir}/Cooking.cmake"
+# This file was generated by cmake-cooking v0.4.0.
+# cmake-cooking is copyright 2018 by Jesse Haber-Kucharsky and
+# available under the terms of the MIT license.
+
+macro (project name)
+ set (_cooking_dir ${CMAKE_CURRENT_BINARY_DIR}/_cooking)
+
+ if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
+ set (_cooking_root ON)
+ else ()
+ set (_cooking_root OFF)
+ endif ()
+
+ find_program (Cooking_STOW_EXECUTABLE
+ stow
+ "Executable path of GNU Stow.")
+
+ if (NOT Cooking_STOW_EXECUTABLE)
+ message (FATAL_ERROR "Cooking: GNU Stow is required!")
+ endif ()
+
+ set (Cooking_INGREDIENTS_DIR
+ ${_cooking_dir}/installed
+ CACHE
+ PATH
+ "Directory where ingredients will be installed.")
+
+ set (Cooking_EXCLUDED_INGREDIENTS
+ ""
+ CACHE
+ STRING
+ "Semicolon-separated list of ingredients that are not provided by Cooking.")
+
+ set (Cooking_INCLUDED_INGREDIENTS
+ ""
+ CACHE
+ STRING
+ "Semicolon-separated list of ingredients that are provided by Cooking.")
+
+ option (Cooking_LIST_ONLY
+ "Available ingredients will be listed and nothing will be installed."
+ OFF)
+
+ set (Cooking_RECIPE "" CACHE STRING "Configure ${name}'s dependencies according to the named recipe.")
+
+ if ((NOT DEFINED Cooking_EXCLUDED_INGREDIENTS) OR (Cooking_EXCLUDED_INGREDIENTS STREQUAL ""))
+ set (_cooking_excluding OFF)
+ else ()
+ set (_cooking_excluding ON)
+ endif ()
+
+ if ((NOT DEFINED Cooking_INCLUDED_INGREDIENTS) OR (Cooking_INCLUDED_INGREDIENTS STREQUAL ""))
+ set (_cooking_including OFF)
+ else ()
+ set (_cooking_including ON)
+ endif ()
+
+ if (_cooking_excluding AND _cooking_including)
+ message (
+ FATAL_ERROR
+ "Cooking: The EXCLUDED_INGREDIENTS and INCLUDED_INGREDIENTS lists are mutually exclusive options!")
+ endif ()
+
+ if (_cooking_root)
+ _project (${name} ${ARGN})
+
+ if (NOT ("${Cooking_RECIPE}" STREQUAL ""))
+ add_custom_target (_cooking_ingredients)
+
+ add_custom_command (
+ OUTPUT ${_cooking_dir}/ready.txt
+ DEPENDS _cooking_ingredients
+ COMMAND ${CMAKE_COMMAND} -E touch ${_cooking_dir}/ready.txt)
+
+ add_custom_target (_cooking_ingredients_ready
+ DEPENDS ${_cooking_dir}/ready.txt)
+
+ list (APPEND CMAKE_PREFIX_PATH ${Cooking_INGREDIENTS_DIR})
+ include ("recipe/${Cooking_RECIPE}.cmake")
+
+ if (NOT EXISTS ${_cooking_dir}/ready.txt)
+ return ()
+ endif ()
+ endif ()
+ endif ()
+endmacro ()
+
+set (_cooking_ingredient_name_pattern "([a-zA-Z][a-zA-Z0-9\-_]+)")
+
+function (_cooking_prefix_ingredients var input)
+ string (REGEX REPLACE
+ ${_cooking_ingredient_name_pattern}
+ ingredient_\\0
+ result
+ "${input}")
+
+ set (${var} ${result} PARENT_SCOPE)
+endfunction ()
+
+_cooking_prefix_ingredients (
+ _cooking_excluded_ingredients_prefixed
+ "${Cooking_EXCLUDED_INGREDIENTS}")
+
+_cooking_prefix_ingredients (
+ _cooking_included_ingredients_prefixed
+ "${Cooking_INCLUDED_INGREDIENTS}")
+
+macro (cooking_ingredient name)
+ set (_cooking_args "${ARGN}")
+
+ if (_cooking_excluding)
+ # Strip out any dependencies that are excluded.
+ list (REMOVE_ITEM _cooking_args "${_cooking_excluded_ingredients_prefixed}")
+ elseif (_cooking_including)
+ # Eliminate dependencies that have not been included.
+ foreach (x IN LISTS _cooking_args)
+ if (("${x}" MATCHES ingredient_${_cooking_ingredient_name_pattern})
+ AND NOT ("${x}" IN_LIST Cooking_INCLUDED_INGREDIENTS))
+ list (REMOVE_ITEM _cooking_args ${x})
+ endif ()
+ endforeach ()
+ endif ()
+
+ if ((_cooking_excluding AND (${name} IN_LIST Cooking_EXCLUDED_INGREDIENTS))
+ OR (_cooking_including AND (NOT (${name} IN_LIST Cooking_INCLUDED_INGREDIENTS))))
+ # Nothing.
+ else ()
+ set (_cooking_ingredient_dir ${_cooking_dir}/ingredient/${name})
+
+ add_custom_target (_cooking_ingredient_${name}_post_install
+ DEPENDS ${Cooking_INGREDIENTS_DIR}/.cooking_ingredient_${name})
+
+ add_dependencies (_cooking_ingredients _cooking_ingredient_${name}_post_install)
+
+ if (Cooking_LIST_ONLY)
+ add_custom_command (
+ OUTPUT ${Cooking_INGREDIENTS_DIR}/.cooking_ingredient_${name}
+ MAIN_DEPENDENCY ${Cooking_INGREDIENTS_DIR}/.cooking_stamp
+ COMMAND ${CMAKE_COMMAND} -E touch ${Cooking_INGREDIENTS_DIR}/.cooking_ingredient_${name})
+ else ()
+ cmake_parse_arguments (
+ _cooking_parsed_args
+ ""
+ "COOKING_RECIPE"
+ "CMAKE_ARGS;COOKING_INCLUDE;COOKING_EXCLUDE"
+ ${_cooking_args})
+
+ include (ExternalProject)
+ set (_cooking_stow_dir ${_cooking_dir}/stow)
+ string (REPLACE "<DISABLE>" "" _cooking_forwarded_args "${_cooking_parsed_args_UNPARSED_ARGUMENTS}")
+
+ if (NOT (SOURCE_DIR IN_LIST _cooking_args))
+ set (_cooking_source_dir SOURCE_DIR ${_cooking_ingredient_dir}/src)
+ else ()
+ set (_cooking_source_dir "")
+ endif ()
+
+ if (NOT ((BUILD_IN_SOURCE IN_LIST _cooking_args) OR (BINARY_DIR IN_LIST _cooking_args)))
+ set (_cooking_binary_dir BINARY_DIR ${_cooking_ingredient_dir}/build)
+ else ()
+ set (_cooking_binary_dir "")
+ endif ()
+
+ if (NOT (UPDATE_COMMAND IN_LIST _cooking_args))
+ set (_cooking_update_command UPDATE_COMMAND)
+ else ()
+ set (_cooking_update_command "")
+ endif ()
+
+ set (_cooking_extra_cmake_args
+ -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>)
+
+ if (NOT ("${ARGN}" MATCHES .*CMAKE_BUILD_TYPE.*))
+ list (APPEND _cooking_extra_cmake_args -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE})
+ endif ()
+
+ if (_cooking_parsed_args_COOKING_RECIPE)
+ set (_cooking_include_exclude_args "")
+
+ foreach (i ${_cooking_parsed_args_COOKING_INCLUDE})
+ list (APPEND _cooking_include_exclude_args -i ${i})
+ endforeach ()
+
+ foreach (e ${_cooking_parsed_args_COOKING_EXCLUDE})
+ list (APPEND _cooking_include_exclude_args -e ${e})
+ endforeach ()
+
+ set (_cooking_configure_command
+ CONFIGURE_COMMAND
+ <SOURCE_DIR>/cooking.sh
+ -r ${_cooking_parsed_args_COOKING_RECIPE}
+ -d <BINARY_DIR>
+ -p ${Cooking_INGREDIENTS_DIR}
+ -x
+ ${_cooking_include_exclude_args}
+ --
+ ${_cooking_extra_cmake_args}
+ ${_cooking_parsed_args_CMAKE_ARGS})
+ elseif (NOT (CONFIGURE_COMMAND IN_LIST _cooking_args))
+ set (_cooking_configure_command
+ CONFIGURE_COMMAND
+ ${CMAKE_COMMAND}
+ ${_cooking_extra_cmake_args}
+ ${_cooking_parsed_args_CMAKE_ARGS}
+ <SOURCE_DIR>)
+ else ()
+ set (_cooking_configure_command "")
+ endif ()
+
+ if (NOT (BUILD_COMMAND IN_LIST _cooking_args))
+ set (_cooking_build_command BUILD_COMMAND ${CMAKE_COMMAND} --build <BINARY_DIR>)
+ else ()
+ set (_cooking_build_command "")
+ endif ()
+
+ if (NOT (INSTALL_COMMAND IN_LIST _cooking_args))
+ set (_cooking_install_command INSTALL_COMMAND ${CMAKE_COMMAND} --build <BINARY_DIR> --target install)
+ else ()
+ set (_cooking_install_command "")
+ endif ()
+
+ ExternalProject_add (ingredient_${name}
+ ${_cooking_source_dir}
+ ${_cooking_binary_dir}
+ ${_cooking_update_command} ""
+ ${_cooking_configure_command}
+ ${_cooking_build_command}
+ ${_cooking_install_command}
+ PREFIX ${_cooking_ingredient_dir}
+ STAMP_DIR ${_cooking_ingredient_dir}/stamp
+ INSTALL_DIR ${_cooking_stow_dir}/${name}
+ STEP_TARGETS install
+ CMAKE_ARGS ${_cooking_extra_cmake_args}
+ "${_cooking_forwarded_args}")
+
+ if (_cooking_parsed_args_COOKING_RECIPE)
+ ExternalProject_add_step (ingredient_${name}
+ cooking-reconfigure
+ DEPENDS ${Cooking_INGREDIENTS_DIR}/.cooking_stamp
+ DEPENDERS configure)
+ endif ()
+
+ add_custom_command (
+ OUTPUT ${Cooking_INGREDIENTS_DIR}/.cooking_ingredient_${name}
+ MAIN_DEPENDENCY ${Cooking_INGREDIENTS_DIR}/.cooking_stamp
+ DEPENDS ingredient_${name}-install
+ COMMAND
+ flock
+ --wait 30
+ ${Cooking_INGREDIENTS_DIR}/.cooking_stow.lock
+ ${Cooking_STOW_EXECUTABLE}
+ -t ${Cooking_INGREDIENTS_DIR}
+ -d ${_cooking_stow_dir}
+ ${name}
+ COMMAND ${CMAKE_COMMAND} -E touch ${Cooking_INGREDIENTS_DIR}/.cooking_ingredient_${name})
+
+ add_dependencies (_cooking_ingredients ingredient_${name})
+ endif ()
+ endif ()
+endmacro ()
+EOF
+
+cmake_cooking_args=(
+ "-DCooking_INGREDIENTS_DIR=${ingredients_dir}"
+ "-DCooking_RECIPE=${recipe}"
+)
+
+#
+# Clean-up from a previous run.
+#
+
+if [ -e "${ingredients_ready_file}" ]; then
+ rm "${ingredients_ready_file}"
+fi
+
+if [ -e "${cache_file}" ]; then
+ rm "${cache_file}"
+fi
+
+if [ -d "${ingredients_dir}" -a -z "${nested}" ]; then
+ rm -r --preserve-root "${ingredients_dir}"
+fi
+
+mkdir -p "${ingredients_dir}"
+touch "${ingredients_dir}/.cooking_stamp"
+
+#
+# Validate recipe.
+#
+
+if [ -n "${recipe}" ]; then
+ recipe_file="${source_dir}/recipe/${recipe}.cmake"
+
+ if [ ! -f "${recipe_file}" ]; then
+ echo "Cooking: The '${recipe}' recipe does not exist!" && exit 1
+ fi
+fi
+
+#
+# Prepare lists of included and excluded ingredients.
+#
+
+if [ -n "${excluded_ingredients}" ] && [ -z "${list_only}" ]; then
+ cmake_cooking_args+=(
+ -DCooking_EXCLUDED_INGREDIENTS=$(printf "%s;" "${excluded_ingredients[@]}")
+ -DCooking_INCLUDED_INGREDIENTS=
+ )
+fi
+
+if [ -n "${included_ingredients}" ] && [ -z "${list_only}" ]; then
+ cmake_cooking_args+=(
+ -DCooking_EXCLUDED_INGREDIENTS=
+ -DCooking_INCLUDED_INGREDIENTS=$(printf "%s;" "${included_ingredients[@]}")
+ )
+fi
+
+#
+# Configure and build ingredients.
+#
+
+mkdir -p "${build_dir}"
+mkdir -p "${cooking_dir}"/stow
+touch "${cooking_dir}"/stow/.stow
+cd "${build_dir}"
+
+declare -a build_args
+
+if [ "${generator}" == "Ninja" ]; then
+ build_args+=(-v)
+fi
+
+if [ -n "${list_only}" ]; then
+ cmake_cooking_args+=("-DCooking_LIST_ONLY=ON")
+fi
+
+${CMAKE} -DCMAKE_BUILD_TYPE="${build_type}" "${cmake_cooking_args[@]}" -G "${generator}" "${source_dir}"
+${CMAKE} --build . --target _cooking_ingredients_ready -- "${build_args[@]}"
+
+#
+# Report what we've done (if we're not nested).
+#
+
+if [ -z "${nested}" ]; then
+ ingredients=($(find "${ingredients_dir}" -name '.cooking_ingredient_*' -printf '%f\n' | sed -r 's/\.cooking_ingredient_(.+)/\1/'))
+
+ if [ -z "${list_only}" ]; then
+ printf "\nCooking: Installed the following ingredients:\n"
+ else
+ printf "\nCooking: The following ingredients are necessary for this recipe:\n"
+ fi
+
+ for ingredient in "${ingredients[@]}"; do
+ echo " - ${ingredient}"
+ done
+
+ printf '\n'
+
+ if [ -n "${list_only}" ]; then
+ exit 0
+ fi
+fi
+
+#
+# Configure the project, expecting all requirements satisfied.
+#
+
+${CMAKE} -DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON "${@}" .
diff --git a/demo/CMakeLists.txt b/demo/CMakeLists.txt
new file mode 100644
index 00000000..b752b298
--- /dev/null
+++ b/demo/CMakeLists.txt
@@ -0,0 +1,101 @@
+#
+# This file is open source software, licensed to you under the terms
+# of the Apache License, Version 2.0 (the "License"). See the NOTICE file
+# distributed with this work for additional information regarding copyright
+# ownership. You may not use this file except in compliance with the License.
+#
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# Copyright (C) 2018 Scylladb, Ltd.
+#
+
+# Logical target for all demos.
+add_custom_target (demos)
+
+macro (seastar_add_demo name)
+ set (args ${ARGN})
+
+ cmake_parse_arguments (
+ parsed_args
+ ""
+ ""
+ "SOURCES"
+ ${args})
+
+ set (target demo_${name})
+ add_executable (${target} ${parsed_args_SOURCES})
+
+ target_include_directories (${target}
+ PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
+
+ target_link_libraries (${target}
+ PRIVATE
+ Boost::program_options
+ seastar)
+
+ set_target_properties (${target}
+ PROPERTIES
+ OUTPUT_NAME ${name})
+
+ add_dependencies (demos ${target})
+endmacro ()
+
+seastar_add_demo (block_discard
+ SOURCES block_discard_demo.cc)
+
+seastar_add_demo (echo
+ SOURCES echo_demo.cc)
+
+seastar_add_demo (ip
+ SOURCES ip_demo.cc)
+
+seastar_add_demo (line_count
+ SOURCES line_count_demo.cc)
+
+seastar_add_demo (l3
+ SOURCES l3_demo.cc)
+
+seastar_add_demo (rpc
+ SOURCES rpc_demo.cc)
+
+seastar_add_demo (scheduling_group
+ SOURCES scheduling_group_demo.cc)
+
+seastar_add_demo (tcp
+ SOURCES tcp_demo.cc)
+
+seastar_add_demo (tcp_sctp_client
+ SOURCES tcp_sctp_client_demo.cc)
+
+seastar_add_demo (tcp_sctp_server
+ SOURCES tcp_sctp_server_demo.cc)
+
+seastar_add_demo (tls_echo_server
+ SOURCES
+ tls_echo_server.hh
+ tls_echo_server_demo.cc)
+
+seastar_add_demo (tls_simple_client
+ SOURCES
+ tls_echo_server.hh
+ tls_simple_client_demo.cc)
+
+seastar_add_demo (udp_client
+ SOURCES udp_client_demo.cc)
+
+seastar_add_demo (udp_server
+ SOURCES udp_server_demo.cc)
+
+seastar_add_demo (udp_zero_copy
+ SOURCES udp_zero_copy_demo.cc)
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
new file mode 100644
index 00000000..567bd59e
--- /dev/null
+++ b/doc/CMakeLists.txt
@@ -0,0 +1,68 @@
+find_program (Seastar_DOXYGEN_EXECUTABLE doxygen)
+
+configure_file (
+ ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.cmake
+ ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
+ @ONLY)
+
+configure_file (
+ ${CMAKE_CURRENT_SOURCE_DIR}/DoxygenLayout.xml
+ ${CMAKE_CURRENT_BINARY_DIR}/DoxygenLayout.xml
+ COPYONLY)
+
+add_custom_command (
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/html
+ DEPENDS
+ seastar
+ ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
+ ${CMAKE_CURRENT_BINARY_DIR}/DoxygenLayout.xml
+ COMMAND ${Seastar_DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
+
+add_custom_target (doc_html
+ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/html)
+
+add_custom_command (
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/tutorial.html
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/tutorial.md
+ COMMAND
+ ${CMAKE_CURRENT_SOURCE_DIR}/md2html
+ ${CMAKE_CURRENT_SOURCE_DIR}/tutorial.md
+ ${CMAKE_CURRENT_BINARY_DIR}/tutorial.html)
+
+add_custom_target (doc_tutorial_html
+ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/tutorial.html)
+
+configure_file (
+ ${CMAKE_CURRENT_SOURCE_DIR}/htmlsplit.py
+ ${CMAKE_CURRENT_BINARY_DIR}/htmlsplit.py
+ COPYONLY)
+
+add_custom_command (
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/tutorial-split
+ DEPENDS
+ doc_tutorial_html
+ ${CMAKE_CURRENT_BINARY_DIR}/htmlsplit.py
+ COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/tutorial-split
+ COMMAND ${CMAKE_CURRENT_BINARY_DIR}/htmlsplit.py)
+
+add_custom_target (doc_tutorial_html_split
+ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/tutorial-split)
+
+add_custom_command (
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/tutorial.pdf
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/tutorial.md
+ COMMAND
+ ${CMAKE_CURRENT_SOURCE_DIR}/md2pdf
+ ${CMAKE_CURRENT_SOURCE_DIR}/tutorial.md
+ ${CMAKE_CURRENT_BINARY_DIR}/tutorial.pdf)
+
+add_custom_target (doc_tutorial_pdf
+ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/tutorial.pdf)
+
+# Logical target for all documentation.
+add_custom_target (docs
+ DEPENDS
+ doc_html
+ doc_tutorial_html
+ doc_tutorial_html_split
+ doc_tutorial_pdf)
diff --git a/doc/Doxyfile.cmake b/doc/Doxyfile.cmake
new file mode 100644
index 00000000..f633a71b
--- /dev/null
+++ b/doc/Doxyfile.cmake
@@ -0,0 +1,2362 @@
+# Doxyfile 1.8.9.1
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project.
+#
+# All text after a double hash (##) is considered a comment and is placed in
+# front of the TAG it is preceding.
+#
+# All text after a single hash (#) is considered a comment and will be ignored.
+# The format is:
+# TAG = value [value, ...]
+# For lists, items can also be appended using:
+# TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (\" \").
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the config file
+# that follow. The default is UTF-8 which is also the encoding used for all text
+# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv
+# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
+# for the list of possible encodings.
+# The default value is: UTF-8.
+
+DOXYFILE_ENCODING = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by
+# double-quotes, unless you are using Doxywizard) that should identify the
+# project for which the documentation is generated. This name is used in the
+# title of most generated pages and in a few other places.
+# The default value is: My Project.
+
+PROJECT_NAME = "Seastar"
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
+# could be handy for archiving the generated documentation or if some version
+# control system is used.
+
+PROJECT_NUMBER =
+
+# Using the PROJECT_BRIEF tag one can provide an optional one line description
+# for a project that appears at the top of each page and should give viewer a
+# quick idea about the purpose of the project. Keep the description short.
+
+PROJECT_BRIEF = "High performance C++ framework for concurrent servers"
+
+# With the PROJECT_LOGO tag one can specify a logo or an icon that is included
+# in the documentation. The maximum height of the logo should not exceed 55
+# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
+# the logo to the output directory.
+
+PROJECT_LOGO =
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
+# into which the generated documentation will be written. If a relative path is
+# entered, it will be relative to the location where doxygen was started. If
+# left blank the current directory will be used.
+
+OUTPUT_DIRECTORY = @CMAKE_CURRENT_BINARY_DIR@
+
+# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
+# directories (in 2 levels) under the output directory of each output format and
+# will distribute the generated files over these directories. Enabling this
+# option can be useful when feeding doxygen a huge amount of source files, where
+# putting all generated files in the same directory would otherwise causes
+# performance problems for the file system.
+# The default value is: NO.
+
+CREATE_SUBDIRS = NO
+
+# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII
+# characters to appear in the names of generated files. If set to NO, non-ASCII
+# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode
+# U+3044.
+# The default value is: NO.
+
+ALLOW_UNICODE_NAMES = YES
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese,
+# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States),
+# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian,
+# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages),
+# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian,
+# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian,
+# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish,
+# Ukrainian and Vietnamese.
+# The default value is: English.
+
+OUTPUT_LANGUAGE = English
+
+# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member
+# descriptions after the members that are listed in the file and class
+# documentation (similar to Javadoc). Set to NO to disable this.
+# The default value is: YES.
+
+BRIEF_MEMBER_DESC = YES
+
+# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief
+# description of a member or function before the detailed description
+#
+# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+# The default value is: YES.
+
+REPEAT_BRIEF = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator that is
+# used to form the text in various listings. Each string in this list, if found
+# as the leading text of the brief description, will be stripped from the text
+# and the result, after processing the whole list, is used as the annotated
+# text. Otherwise, the brief description is used as-is. If left blank, the
+# following values are used ($name is automatically replaced with the name of
+# the entity):The $name class, The $name widget, The $name file, is, provides,
+# specifies, contains, represents, a, an and the.
+
+ABBREVIATE_BRIEF =
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# doxygen will generate a detailed section even if there is only a brief
+# description.
+# The default value is: NO.
+
+ALWAYS_DETAILED_SEC = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
+# inherited members of a class in the documentation of that class as if those
+# members were ordinary class members. Constructors, destructors and assignment
+# operators of the base classes will not be shown.
+# The default value is: NO.
+
+INLINE_INHERITED_MEMB = YES
+
+# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path
+# before files name in the file list and in the header files. If set to NO the
+# shortest path that makes the file name unique will be used
+# The default value is: YES.
+
+FULL_PATH_NAMES = YES
+
+# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
+# Stripping is only done if one of the specified strings matches the left-hand
+# part of the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the path to
+# strip.
+#
+# Note that you can specify absolute paths here, but also relative paths, which
+# will be relative from the directory where doxygen is started.
+# This tag requires that the tag FULL_PATH_NAMES is set to YES.
+
+STRIP_FROM_PATH = @Seastar_SOURCE_DIR@/include @Seastar_BINARY_DIR@/gen
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
+# path mentioned in the documentation of a class, which tells the reader which
+# header file to include in order to use a class. If left blank only the name of
+# the header file containing the class definition is used. Otherwise one should
+# specify the list of include paths that are normally passed to the compiler
+# using the -I flag.
+
+STRIP_FROM_INC_PATH =
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
+# less readable) file names. This can be useful is your file systems doesn't
+# support long names like on DOS, Mac, or CD-ROM.
+# The default value is: NO.
+
+SHORT_NAMES = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the
+# first line (until the first dot) of a Javadoc-style comment as the brief
+# description. If set to NO, the Javadoc-style will behave just like regular Qt-
+# style comments (thus requiring an explicit @brief command for a brief
+# description.)
+# The default value is: NO.
+
+JAVADOC_AUTOBRIEF = NO
+
+# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
+# line (until the first dot) of a Qt-style comment as the brief description. If
+# set to NO, the Qt-style will behave just like regular Qt-style comments (thus
+# requiring an explicit \brief command for a brief description.)
+# The default value is: NO.
+
+QT_AUTOBRIEF = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a
+# multi-line C++ special comment block (i.e. a block of //! or /// comments) as
+# a brief description. This used to be the default behavior. The new default is
+# to treat a multi-line C++ comment block as a detailed description. Set this
+# tag to YES if you prefer the old behavior instead.
+#
+# Note that setting this tag to YES also means that rational rose comments are
+# not recognized any more.
+# The default value is: NO.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the
+# documentation from any documented member that it re-implements.
+# The default value is: YES.
+
+INHERIT_DOCS = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new
+# page for each member. If set to NO, the documentation of a member will be part
+# of the file/class/namespace that contains it.
+# The default value is: NO.
+
+SEPARATE_MEMBER_PAGES = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen
+# uses this value to replace tabs by spaces in code fragments.
+# Minimum value: 1, maximum value: 16, default value: 4.
+
+TAB_SIZE = 8
+
+# This tag can be used to specify a number of aliases that act as commands in
+# the documentation. An alias has the form:
+# name=value
+# For example adding
+# "sideeffect=@par Side Effects:\n"
+# will allow you to put the command \sideeffect (or @sideeffect) in the
+# documentation, which will result in a user-defined paragraph with heading
+# "Side Effects:". You can put \n's in the value part of an alias to insert
+# newlines.
+
+ALIASES =
+
+# This tag can be used to specify a number of word-keyword mappings (TCL only).
+# A mapping has the form "name=value". For example adding "class=itcl::class"
+# will allow you to use the command class in the itcl::class meaning.
+
+TCL_SUBST =
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
+# only. Doxygen will then generate output that is more tailored for C. For
+# instance, some of the names that are used will be different. The list of all
+# members will be omitted, etc.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_FOR_C = NO
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or
+# Python sources only. Doxygen will then generate output that is more tailored
+# for that language. For instance, namespaces will be presented as packages,
+# qualified scopes will look different, etc.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_JAVA = NO
+
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
+# sources. Doxygen will then generate output that is tailored for Fortran.
+# The default value is: NO.
+
+OPTIMIZE_FOR_FORTRAN = NO
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
+# sources. Doxygen will then generate output that is tailored for VHDL.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_VHDL = NO
+
+# Doxygen selects the parser to use depending on the extension of the files it
+# parses. With this tag you can assign which parser to use for a given
+# extension. Doxygen has a built-in mapping, but you can override or extend it
+# using this tag. The format is ext=language, where ext is a file extension, and
+# language is one of the parsers supported by doxygen: IDL, Java, Javascript,
+# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran:
+# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran:
+# Fortran. In the later case the parser tries to guess whether the code is fixed
+# or free formatted code, this is the default for Fortran type files), VHDL. For
+# instance to make doxygen treat .inc files as Fortran files (default is PHP),
+# and .f files as C (default is Fortran), use: inc=Fortran f=C.
+#
+# Note: For files without extension you can use no_extension as a placeholder.
+#
+# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
+# the files are not read by doxygen.
+
+EXTENSION_MAPPING =
+
+# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
+# according to the Markdown format, which allows for more readable
+# documentation. See http://daringfireball.net/projects/markdown/ for details.
+# The output of markdown processing is further processed by doxygen, so you can
+# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
+# case of backward compatibilities issues.
+# The default value is: YES.
+
+MARKDOWN_SUPPORT = YES
+
+# When enabled doxygen tries to link words that correspond to documented
+# classes, or namespaces to their corresponding documentation. Such a link can
+# be prevented in individual cases by putting a % sign in front of the word or
+# globally by setting AUTOLINK_SUPPORT to NO.
+# The default value is: YES.
+
+AUTOLINK_SUPPORT = YES
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
+# to include (a tag file for) the STL sources as input, then you should set this
+# tag to YES in order to let doxygen match functions declarations and
+# definitions whose arguments contain STL classes (e.g. func(std::string);
+# versus func(std::string) {}). This also make the inheritance and collaboration
+# diagrams that involve STL classes more complete and accurate.
+# The default value is: NO.
+
+BUILTIN_STL_SUPPORT = YES
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
+# enable parsing support.
+# The default value is: NO.
+
+CPP_CLI_SUPPORT = NO
+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
+# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
+# will parse them like normal C++ but will assume all classes use public instead
+# of private inheritance when no explicit protection keyword is present.
+# The default value is: NO.
+
+SIP_SUPPORT = NO
+
+# For Microsoft's IDL there are propget and propput attributes to indicate
+# getter and setter methods for a property. Setting this option to YES will make
+# doxygen to replace the get and set methods by a property in the documentation.
+# This will only work if the methods are indeed getting or setting a simple
+# type. If this is not the case, or you want to show the methods anyway, you
+# should set this option to NO.
+# The default value is: YES.
+
+IDL_PROPERTY_SUPPORT = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+# The default value is: NO.
+
+DISTRIBUTE_GROUP_DOC = NO
+
+# Set the SUBGROUPING tag to YES to allow class member groups of the same type
+# (for instance a group of public functions) to be put as a subgroup of that
+# type (e.g. under the Public Functions section). Set it to NO to prevent
+# subgrouping. Alternatively, this can be done per class using the
+# \nosubgrouping command.
+# The default value is: YES.
+
+SUBGROUPING = YES
+
+# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions
+# are shown inside the group in which they are included (e.g. using \ingroup)
+# instead of on a separate page (for HTML and Man pages) or section (for LaTeX
+# and RTF).
+#
+# Note that this feature does not work in combination with
+# SEPARATE_MEMBER_PAGES.
+# The default value is: NO.
+
+INLINE_GROUPED_CLASSES = NO
+
+# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions
+# with only public data fields or simple typedef fields will be shown inline in
+# the documentation of the scope in which they are defined (i.e. file,
+# namespace, or group documentation), provided this scope is documented. If set
+# to NO, structs, classes, and unions are shown on a separate page (for HTML and
+# Man pages) or section (for LaTeX and RTF).
+# The default value is: NO.
+
+INLINE_SIMPLE_STRUCTS = YES
+
+# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or
+# enum is documented as struct, union, or enum with the name of the typedef. So
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
+# with name TypeT. When disabled the typedef will appear as a member of a file,
+# namespace, or class. And the struct will be named TypeS. This can typically be
+# useful for C code in case the coding convention dictates that all compound
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+# The default value is: NO.
+
+TYPEDEF_HIDES_STRUCT = NO
+
+# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
+# cache is used to resolve symbols given their name and scope. Since this can be
+# an expensive process and often the same symbol appears multiple times in the
+# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small
+# doxygen will become slower. If the cache is too large, memory is wasted. The
+# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range
+# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536
+# symbols. At the end of a run doxygen will report the cache usage and suggest
+# the optimal cache size from a speed point of view.
+# Minimum value: 0, maximum value: 9, default value: 0.
+
+LOOKUP_CACHE_SIZE = 0
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in
+# documentation are documented, even if no documentation was available. Private
+# class members and static file members will be hidden unless the
+# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES.
+# Note: This will also disable the warnings about undocumented members that are
+# normally produced when WARNINGS is set to YES.
+# The default value is: NO.
+
+EXTRACT_ALL = NO
+
+# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will
+# be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PRIVATE = NO
+
+# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal
+# scope will be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PACKAGE = NO
+
+# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be
+# included in the documentation.
+# The default value is: NO.
+
+EXTRACT_STATIC = YES
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined
+# locally in source files will be included in the documentation. If set to NO,
+# only classes defined in header files are included. Does not have any effect
+# for Java sources.
+# The default value is: YES.
+
+EXTRACT_LOCAL_CLASSES = NO
+
+# This flag is only useful for Objective-C code. If set to YES, local methods,
+# which are defined in the implementation section but not in the interface are
+# included in the documentation. If set to NO, only methods in the interface are
+# included.
+# The default value is: NO.
+
+EXTRACT_LOCAL_METHODS = NO
+
+# If this flag is set to YES, the members of anonymous namespaces will be
+# extracted and appear in the documentation as a namespace called
+# 'anonymous_namespace{file}', where file will be replaced with the base name of
+# the file that contains the anonymous namespace. By default anonymous namespace
+# are hidden.
+# The default value is: NO.
+
+EXTRACT_ANON_NSPACES = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
+# undocumented members inside documented classes or files. If set to NO these
+# members will be included in the various overviews, but no documentation
+# section is generated. This option has no effect if EXTRACT_ALL is enabled.
+# The default value is: NO.
+
+HIDE_UNDOC_MEMBERS = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy. If set
+# to NO, these classes will be included in the various overviews. This option
+# has no effect if EXTRACT_ALL is enabled.
+# The default value is: NO.
+
+HIDE_UNDOC_CLASSES = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
+# (class|struct|union) declarations. If set to NO, these declarations will be
+# included in the documentation.
+# The default value is: NO.
+
+HIDE_FRIEND_COMPOUNDS = YES
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any
+# documentation blocks found inside the body of a function. If set to NO, these
+# blocks will be appended to the function's detailed documentation block.
+# The default value is: NO.
+
+HIDE_IN_BODY_DOCS = NO
+
+# The INTERNAL_DOCS tag determines if documentation that is typed after a
+# \internal command is included. If the tag is set to NO then the documentation
+# will be excluded. Set it to YES to include the internal documentation.
+# The default value is: NO.
+
+INTERNAL_DOCS = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file
+# names in lower-case letters. If set to YES, upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
+# and Mac users are advised to set this option to NO.
+# The default value is: system dependent.
+
+CASE_SENSE_NAMES = YES
+
+# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with
+# their full class and namespace scopes in the documentation. If set to YES, the
+# scope will be hidden.
+# The default value is: NO.
+
+HIDE_SCOPE_NAMES = NO
+
+# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will
+# append additional text to a page's title, such as Class Reference. If set to
+# YES the compound reference will be hidden.
+# The default value is: NO.
+
+HIDE_COMPOUND_REFERENCE= NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of
+# the files that are included by a file in the documentation of that file.
+# The default value is: YES.
+
+SHOW_INCLUDE_FILES = YES
+
+# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each
+# grouped member an include statement to the documentation, telling the reader
+# which file to include in order to use the member.
+# The default value is: NO.
+
+SHOW_GROUPED_MEMB_INC = NO
+
+# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include
+# files with double quotes in the documentation rather than with sharp brackets.
+# The default value is: NO.
+
+FORCE_LOCAL_INCLUDES = NO
+
+# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the
+# documentation for inline members.
+# The default value is: YES.
+
+INLINE_INFO = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the
+# (detailed) documentation of file and class members alphabetically by member
+# name. If set to NO, the members will appear in declaration order.
+# The default value is: YES.
+
+SORT_MEMBER_DOCS = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
+# descriptions of file, namespace and class members alphabetically by member
+# name. If set to NO, the members will appear in declaration order. Note that
+# this will also influence the order of the classes in the class list.
+# The default value is: NO.
+
+SORT_BRIEF_DOCS = NO
+
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the
+# (brief and detailed) documentation of class members so that constructors and
+# destructors are listed first. If set to NO the constructors will appear in the
+# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS.
+# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief
+# member documentation.
+# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting
+# detailed member documentation.
+# The default value is: NO.
+
+SORT_MEMBERS_CTORS_1ST = NO
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy
+# of group names into alphabetical order. If set to NO the group names will
+# appear in their defined order.
+# The default value is: NO.
+
+SORT_GROUP_NAMES = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by
+# fully-qualified names, including namespaces. If set to NO, the class list will
+# be sorted only by class name, not including the namespace part.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the alphabetical
+# list.
+# The default value is: NO.
+
+SORT_BY_SCOPE_NAME = NO
+
+# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper
+# type resolution of all parameters of a function it will reject a match between
+# the prototype and the implementation of a member function even if there is
+# only one candidate or it is obvious which candidate to choose by doing a
+# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still
+# accept a match between prototype and implementation in such cases.
+# The default value is: NO.
+
+STRICT_PROTO_MATCHING = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo
+# list. This list is created by putting \todo commands in the documentation.
+# The default value is: YES.
+
+GENERATE_TODOLIST = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test
+# list. This list is created by putting \test commands in the documentation.
+# The default value is: YES.
+
+GENERATE_TESTLIST = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug
+# list. This list is created by putting \bug commands in the documentation.
+# The default value is: YES.
+
+GENERATE_BUGLIST = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO)
+# the deprecated list. This list is created by putting \deprecated commands in
+# the documentation.
+# The default value is: YES.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional documentation
+# sections, marked by \if <section_label> ... \endif and \cond <section_label>
+# ... \endcond blocks.
+
+ENABLED_SECTIONS =
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the
+# initial value of a variable or macro / define can have for it to appear in the
+# documentation. If the initializer consists of more lines than specified here
+# it will be hidden. Use a value of 0 to hide initializers completely. The
+# appearance of the value of individual variables and macros / defines can be
+# controlled using \showinitializer or \hideinitializer command in the
+# documentation regardless of this setting.
+# Minimum value: 0, maximum value: 10000, default value: 30.
+
+MAX_INITIALIZER_LINES = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at
+# the bottom of the documentation of classes and structs. If set to YES, the
+# list will mention the files that were used to generate the documentation.
+# The default value is: YES.
+
+SHOW_USED_FILES = YES
+
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This
+# will remove the Files entry from the Quick Index and from the Folder Tree View
+# (if specified).
+# The default value is: YES.
+
+SHOW_FILES = YES
+
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces
+# page. This will remove the Namespaces entry from the Quick Index and from the
+# Folder Tree View (if specified).
+# The default value is: YES.
+
+SHOW_NAMESPACES = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that
+# doxygen should invoke to get the current version for each file (typically from
+# the version control system). Doxygen will invoke the program by executing (via
+# popen()) the command command input-file, where command is the value of the
+# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided
+# by doxygen. Whatever the program writes to standard output is used as the file
+# version. For an example see the documentation.
+
+FILE_VERSION_FILTER =
+
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
+# by doxygen. The layout file controls the global structure of the generated
+# output files in an output format independent way. To create the layout file
+# that represents doxygen's defaults, run doxygen with the -l option. You can
+# optionally specify a file name after the option, if omitted DoxygenLayout.xml
+# will be used as the name of the layout file.
+#
+# Note that if you run doxygen from a directory containing a file called
+# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
+# tag is left empty.
+
+LAYOUT_FILE =
+
+# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
+# the reference definitions. This must be a list of .bib files. The .bib
+# extension is automatically appended if omitted. This requires the bibtex tool
+# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.
+# For LaTeX the style of the bibliography can be controlled using
+# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
+# search path. See also \cite for info how to create references.
+
+CITE_BIB_FILES =
+
+#---------------------------------------------------------------------------
+# Configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated to
+# standard output by doxygen. If QUIET is set to YES this implies that the
+# messages are off.
+# The default value is: NO.
+
+QUIET = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES
+# this implies that the warnings are on.
+#
+# Tip: Turn warnings on while writing the documentation.
+# The default value is: YES.
+
+WARNINGS = YES
+
+# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate
+# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag
+# will automatically be disabled.
+# The default value is: YES.
+
+WARN_IF_UNDOCUMENTED = YES
+
+# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some parameters
+# in a documented function, or documenting parameters that don't exist or using
+# markup commands wrongly.
+# The default value is: YES.
+
+WARN_IF_DOC_ERROR = YES
+
+# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
+# are documented, but have no documentation for their parameters or return
+# value. If set to NO, doxygen will only warn about wrong or incomplete
+# parameter documentation, but not about the absence of documentation.
+# The default value is: NO.
+
+WARN_NO_PARAMDOC = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that doxygen
+# can produce. The string should contain the $file, $line, and $text tags, which
+# will be replaced by the file and line number from which the warning originated
+# and the warning text. Optionally the format may contain $version, which will
+# be replaced by the version of the file (if it could be obtained via
+# FILE_VERSION_FILTER)
+# The default value is: $file:$line: $text.
+
+WARN_FORMAT = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning and error
+# messages should be written. If left blank the output is written to standard
+# error (stderr).
+
+WARN_LOGFILE =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag is used to specify the files and/or directories that contain
+# documented source files. You may enter file names like myfile.cpp or
+# directories like /usr/src/myproject. Separate the files or directories with
+# spaces.
+# Note: If this tag is empty the current directory is searched.
+
+INPUT = @Seastar_SOURCE_DIR@/include @Seastar_BINARY_DIR@/gen
+
+# This tag can be used to specify the character encoding of the source files
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
+# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
+# documentation (see: http://www.gnu.org/software/libiconv) for the list of
+# possible encodings.
+# The default value is: UTF-8.
+
+INPUT_ENCODING = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and
+# *.h) to filter out the source-files in the directories. If left blank the
+# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii,
+# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp,
+# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown,
+# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf,
+# *.qsf, *.as and *.js.
+
+FILE_PATTERNS =
+
+# The RECURSIVE tag can be used to specify whether or not subdirectories should
+# be searched for input files as well.
+# The default value is: NO.
+
+RECURSIVE = YES
+
+# The EXCLUDE tag can be used to specify files and/or directories that should be
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+#
+# Note that relative paths are relative to the directory from which doxygen is
+# run.
+
+EXCLUDE =
+
+# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
+# directories that are symbolic links (a Unix file system feature) are excluded
+# from the input.
+# The default value is: NO.
+
+EXCLUDE_SYMLINKS = NO
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories.
+#
+# Note that the wildcards are matched against the file with absolute path, so to
+# exclude all test directories for example use the pattern */test/*
+
+EXCLUDE_PATTERNS = test.py
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
+# (namespaces, classes, functions, etc.) that should be excluded from the
+# output. The symbol name can be a fully qualified name, a word, or if the
+# wildcard * is used, a substring. Examples: ANamespace, AClass,
+# AClass::ANamespace, ANamespace::*Test
+#
+# Note that the wildcards are matched against the file with absolute path, so to
+# exclude all test directories use the pattern */test/*
+
+EXCLUDE_SYMBOLS = seastar::internal
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or directories
+# that contain example code fragments that are included (see the \include
+# command).
+
+EXAMPLE_PATH =
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
+# *.h) to filter out the source-files in the directories. If left blank all
+# files are included.
+
+EXAMPLE_PATTERNS =
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude commands
+# irrespective of the value of the RECURSIVE tag.
+# The default value is: NO.
+
+EXAMPLE_RECURSIVE = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or directories
+# that contain images that are to be included in the documentation (see the
+# \image command).
+
+IMAGE_PATH =
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command:
+#
+# <filter> <input-file>
+#
+# where <filter> is the value of the INPUT_FILTER tag, and <input-file> is the
+# name of an input file. Doxygen will then use the output that the filter
+# program writes to standard output. If FILTER_PATTERNS is specified, this tag
+# will be ignored.
+#
+# Note that the filter must not add or remove lines; it is applied before the
+# code is scanned, but not when the output code is generated. If lines are added
+# or removed, the anchors will not be placed correctly.
+
+INPUT_FILTER =
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis. Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match. The filters are a list of the form: pattern=filter
+# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how
+# filters are used. If the FILTER_PATTERNS tag is empty or if none of the
+# patterns match the file name, INPUT_FILTER is applied.
+
+FILTER_PATTERNS =
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER) will also be used to filter the input files that are used for
+# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES).
+# The default value is: NO.
+
+FILTER_SOURCE_FILES = NO
+
+# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
+# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and
+# it is also possible to disable source filtering for a specific pattern using
+# *.ext= (so without naming a filter).
+# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
+
+FILTER_SOURCE_PATTERNS =
+
+# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that
+# is part of the input, its contents will be placed on the main page
+# (index.html). This can be useful if you have a project on for instance GitHub
+# and want to reuse the introduction page also for the doxygen output.
+
+USE_MDFILE_AS_MAINPAGE =
+
+#---------------------------------------------------------------------------
+# Configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will be
+# generated. Documented entities will be cross-referenced with these sources.
+#
+# Note: To get rid of all source code in the generated output, make sure that
+# also VERBATIM_HEADERS is set to NO.
+# The default value is: NO.
+
+SOURCE_BROWSER = NO
+
+# Setting the INLINE_SOURCES tag to YES will include the body of functions,
+# classes and enums directly into the documentation.
+# The default value is: NO.
+
+INLINE_SOURCES = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any
+# special comment blocks from generated source code fragments. Normal C, C++ and
+# Fortran comments will always remain visible.
+# The default value is: YES.
+
+STRIP_CODE_COMMENTS = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES then for each documented
+# function all documented functions referencing it will be listed.
+# The default value is: NO.
+
+REFERENCED_BY_RELATION = NO
+
+# If the REFERENCES_RELATION tag is set to YES then for each documented function
+# all documented entities called/used by that function will be listed.
+# The default value is: NO.
+
+REFERENCES_RELATION = NO
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set
+# to YES then the hyperlinks from functions in REFERENCES_RELATION and
+# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will
+# link to the documentation.
+# The default value is: YES.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the
+# source code will show a tooltip with additional information such as prototype,
+# brief description and links to the definition and documentation. Since this
+# will make the HTML file larger and loading of large files a bit slower, you
+# can opt to disable this feature.
+# The default value is: YES.
+# This tag requires that the tag SOURCE_BROWSER is set to YES.
+
+SOURCE_TOOLTIPS = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code will
+# point to the HTML generated by the htags(1) tool instead of doxygen built-in
+# source browser. The htags tool is part of GNU's global source tagging system
+# (see http://www.gnu.org/software/global/global.html). You will need version
+# 4.8.6 or higher.
+#
+# To use it do the following:
+# - Install the latest version of global
+# - Enable SOURCE_BROWSER and USE_HTAGS in the config file
+# - Make sure the INPUT points to the root of the source tree
+# - Run doxygen as normal
+#
+# Doxygen will invoke htags (and that will in turn invoke gtags), so these
+# tools must be available from the command line (i.e. in the search path).
+#
+# The result: instead of the source browser generated by doxygen, the links to
+# source code will now point to the output of htags.
+# The default value is: NO.
+# This tag requires that the tag SOURCE_BROWSER is set to YES.
+
+USE_HTAGS = NO
+
+# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a
+# verbatim copy of the header file for each class for which an include is
+# specified. Set to NO to disable this.
+# See also: Section \class.
+# The default value is: YES.
+
+VERBATIM_HEADERS = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all
+# compounds will be generated. Enable this if the project contains a lot of
+# classes, structs, unions or interfaces.
+# The default value is: YES.
+
+ALPHABETICAL_INDEX = YES
+
+# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in
+# which the alphabetical index list will be split.
+# Minimum value: 1, maximum value: 20, default value: 5.
+# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
+
+COLS_IN_ALPHA_INDEX = 5
+
+# In case all classes in a project start with a common prefix, all classes will
+# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
+# can be used to specify a prefix (or a list of prefixes) that should be ignored
+# while generating the index headers.
+# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
+
+IGNORE_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output
+# The default value is: NO.
+
+GENERATE_HTML = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: html.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_OUTPUT = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
+# generated HTML page (for example: .htm, .php, .asp).
+# The default value is: .html.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_FILE_EXTENSION = .html
+
+# The HTML_HEADER tag can be used to specify a user-defined HTML header file for
+# each generated HTML page. If the tag is left blank doxygen will generate a
+# standard header.
+#
+# To get valid HTML the header file that includes any scripts and style sheets
+# that doxygen needs, which is dependent on the configuration options used (e.g.
+# the setting GENERATE_TREEVIEW). It is highly recommended to start with a
+# default header using
+# doxygen -w html new_header.html new_footer.html new_stylesheet.css
+# YourConfigFile
+# and then modify the file new_header.html. See also section "Doxygen usage"
+# for information on how to generate the default header that doxygen normally
+# uses.
+# Note: The header is subject to change so you typically have to regenerate the
+# default header when upgrading to a newer version of doxygen. For a description
+# of the possible markers and block names see the documentation.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_HEADER =
+
+# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
+# generated HTML page. If the tag is left blank doxygen will generate a standard
+# footer. See HTML_HEADER for more information on how to generate a default
+# footer and what special commands can be used inside the footer. See also
+# section "Doxygen usage" for information on how to generate the default footer
+# that doxygen normally uses.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_FOOTER =
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
+# sheet that is used by each HTML page. It can be used to fine-tune the look of
+# the HTML output. If left blank doxygen will generate a default style sheet.
+# See also section "Doxygen usage" for information on how to generate the style
+# sheet that doxygen normally uses.
+# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as
+# it is more robust and this tag (HTML_STYLESHEET) will in the future become
+# obsolete.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_STYLESHEET =
+
+# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined
+# cascading style sheets that are included after the standard style sheets
+# created by doxygen. Using this option one can overrule certain style aspects.
+# This is preferred over using HTML_STYLESHEET since it does not replace the
+# standard style sheet and is therefore more robust against future updates.
+# Doxygen will copy the style sheet files to the output directory.
+# Note: The order of the extra style sheet files is of importance (e.g. the last
+# style sheet in the list overrules the setting of the previous ones in the
+# list). For an example see the documentation.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_EXTRA_STYLESHEET =
+
+# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the HTML output directory. Note
+# that these files will be copied to the base HTML output directory. Use the
+# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
+# files. In the HTML_STYLESHEET file, use the file name only. Also note that the
+# files will be copied as-is; there are no commands or markers available.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_EXTRA_FILES =
+
+# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
+# will adjust the colors in the style sheet and background images according to
+# this color. Hue is specified as an angle on a colorwheel, see
+# http://en.wikipedia.org/wiki/Hue for more information. For instance the value
+# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
+# purple, and 360 is red again.
+# Minimum value: 0, maximum value: 359, default value: 220.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_HUE = 220
+
+# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors
+# in the HTML output. For a value of 0 the output will use grayscales only. A
+# value of 255 will produce the most vivid colors.
+# Minimum value: 0, maximum value: 255, default value: 100.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_SAT = 100
+
+# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the
+# luminance component of the colors in the HTML output. Values below 100
+# gradually make the output lighter, whereas values above 100 make the output
+# darker. The value divided by 100 is the actual gamma applied, so 80 represents
+# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not
+# change the gamma.
+# Minimum value: 40, maximum value: 240, default value: 80.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_GAMMA = 80
+
+# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
+# page will contain the date and time when the page was generated. Setting this
+# to NO can help when comparing the output of multiple runs.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_TIMESTAMP = NO
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
+# documentation will contain sections that can be hidden and shown after the
+# page has loaded.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_DYNAMIC_SECTIONS = NO
+
+# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries
+# shown in the various tree structured indices initially; the user can expand
+# and collapse entries dynamically later on. Doxygen will expand the tree to
+# such a level that at most the specified number of entries are visible (unless
+# a fully collapsed tree already exceeds this amount). So setting the number of
+# entries 1 will produce a full collapsed tree by default. 0 is a special value
+# representing an infinite number of entries and will result in a full expanded
+# tree by default.
+# Minimum value: 0, maximum value: 9999, default value: 100.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_INDEX_NUM_ENTRIES = 100
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files will be
+# generated that can be used as input for Apple's Xcode 3 integrated development
+# environment (see: http://developer.apple.com/tools/xcode/), introduced with
+# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a
+# Makefile in the HTML output directory. Running make will produce the docset in
+# that directory and running make install will install the docset in
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
+# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
+# for more information.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_DOCSET = NO
+
+# This tag determines the name of the docset feed. A documentation feed provides
+# an umbrella under which multiple documentation sets from a single provider
+# (such as a company or product suite) can be grouped.
+# The default value is: Doxygen generated docs.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_FEEDNAME = "Doxygen generated docs"
+
+# This tag specifies a string that should uniquely identify the documentation
+# set bundle. This should be a reverse domain-name style string, e.g.
+# com.mycompany.MyDocSet. Doxygen will append .docset to the name.
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_BUNDLE_ID = org.doxygen.Project
+
+# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify
+# the documentation publisher. This should be a reverse domain-name style
+# string, e.g. com.mycompany.MyDocSet.documentation.
+# The default value is: org.doxygen.Publisher.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_PUBLISHER_ID = org.doxygen.Publisher
+
+# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.
+# The default value is: Publisher.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_PUBLISHER_NAME = Publisher
+
+# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
+# additional HTML index files: index.hhp, index.hhc, and index.hhk. The
+# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
+# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on
+# Windows.
+#
+# The HTML Help Workshop contains a compiler that can convert all HTML output
+# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML
+# files are now used as the Windows 98 help format, and will replace the old
+# Windows help format (.hlp) on all Windows platforms in the future. Compressed
+# HTML files also contain an index, a table of contents, and you can search for
+# words in the documentation. The HTML workshop also contains a viewer for
+# compressed HTML files.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_HTMLHELP = NO
+
+# The CHM_FILE tag can be used to specify the file name of the resulting .chm
+# file. You can add a path in front of the file if the result should not be
+# written to the html output directory.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+CHM_FILE =
+
+# The HHC_LOCATION tag can be used to specify the location (absolute path
+# including file name) of the HTML help compiler (hhc.exe). If non-empty,
+# doxygen will try to run the HTML help compiler on the generated index.hhp.
+# The file has to be specified with full path.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+HHC_LOCATION =
+
+# The GENERATE_CHI flag controls if a separate .chi index file is generated
+# (YES) or that it should be included in the master .chm file (NO).
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+GENERATE_CHI = NO
+
+# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc)
+# and project file content.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+CHM_INDEX_ENCODING =
+
+# The BINARY_TOC flag controls whether a binary table of contents is generated
+# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it
+# enables the Previous and Next buttons.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+BINARY_TOC = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members to
+# the table of contents of the HTML help documentation and to the tree view.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+TOC_EXPAND = NO
+
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
+# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that
+# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help
+# (.qch) of the generated HTML documentation.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_QHP = NO
+
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify
+# the file name of the resulting .qch file. The path specified is relative to
+# the HTML output folder.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QCH_FILE =
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
+# Project output. For more information please see Qt Help Project / Namespace
+# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_NAMESPACE = org.doxygen.Project
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
+# Help Project output. For more information please see Qt Help Project / Virtual
+# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
+# folders).
+# The default value is: doc.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_VIRTUAL_FOLDER = doc
+
+# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
+# filter to add. For more information please see Qt Help Project / Custom
+# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# filters).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_CUST_FILTER_NAME =
+
+# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
+# custom filter to add. For more information please see Qt Help Project / Custom
+# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# filters).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_CUST_FILTER_ATTRS =
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
+# project's filter section matches. Qt Help Project / Filter Attributes (see:
+# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_SECT_FILTER_ATTRS =
+
+# The QHG_LOCATION tag can be used to specify the location of Qt's
+# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the
+# generated .qhp file.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHG_LOCATION =
+
+# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be
+# generated, together with the HTML files, they form an Eclipse help plugin. To
+# install this plugin and make it available under the help contents menu in
+# Eclipse, the contents of the directory containing the HTML and XML files needs
+# to be copied into the plugins directory of eclipse. The name of the directory
+# within the plugins directory should be the same as the ECLIPSE_DOC_ID value.
+# After copying Eclipse needs to be restarted before the help appears.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_ECLIPSEHELP = NO
+
+# A unique identifier for the Eclipse help plugin. When installing the plugin
+# the directory name containing the HTML and XML files should also have this
+# name. Each documentation set should have its own identifier.
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES.
+
+ECLIPSE_DOC_ID = org.doxygen.Project
+
+# If you want full control over the layout of the generated HTML pages it might
+# be necessary to disable the index and replace it with your own. The
+# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top
+# of each HTML page. A value of NO enables the index and the value YES disables
+# it. Since the tabs in the index contain the same information as the navigation
+# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+DISABLE_INDEX = NO
+
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
+# structure should be generated to display hierarchical information. If the tag
+# value is set to YES, a side panel will be generated containing a tree-like
+# index structure (just like the one that is generated for HTML Help). For this
+# to work a browser that supports JavaScript, DHTML, CSS and frames is required
+# (i.e. any modern browser). Windows users are probably better off using the
+# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can
+# further fine-tune the look of the index. As an example, the default style
+# sheet generated by doxygen has an example that shows how to put an image at
+# the root of the tree instead of the PROJECT_NAME. Since the tree basically has
+# the same information as the tab index, you could consider setting
+# DISABLE_INDEX to YES when enabling this option.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_TREEVIEW = NO
+
+# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that
+# doxygen will group on one line in the generated HTML documentation.
+#
+# Note that a value of 0 will completely suppress the enum values from appearing
+# in the overview section.
+# Minimum value: 0, maximum value: 20, default value: 4.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+ENUM_VALUES_PER_LINE = 4
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used
+# to set the initial width (in pixels) of the frame in which the tree is shown.
+# Minimum value: 0, maximum value: 1500, default value: 250.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+TREEVIEW_WIDTH = 250
+
+# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to
+# external symbols imported via tag files in a separate window.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+EXT_LINKS_IN_WINDOW = NO
+
+# Use this tag to change the font size of LaTeX formulas included as images in
+# the HTML documentation. When you change the font size after a successful
+# doxygen run you need to manually remove any form_*.png images from the HTML
+# output directory to force them to be regenerated.
+# Minimum value: 8, maximum value: 50, default value: 10.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+FORMULA_FONTSIZE = 10
+
+# Use the FORMULA_TRANPARENT tag to determine whether or not the images
+# generated for formulas are transparent PNGs. Transparent PNGs are not
+# supported properly for IE 6.0, but are supported on all modern browsers.
+#
+# Note that when changing this option you need to delete any form_*.png files in
+# the HTML output directory before the changes have effect.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+FORMULA_TRANSPARENT = YES
+
+# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
+# http://www.mathjax.org) which uses client side Javascript for the rendering
+# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX
+# installed or if you want to formulas look prettier in the HTML output. When
+# enabled you may also need to install MathJax separately and configure the path
+# to it using the MATHJAX_RELPATH option.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+USE_MATHJAX = NO
+
+# When MathJax is enabled you can set the default output format to be used for
+# the MathJax output. See the MathJax site (see:
+# http://docs.mathjax.org/en/latest/output.html) for more details.
+# Possible values are: HTML-CSS (which is slower, but has the best
+# compatibility), NativeMML (i.e. MathML) and SVG.
+# The default value is: HTML-CSS.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_FORMAT = HTML-CSS
+
+# When MathJax is enabled you need to specify the location relative to the HTML
+# output directory using the MATHJAX_RELPATH option. The destination directory
+# should contain the MathJax.js script. For instance, if the mathjax directory
+# is located at the same level as the HTML output directory, then
+# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
+# Content Delivery Network so you can quickly see the result without installing
+# MathJax. However, it is strongly recommended to install a local copy of
+# MathJax from http://www.mathjax.org before deployment.
+# The default value is: http://cdn.mathjax.org/mathjax/latest.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
+
+# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax
+# extension names that should be enabled during MathJax rendering. For example
+# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_EXTENSIONS =
+
+# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
+# of code that will be used on startup of the MathJax code. See the MathJax site
+# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an
+# example see the documentation.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_CODEFILE =
+
+# When the SEARCHENGINE tag is enabled doxygen will generate a search box for
+# the HTML output. The underlying search engine uses javascript and DHTML and
+# should work on any modern browser. Note that when using HTML help
+# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET)
+# there is already a search function so this one should typically be disabled.
+# For large projects the javascript based search engine can be slow, then
+# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to
+# search using the keyboard; to jump to the search box use <access key> + S
+# (what the <access key> is depends on the OS and browser, but it is typically
+# <CTRL>, <ALT>/<option>, or both). Inside the search box use the <cursor down
+# key> to jump into the search results window, the results can be navigated
+# using the <cursor keys>. Press <Enter> to select an item or <escape> to cancel
+# the search. The filter options can be selected when the cursor is inside the
+# search box by pressing <Shift>+<cursor down>. Also here use the <cursor keys>
+# to select a filter and <Enter> or <escape> to activate or cancel the filter
+# option.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+SEARCHENGINE = YES
+
+# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
+# implemented using a web server instead of a web client using Javascript. There
+# are two flavors of web server based searching depending on the EXTERNAL_SEARCH
+# setting. When disabled, doxygen will generate a PHP script for searching and
+# an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing
+# and searching needs to be provided by external tools. See the section
+# "External Indexing and Searching" for details.
+# The default value is: NO.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SERVER_BASED_SEARCH = NO
+
+# When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP
+# script for searching. Instead the search results are written to an XML file
+# which needs to be processed by an external indexer. Doxygen will invoke an
+# external search engine pointed to by the SEARCHENGINE_URL option to obtain the
+# search results.
+#
+# Doxygen ships with an example indexer (doxyindexer) and search engine
+# (doxysearch.cgi) which are based on the open source search engine library
+# Xapian (see: http://xapian.org/).
+#
+# See the section "External Indexing and Searching" for details.
+# The default value is: NO.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTERNAL_SEARCH = NO
+
+# The SEARCHENGINE_URL should point to a search engine hosted by a web server
+# which will return the search results when EXTERNAL_SEARCH is enabled.
+#
+# Doxygen ships with an example indexer (doxyindexer) and search engine
+# (doxysearch.cgi) which are based on the open source search engine library
+# Xapian (see: http://xapian.org/). See the section "External Indexing and
+# Searching" for details.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SEARCHENGINE_URL =
+
+# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed
+# search data is written to a file for indexing by an external tool. With the
+# SEARCHDATA_FILE tag the name of this file can be specified.
+# The default file is: searchdata.xml.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SEARCHDATA_FILE = searchdata.xml
+
+# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the
+# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is
+# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple
+# projects and redirect the results back to the right project.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTERNAL_SEARCH_ID =
+
+# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen
+# projects other than the one defined by this configuration file, but that are
+# all added to the same external search index. Each project needs to have a
+# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id of
+# to a relative location where the documentation can be found. The format is:
+# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTRA_SEARCH_MAPPINGS =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output.
+# The default value is: YES.
+
+GENERATE_LATEX = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: latex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_OUTPUT = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# invoked.
+#
+# Note that when enabling USE_PDFLATEX this option is only used for generating
+# bitmaps for formulas in the HTML output, but not in the Makefile that is
+# written to the output directory.
+# The default file is: latex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_CMD_NAME = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate
+# index for LaTeX.
+# The default file is: makeindex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+MAKEINDEX_CMD_NAME = makeindex
+
+# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX
+# documents. This may be useful for small projects and may help to save some
+# trees in general.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+COMPACT_LATEX = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used by the
+# printer.
+# Possible values are: a4 (210 x 297 mm), letter (8.5 x 11 inches), legal (8.5 x
+# 14 inches) and executive (7.25 x 10.5 inches).
+# The default value is: a4.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+PAPER_TYPE = a4
+
+# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
+# that should be included in the LaTeX output. To get the times font for
+# instance you can specify
+# EXTRA_PACKAGES=times
+# If left blank no extra packages will be included.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+EXTRA_PACKAGES =
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for the
+# generated LaTeX document. The header should contain everything until the first
+# chapter. If it is left blank doxygen will generate a standard header. See
+# section "Doxygen usage" for information on how to let doxygen write the
+# default header to a separate file.
+#
+# Note: Only use a user-defined header if you know what you are doing! The
+# following commands have a special meaning inside the header: $title,
+# $datetime, $date, $doxygenversion, $projectname, $projectnumber,
+# $projectbrief, $projectlogo. Doxygen will replace $title with the empty
+# string, for the replacement values of the other commands the user is referred
+# to HTML_HEADER.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_HEADER =
+
+# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the
+# generated LaTeX document. The footer should contain everything after the last
+# chapter. If it is left blank doxygen will generate a standard footer. See
+# LATEX_HEADER for more information on how to generate a default footer and what
+# special commands can be used inside the footer.
+#
+# Note: Only use a user-defined footer if you know what you are doing!
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_FOOTER =
+
+# The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined
+# LaTeX style sheets that are included after the standard style sheets created
+# by doxygen. Using this option one can overrule certain style aspects. Doxygen
+# will copy the style sheet files to the output directory.
+# Note: The order of the extra style sheet files is of importance (e.g. the last
+# style sheet in the list overrules the setting of the previous ones in the
+# list).
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_EXTRA_STYLESHEET =
+
+# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the LATEX_OUTPUT output
+# directory. Note that the files will be copied as-is; there are no commands or
+# markers available.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_EXTRA_FILES =
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is
+# prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will
+# contain links (just like the HTML output) instead of page references. This
+# makes the output suitable for online browsing using a PDF viewer.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+PDF_HYPERLINKS = YES
+
+# If the USE_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate
+# the PDF file directly from the LaTeX files. Set this option to YES, to get a
+# higher quality PDF documentation.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+USE_PDFLATEX = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode
+# command to the generated LaTeX files. This will instruct LaTeX to keep running
+# if errors occur, instead of asking the user for help. This option is also used
+# when generating formulas in HTML.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_BATCHMODE = NO
+
+# If the LATEX_HIDE_INDICES tag is set to YES then doxygen will not include the
+# index chapters (such as File Index, Compound Index, etc.) in the output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_HIDE_INDICES = NO
+
+# If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source
+# code with syntax highlighting in the LaTeX output.
+#
+# Note that which sources are shown also depends on other settings such as
+# SOURCE_BROWSER.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_SOURCE_CODE = NO
+
+# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
+# bibliography, e.g. plainnat, or ieeetr. See
+# http://en.wikipedia.org/wiki/BibTeX and \cite for more info.
+# The default value is: plain.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_BIB_STYLE = plain
+
+#---------------------------------------------------------------------------
+# Configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES, doxygen will generate RTF output. The
+# RTF output is optimized for Word 97 and may not look too pretty with other RTF
+# readers/editors.
+# The default value is: NO.
+
+GENERATE_RTF = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: rtf.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_OUTPUT = rtf
+
+# If the COMPACT_RTF tag is set to YES, doxygen generates more compact RTF
+# documents. This may be useful for small projects and may help to save some
+# trees in general.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+COMPACT_RTF = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated will
+# contain hyperlink fields. The RTF file will contain links (just like the HTML
+# output) instead of page references. This makes the output suitable for online
+# browsing using Word or some other Word compatible readers that support those
+# fields.
+#
+# Note: WordPad (write) and others do not support links.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_HYPERLINKS = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's config
+# file, i.e. a series of assignments. You only have to provide replacements,
+# missing definitions are set to their default value.
+#
+# See also section "Doxygen usage" for information on how to generate the
+# default style sheet that doxygen normally uses.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_STYLESHEET_FILE =
+
+# Set optional variables used in the generation of an RTF document. Syntax is
+# similar to doxygen's config file. A template extensions file can be generated
+# using doxygen -e rtf extensionFile.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_EXTENSIONS_FILE =
+
+# If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code
+# with syntax highlighting in the RTF output.
+#
+# Note that which sources are shown also depends on other settings such as
+# SOURCE_BROWSER.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_SOURCE_CODE = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES, doxygen will generate man pages for
+# classes and files.
+# The default value is: NO.
+
+GENERATE_MAN = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it. A directory man3 will be created inside the directory specified by
+# MAN_OUTPUT.
+# The default directory is: man.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_OUTPUT = man
+
+# The MAN_EXTENSION tag determines the extension that is added to the generated
+# man pages. In case the manual section does not start with a number, the number
+# 3 is prepended. The dot (.) at the beginning of the MAN_EXTENSION tag is
+# optional.
+# The default value is: .3.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_EXTENSION = .3
+
+# The MAN_SUBDIR tag determines the name of the directory created within
+# MAN_OUTPUT in which the man pages are placed. If defaults to man followed by
+# MAN_EXTENSION with the initial . removed.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_SUBDIR =
+
+# If the MAN_LINKS tag is set to YES and doxygen generates man output, then it
+# will generate one additional man file for each entity documented in the real
+# man page(s). These additional files only source the real man page, but without
+# them the man command would be unable to find the correct page.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_LINKS = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES, doxygen will generate an XML file that
+# captures the structure of the code including all documentation.
+# The default value is: NO.
+
+GENERATE_XML = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: xml.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_OUTPUT = xml
+
+# If the XML_PROGRAMLISTING tag is set to YES, doxygen will dump the program
+# listings (including syntax highlighting and cross-referencing information) to
+# the XML output. Note that enabling this will significantly increase the size
+# of the XML output.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_PROGRAMLISTING = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to the DOCBOOK output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_DOCBOOK tag is set to YES, doxygen will generate Docbook files
+# that can be used to generate PDF.
+# The default value is: NO.
+
+GENERATE_DOCBOOK = NO
+
+# The DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be put in
+# front of it.
+# The default directory is: docbook.
+# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
+
+DOCBOOK_OUTPUT = docbook
+
+# If the DOCBOOK_PROGRAMLISTING tag is set to YES, doxygen will include the
+# program listings (including syntax highlighting and cross-referencing
+# information) to the DOCBOOK output. Note that enabling this will significantly
+# increase the size of the DOCBOOK output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
+
+DOCBOOK_PROGRAMLISTING = NO
+
+#---------------------------------------------------------------------------
+# Configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an
+# AutoGen Definitions (see http://autogen.sf.net) file that captures the
+# structure of the code including all documentation. Note that this feature is
+# still experimental and incomplete at the moment.
+# The default value is: NO.
+
+GENERATE_AUTOGEN_DEF = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES, doxygen will generate a Perl module
+# file that captures the structure of the code including all documentation.
+#
+# Note that this feature is still experimental and incomplete at the moment.
+# The default value is: NO.
+
+GENERATE_PERLMOD = NO
+
+# If the PERLMOD_LATEX tag is set to YES, doxygen will generate the necessary
+# Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI
+# output from the Perl module output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_LATEX = NO
+
+# If the PERLMOD_PRETTY tag is set to YES, the Perl module output will be nicely
+# formatted so it can be parsed by a human reader. This is useful if you want to
+# understand what is going on. On the other hand, if this tag is set to NO, the
+# size of the Perl module output will be much smaller and Perl will parse it
+# just the same.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_PRETTY = YES
+
+# The names of the make variables in the generated doxyrules.make file are
+# prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. This is useful
+# so different doxyrules.make files included by the same Makefile don't
+# overwrite each other's variables.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_MAKEVAR_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES, doxygen will evaluate all
+# C-preprocessor directives found in the sources and include files.
+# The default value is: YES.
+
+ENABLE_PREPROCESSING = YES
+
+# If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names
+# in the source code. If set to NO, only conditional compilation will be
+# performed. Macro expansion can be done in a controlled way by setting
+# EXPAND_ONLY_PREDEF to YES.
+# The default value is: NO.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+MACRO_EXPANSION = YES
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then
+# the macro expansion is limited to the macros specified with the PREDEFINED and
+# EXPAND_AS_DEFINED tags.
+# The default value is: NO.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+EXPAND_ONLY_PREDEF = NO
+
+# If the SEARCH_INCLUDES tag is set to YES, the include files in the
+# INCLUDE_PATH will be searched if a #include is found.
+# The default value is: YES.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+SEARCH_INCLUDES = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by the
+# preprocessor.
+# This tag requires that the tag SEARCH_INCLUDES is set to YES.
+
+INCLUDE_PATH =
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will be
+# used.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+INCLUDE_FILE_PATTERNS =
+
+# The PREDEFINED tag can be used to specify one or more macro names that are
+# defined before the preprocessor is started (similar to the -D option of e.g.
+# gcc). The argument of the tag is a list of macros of the form: name or
+# name=definition (no spaces). If the definition and the "=" are omitted, "=1"
+# is assumed. To prevent a macro definition from being undefined via #undef or
+# recursively expanded use the := operator instead of the = operator.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+PREDEFINED =
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
+# tag can be used to specify a list of macro names that should be expanded. The
+# macro definition that is found in the sources will be used. Use the PREDEFINED
+# tag if you want to use a different macro definition that overrules the
+# definition found in the source code.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+EXPAND_AS_DEFINED =
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will
+# remove all references to function-like macros that are alone on a line, have
+# an all uppercase name, and do not end with a semicolon. Such function macros
+# are typically used for boiler-plate code, and will confuse the parser if not
+# removed.
+# The default value is: YES.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+SKIP_FUNCTION_MACROS = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES tag can be used to specify one or more tag files. For each tag
+# file the location of the external documentation should be added. The format of
+# a tag file without this location is as follows:
+# TAGFILES = file1 file2 ...
+# Adding location for the tag files is done as follows:
+# TAGFILES = file1=loc1 "file2 = loc2" ...
+# where loc1 and loc2 can be relative or absolute paths or URLs. See the
+# section "Linking to external documentation" for more information about the use
+# of tag files.
+# Note: Each tag file must have a unique name (where the name does NOT include
+# the path). If a tag file is not located in the directory in which doxygen is
+# run, you must also specify the path to the tagfile here.
+
+TAGFILES =
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create a
+# tag file that is based on the input files it reads. See section "Linking to
+# external documentation" for more information about the usage of tag files.
+
+GENERATE_TAGFILE =
+
+# If the ALLEXTERNALS tag is set to YES, all external class will be listed in
+# the class index. If set to NO, only the inherited external classes will be
+# listed.
+# The default value is: NO.
+
+ALLEXTERNALS = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES, all external groups will be listed
+# in the modules index. If set to NO, only the current project's groups will be
+# listed.
+# The default value is: YES.
+
+EXTERNAL_GROUPS = YES
+
+# If the EXTERNAL_PAGES tag is set to YES, all external pages will be listed in
+# the related pages index. If set to NO, only the current project's pages will
+# be listed.
+# The default value is: YES.
+
+EXTERNAL_PAGES = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script
+# interpreter (i.e. the result of 'which perl').
+# The default file (with absolute path) is: /usr/bin/perl.
+
+PERL_PATH = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES, doxygen will generate a class diagram
+# (in HTML and LaTeX) for classes with base or super classes. Setting the tag to
+# NO turns the diagrams off. Note that this option also works with HAVE_DOT
+# disabled, but it is recommended to install and use dot, since it yields more
+# powerful graphs.
+# The default value is: YES.
+
+CLASS_DIAGRAMS = YES
+
+# You can define message sequence charts within doxygen comments using the \msc
+# command. Doxygen will then run the mscgen tool (see:
+# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where
+# the mscgen tool resides. If left empty the tool is assumed to be found in the
+# default search path.
+
+MSCGEN_PATH =
+
+# You can include diagrams made with dia in doxygen documentation. Doxygen will
+# then run dia to produce the diagram and insert it in the documentation. The
+# DIA_PATH tag allows you to specify the directory where the dia binary resides.
+# If left empty dia is assumed to be found in the default search path.
+
+DIA_PATH =
+
+# If set to YES the inheritance and collaboration graphs will hide inheritance
+# and usage relations if the target is undocumented or is not a class.
+# The default value is: YES.
+
+HIDE_UNDOC_RELATIONS = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz (see:
+# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
+# Bell Labs. The other options in this section have no effect if this option is
+# set to NO
+# The default value is: NO.
+
+HAVE_DOT = NO
+
+# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
+# to run in parallel. When set to 0 doxygen will base this on the number of
+# processors available in the system. You can set it explicitly to a value
+# larger than 0 to get control over the balance between CPU load and processing
+# speed.
+# Minimum value: 0, maximum value: 32, default value: 0.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_NUM_THREADS = 0
+
+# When you want a differently looking font in the dot files that doxygen
+# generates you can specify the font name using DOT_FONTNAME. You need to make
+# sure dot is able to find the font, which can be done by putting it in a
+# standard location or by setting the DOTFONTPATH environment variable or by
+# setting DOT_FONTPATH to the directory containing the font.
+# The default value is: Helvetica.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTNAME = Helvetica
+
+# The DOT_FONTSIZE tag can be used to set the size (in points) of the font of
+# dot graphs.
+# Minimum value: 4, maximum value: 24, default value: 10.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTSIZE = 10
+
+# By default doxygen will tell dot to use the default font as specified with
+# DOT_FONTNAME. If you specify a different font using DOT_FONTNAME you can set
+# the path where dot can find it using this tag.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTPATH =
+
+# If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for
+# each documented class showing the direct and indirect inheritance relations.
+# Setting this tag to YES will force the CLASS_DIAGRAMS tag to NO.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CLASS_GRAPH = YES
+
+# If the COLLABORATION_GRAPH tag is set to YES then doxygen will generate a
+# graph for each documented class showing the direct and indirect implementation
+# dependencies (inheritance, containment, and class references variables) of the
+# class with other documented classes.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+COLLABORATION_GRAPH = YES
+
+# If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for
+# groups, showing the direct groups dependencies.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GROUP_GRAPHS = YES
+
+# If the UML_LOOK tag is set to YES, doxygen will generate inheritance and
+# collaboration diagrams in a style similar to the OMG's Unified Modeling
+# Language.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+UML_LOOK = NO
+
+# If the UML_LOOK tag is enabled, the fields and methods are shown inside the
+# class node. If there are many fields or methods and many nodes the graph may
+# become too big to be useful. The UML_LIMIT_NUM_FIELDS threshold limits the
+# number of items for each type to make the size more manageable. Set this to 0
+# for no limit. Note that the threshold may be exceeded by 50% before the limit
+# is enforced. So when you set the threshold to 10, up to 15 fields may appear,
+# but if the number exceeds 15, the total amount of fields shown is limited to
+# 10.
+# Minimum value: 0, maximum value: 100, default value: 10.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+UML_LIMIT_NUM_FIELDS = 10
+
+# If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and
+# collaboration graphs will show the relations between templates and their
+# instances.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+TEMPLATE_RELATIONS = NO
+
+# If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to
+# YES then doxygen will generate a graph for each documented file showing the
+# direct and indirect include dependencies of the file with other documented
+# files.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INCLUDE_GRAPH = YES
+
+# If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are
+# set to YES then doxygen will generate a graph for each documented file showing
+# the direct and indirect include dependencies of the file with other documented
+# files.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INCLUDED_BY_GRAPH = YES
+
+# If the CALL_GRAPH tag is set to YES then doxygen will generate a call
+# dependency graph for every global function or class method.
+#
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable call graphs for selected
+# functions only using the \callgraph command.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CALL_GRAPH = NO
+
+# If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller
+# dependency graph for every global function or class method.
+#
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable caller graphs for selected
+# functions only using the \callergraph command.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CALLER_GRAPH = NO
+
+# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical
+# hierarchy of all classes instead of a textual one.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GRAPHICAL_HIERARCHY = YES
+
+# If the DIRECTORY_GRAPH tag is set to YES then doxygen will show the
+# dependencies a directory has on other directories in a graphical way. The
+# dependency relations are determined by the #include relations between the
+# files in the directories.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DIRECTORY_GRAPH = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
+# generated by dot.
+# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order
+# to make the SVG files visible in IE 9+ (other browsers do not have this
+# requirement).
+# Possible values are: png, jpg, gif and svg.
+# The default value is: png.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_IMAGE_FORMAT = png
+
+# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
+# enable generation of interactive SVG images that allow zooming and panning.
+#
+# Note that this requires a modern browser other than Internet Explorer. Tested
+# and working are Firefox, Chrome, Safari, and Opera.
+# Note: For IE 9+ you need to set HTML_FILE_EXTENSION to xhtml in order to make
+# the SVG files visible. Older versions of IE do not have SVG support.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INTERACTIVE_SVG = NO
+
+# The DOT_PATH tag can be used to specify the path where the dot tool can be
+# found. If left blank, it is assumed the dot tool can be found in the path.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_PATH =
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the \dotfile
+# command).
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOTFILE_DIRS =
+
+# The MSCFILE_DIRS tag can be used to specify one or more directories that
+# contain msc files that are included in the documentation (see the \mscfile
+# command).
+
+MSCFILE_DIRS =
+
+# The DIAFILE_DIRS tag can be used to specify one or more directories that
+# contain dia files that are included in the documentation (see the \diafile
+# command).
+
+DIAFILE_DIRS =
+
+# When using plantuml, the PLANTUML_JAR_PATH tag should be used to specify the
+# path where java can find the plantuml.jar file. If left blank, it is assumed
+# PlantUML is not used or called during a preprocessing step. Doxygen will
+# generate a warning when it encounters a \startuml command in this case and
+# will not generate output for the diagram.
+
+PLANTUML_JAR_PATH =
+
+# When using plantuml, the specified paths are searched for files specified by
+# the !include statement in a plantuml block.
+
+PLANTUML_INCLUDE_PATH =
+
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes
+# that will be shown in the graph. If the number of nodes in a graph becomes
+# larger than this value, doxygen will truncate the graph, which is visualized
+# by representing a node as a red box. Note that doxygen if the number of direct
+# children of the root node in a graph is already larger than
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note that
+# the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+# Minimum value: 0, maximum value: 10000, default value: 50.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_GRAPH_MAX_NODES = 50
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs
+# generated by dot. A depth value of 3 means that only nodes reachable from the
+# root by following a path via at most 3 edges will be shown. Nodes that lay
+# further from the root node will be omitted. Note that setting this option to 1
+# or 2 may greatly reduce the computation time needed for large code bases. Also
+# note that the size of a graph can be further restricted by
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+# Minimum value: 0, maximum value: 1000, default value: 0.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+MAX_DOT_GRAPH_DEPTH = 0
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
+# background. This is disabled by default, because dot on Windows does not seem
+# to support this out of the box.
+#
+# Warning: Depending on the platform used, enabling this option may lead to
+# badly anti-aliased labels on the edges of a graph (i.e. they become hard to
+# read).
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_TRANSPARENT = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output
+# files in one run (i.e. multiple -o and -T options on the command line). This
+# makes dot run faster, but since only newer versions of dot (>1.8.10) support
+# this, this feature is disabled by default.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_MULTI_TARGETS = NO
+
+# If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page
+# explaining the meaning of the various boxes and arrows in the dot generated
+# graphs.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GENERATE_LEGEND = YES
+
+# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate dot
+# files that are used to generate the various graphs.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_CLEANUP = YES
diff --git a/doc/building-arch.md b/doc/building-arch.md
index 96ff56a7..51863a51 100644
--- a/doc/building-arch.md
+++ b/doc/building-arch.md
@@ -7,6 +7,6 @@ sudo ./install-dependencies.sh

To compile Seastar use:
```
-./configure.py
-ninja
+./cooking.sh -r dev -i 'c-ares;fmt'
+ninja -C build
```
diff --git a/doc/building-centos.md b/doc/building-centos.md
index a7af58dc..ec351385 100644
--- a/doc/building-centos.md
+++ b/doc/building-centos.md
@@ -5,10 +5,11 @@
Installing required packages:
```
sudo ./install-dependencies.sh
+./cooking.sh -r dev -i 'c-ares;fmt'
```

To compile Seastar explicitly using gcc 5, use:
```
-./configure.py --compiler=/opt/scylladb/bin/g++ --static-stdc++
-ninja-build
+CXX=/opt/scylladb/bin/g++ ./cooking.sh -r dev -i 'c-ares;fmt'
+ninja-build -C build
```
diff --git a/doc/building-fedora.md b/doc/building-fedora.md
index 4ebd4c2a..54f8fb0f 100644
--- a/doc/building-fedora.md
+++ b/doc/building-fedora.md
@@ -9,15 +9,14 @@ sudo ./install-dependencies.sh

You then need to run the following to create the "build.ninja" file:
```
-./configure.py
+./cooking.sh -r dev -i 'c-ares;fmt'
```
Note it is enough to run this once, and you don't need to repeat it before
-every build. build.ninja includes a rule which will automatically re-run
-./configure.py if it changes.
+every build.

Then finally:
```
-ninja-build
+ninja-build -C build
```

In case there are compilation issues, especially like ```g++: internal compiler error: Killed (program cc1plus)``` try giving more memory to gcc, either by limiting the amount of threads ( -j1 ) and/or allowing at least 4g ram to your machine
diff --git a/doc/building-ubuntu.md b/doc/building-ubuntu.md
index 3896289e..01fc146f 100644
--- a/doc/building-ubuntu.md
+++ b/doc/building-ubuntu.md
@@ -9,6 +9,6 @@ sudo ./install-dependencies.sh

To compile Seastar explicitly using gcc 5, use:
```
-./configure.py --compiler=g++-5
-ninja
+CXX=g++-5 ./cooking.sh -r dev -i 'c-ares;fmt'
+ninja -C build
```
diff --git a/doc/htmlsplit.py b/doc/htmlsplit.py
index de3f2f4d..9ec81cd2 100755
--- a/doc/htmlsplit.py
+++ b/doc/htmlsplit.py
@@ -43,7 +43,7 @@ def links(out, chapter):
pass
def flush(chapter, header, chunk):
fn = 'index.html' if chapter == 0 else str(chapter) + '.html'
- with open('split/' + fn, 'w') as out:
+ with open('tutorial-split/' + fn, 'w') as out:
out.write(header)
links(out, chapter)
out.write(chunk)
diff --git a/license/cmake.txt b/license/cmake.txt
new file mode 100644
index 00000000..7a3d5878
--- /dev/null
+++ b/license/cmake.txt
@@ -0,0 +1,30 @@
+CMake - Cross Platform Makefile Generator
+Copyright 2000-2018 Kitware, Inc. and Contributors
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+* Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+* Neither the name of Kitware, Inc. nor the names of Contributors
+ may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/pkgconfig/seastar.pc.cmake b/pkgconfig/seastar.pc.cmake
new file mode 100644
index 00000000..2845b6ed
--- /dev/null
+++ b/pkgconfig/seastar.pc.cmake
@@ -0,0 +1,46 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=${prefix}
+includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
+libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
+
+Name: Seastar
+Url: http://seastar-project.org
+Description: Advanced C++ framework for high-performance server applications on modern hardware.
+Version: @PROJECT_VERSION@
+
+# Platform dependencies.
+dl_libs=$<JOIN:@dl_LIBRARIES@, >
+stdfilesystem_libs=$<JOIN:@StdFilesystem_LIBRARIES@, >
+rt_libs=$<JOIN:@rt_LIBRARIES@, >
+
+# Dependencies of dependencies.
+boost_system_libs=@Boost_SYSTEM_LIBRARY@
+
+# Dependencies.
+boost_cflags=-I$<JOIN:@Boost_INCLUDE_DIRS@, -I>
+boost_filesystem_libs=@Boost_FILESYSTEM_LIBRARY@
+boost_program_options_libs=@Boost_PROGRAM_OPTIONS_LIBRARY@
+boost_thread_libs=${boost_system_libs} @Boost_THREAD_LIBRARY@
+c_ares_cflags=-I$<JOIN:@c-ares_INCLUDE_DIRS@, -I>
+c_ares_libs=$<JOIN:@c-ares_LIBRARIES@, >
+cryptopp_cflags=-I$<JOIN:@cryptopp_INCLUDE_DIRS@, -I>
+cryptopp_libs=$<JOIN:@cryptopp_LIBRARIES@, >
+dpdk_libs=$<JOIN:@dpdk_LIBRARIES@, >
+fmt_cflags=-I$<JOIN:$<TARGET_PROPERTY:fmt::fmt,INTERFACE_INCLUDE_DIRECTORIES>, -I>
+fmt_libs=$<TARGET_LINKER_FILE:fmt::fmt>
+lksctp_tools_cflags=-I$<JOIN:@lksctp-tools_INCLUDE_DIRS@, -I>
+lksctp_tools_libs=$<JOIN:@lksctp-tools_LIBRARIES@, >
+numactl_cflags=-I$<JOIN:@numactl_INCLUDE_DIRS@, -I>
+numactl_libs=$<JOIN:@numactl_LIBRARIES@, >
+sanitizers_cflags=$<JOIN:@Sanitizers_COMPILER_OPTIONS@, >
+
+# Us.
+seastar_cflags=-I{includedir} $<JOIN:$<TARGET_PROPERTY:seastar,INTERFACE_COMPILE_OPTIONS>, > -D$<JOIN:$<TARGET_PROPERTY:seastar,INTERFACE_COMPILE_DEFINITIONS>, -D>
+seastar_libs=$<TARGET_FILE:seastar>
+
+Requires: liblz4 >= 1.8.0
+Requires.private: gnutls >= 3.5.18, protobuf >= 3.3.1, hwloc >= 1.11.5, yaml-cpp >= 0.5.3
+Conflicts:
+Cflags: ${boost_cflags} ${c_ares_cflags} ${cryptopp_cflags} ${fmt_cflags} ${lksctp_tools_cflags} ${numactl_cflags} ${sanitizers_cflags} ${seastar_cflags}
+Libs: ${boost_program_options_libs} ${boost_thread_libs} ${c_ares_libs} ${cryptopp_libs} ${fmt_libs} ${seastar_libs}
+Libs.private: ${dl_libs} ${rt_libs} ${boost_filesystem_libs} ${boost_thread_libs} ${dpdk_libs} ${lksctp_tools_libs} ${numactl_libs} ${stdfilesystem_libs}
diff --git a/recipe/dev.cmake b/recipe/dev.cmake
new file mode 100644
index 00000000..94879141
--- /dev/null
+++ b/recipe/dev.cmake
@@ -0,0 +1,275 @@
+#
+# This file is open source software, licensed to you under the terms
+# of the Apache License, Version 2.0 (the "License"). See the NOTICE file
+# distributed with this work for additional information regarding copyright
+# ownership. You may not use this file except in compliance with the License.
+#
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# Copyright (C) 2018 Scylladb, Ltd.
+#
+
+#
+# Useful definitions for `cmake -E env`.
+#
+
+set (amended_PATH PATH=${Cooking_INGREDIENTS_DIR}/bin:$ENV{PATH})
+set (PKG_CONFIG_PATH PKG_CONFIG_PATH=${Cooking_INGREDIENTS_DIR}/lib/pkgconfig)
+
+#
+# Some Autotools ingredients need this information because they don't use pkgconfig.
+#
+
+set (autotools_ingredients_flags
+ CFLAGS=-I${Cooking_INGREDIENTS_DIR}/include
+ CXXFLAGS=-I${Cooking_INGREDIENTS_DIR}/include
+ LDFLAGS=-L${Cooking_INGREDIENTS_DIR}/lib)
+
+#
+# Some Autotools projects amend the info file instead of making a package-specific one.
+# This doesn't play nicely with GNU Stow.
+#
+# Just append the name of the ingredient, like
+#
+# ${info_dir}/gmp
+#
+
+set (info_dir --infodir=<INSTALL_DIR>/share/info)
+
+#
+# Build-concurrency.
+#
+
+cmake_host_system_information (
+ RESULT build_concurrency_factor
+ QUERY NUMBER_OF_LOGICAL_CORES)
+
+set (make_command make -j ${build_concurrency_factor})
+
+#
+# All the ingredients.
+#
+
+##
+## Dependencies of dependencies of dependencies.
+##
+
+cooking_ingredient (gmp
+ URL https://gmplib.org/download/gmp/gmp-6.1.2.tar.bz2
+ URL_MD5 8ddbb26dc3bd4e2302984debba1406a5
+ CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=<INSTALL_DIR> --srcdir=<SOURCE_DIR> ${info_dir}/gmp
+ BUILD_COMMAND <DISABLE>
+ INSTALL_COMMAND ${make_command} install)
+
+##
+## Dependencies of dependencies.
+##
+
+cooking_ingredient (colm
+ URL http://www.colm.net/files/colm/colm-0.13.0.6.tar.gz
+ URL_MD5 16aaf566cbcfe9a06154e094638ac709
+ # This is upsetting.
+ BUILD_IN_SOURCE YES
+ CONFIGURE_COMMAND ./configure --prefix=<INSTALL_DIR>
+ BUILD_COMMAND <DISABLE>
+ INSTALL_COMMAND ${make_command} install)
+
+cooking_ingredient (libpciaccess
+ URL https://www.x.org/releases/individual/lib/libpciaccess-0.13.4.tar.gz
+ URL_MD5 cc1fad87da60682af1d5fa43a5da45a4
+ CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=<INSTALL_DIR> --srcdir=<SOURCE_DIR>
+ BUILD_COMMAND <DISABLE>
+ INSTALL_COMMAND ${make_command} install)
+
+cooking_ingredient (nettle
+ DEPENDS ingredient_gmp
+ URL https://ftp.gnu.org/gnu/nettle/nettle-3.4.tar.gz
+ URL_MD5 dc0f13028264992f58e67b4e8915f53d
+ CONFIGURE_COMMAND
+ <SOURCE_DIR>/configure
+ --prefix=<INSTALL_DIR>
+ --srcdir=<SOURCE_DIR>
+ --libdir=<INSTALL_DIR>/lib
+ ${info_dir}/nettle
+ ${autotools_ingredients_flags}
+ BUILD_COMMAND <DISABLE>
+ INSTALL_COMMAND ${make_command} install)
+
+# Also a direct dependency of Seastar.
+cooking_ingredient (numactl
+ GIT_REPOSITORY https://github.com/numactl/numactl.git
+ GIT_TAG f1849d0d7a50a6b9d507b7cc6164b04aae948d54
+ PATCH_COMMAND ./autogen.sh
+ CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=<INSTALL_DIR> --srcdir=<SOURCE_DIR>
+ BUILD_COMMAND <DISABLE>
+ INSTALL_COMMAND ${make_command} install)
+
+cooking_ingredient (zlib
+ URL https://zlib.net/zlib-1.2.11.tar.gz
+ URL_MD5 1c9f62f0778697a09d36121ead88e08e
+ CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=<INSTALL_DIR> --64
+ BUILD_COMMAND <DISABLE>
+ INSTALL_COMMAND ${make_command} install)
+
+##
+## Private and private/public dependencies.
+##
+
+cooking_ingredient (Boost
+ # The 1.67.0 release has a bug in Boost Lockfree around a missing header.
+ URL https://dl.bintray.com/boostorg/release/1.64.0/source/boost_1_64_0.tar.gz
+ URL_MD5 319c6ffbbeccc366f14bb68767a6db79
+ PATCH_COMMAND
+ ./bootstrap.sh
+ --prefix=<INSTALL_DIR>
+ --with-libraries=atomic,chrono,date_time,filesystem,program_options,system,test,thread
+ CONFIGURE_COMMAND <DISABLE>
+ BUILD_COMMAND <DISABLE>
+ INSTALL_COMMAND
+ ${CMAKE_COMMAND} -E chdir <SOURCE_DIR>
+ ./b2
+ -j ${build_concurrency_factor}
+ --layout=system
+ --build-dir=<BINARY_DIR>
+ install
+ variant=debug
+ link=shared
+ threading=multi)
+
+cooking_ingredient (GnuTLS
+ DEPENDS
+ ingredient_gmp
+ ingredient_nettle
+ URL https://www.gnupg.org/ftp/gcrypt/gnutls/v3.5/gnutls-3.5.18.tar.xz
+ URL_MD5 c2d93d305ecbc55939bc2a8ed4a76a3d
+ CONFIGURE_COMMAND
+ ${CMAKE_COMMAND} -E env ${PKG_CONFIG_PATH}
+ <SOURCE_DIR>/configure
+ --prefix=<INSTALL_DIR>
+ --srcdir=<SOURCE_DIR>
+ --with-included-unistring
+ --with-included-libtasn1
+ --without-p11-kit
+ # https://lists.gnupg.org/pipermail/gnutls-help/2016-February/004085.html
+ --disable-non-suiteb-curves
+ --disable-doc
+ ${autotools_ingredients_flags}
+ BUILD_COMMAND <DISABLE>
+ INSTALL_COMMAND ${make_command} install)
+
+cooking_ingredient (Protobuf
+ DEPENDS ingredient_zlib
+ URL https://github.com/google/protobuf/releases/download/v3.4.1/protobuf-cpp-3.4.1.tar.gz
+ URL_MD5 74446d310ce79cf20bab3ffd0e8f8f8f
+ CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=<INSTALL_DIR> --srcdir=<SOURCE_DIR>
+ BUILD_COMMAND <DISABLE>
+ INSTALL_COMMAND ${make_command} install)
+
+cooking_ingredient (hwloc
+ DEPENDS
+ ingredient_numactl
+ ingredient_libpciaccess
+ URL https://download.open-mpi.org/release/hwloc/v1.11/hwloc-1.11.5.tar.gz
+ URL_MD5 8f5fe6a9be2eb478409ad5e640b2d3ba
+ CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=<INSTALL_DIR> --srcdir=<SOURCE_DIR>
+ BUILD_COMMAND <DISABLE>
+ INSTALL_COMMAND ${make_command} install)
+
+cooking_ingredient (ragel
+ DEPENDS ingredient_colm
+ URL http://www.colm.net/files/ragel/ragel-7.0.0.11.tar.gz
+ URL_MD5 ad58c8f1ac5def94d9c7f4395a03606c
+ # This is upsetting.
+ BUILD_IN_SOURCE YES
+ CONFIGURE_COMMAND
+ ${CMAKE_COMMAND} -E env ${amended_PATH}
+ ./configure
+ --prefix=<INSTALL_DIR>
+ # This is even more upsetting.
+ ${autotools_ingredients_flags}
+ BUILD_COMMAND <DISABLE>
+ INSTALL_COMMAND ${make_command} install)
+
+cooking_ingredient (lksctp-tools
+ URL https://sourceforge.net/projects/lksctp/files/lksctp-tools/lksctp-tools-1.0.16.tar.gz
+ URL_MD5 708bb0b5a6806ad6e8d13c55b067518e
+ PATCH_COMMAND ./bootstrap
+ CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=<INSTALL_DIR> --srcdir=<SOURCE_DIR>
+ BUILD_COMMAND <DISABLE>
+ INSTALL_COMMAND ${make_command} install)
+
+cooking_ingredient (yaml-cpp
+ GIT_REPOSITORY https://github.com/jbeder/yaml-cpp.git
+ GIT_TAG b57efe94e7d445713c29f863adb8c23438eaa217
+ CMAKE_ARGS
+ -DYAML_CPP_BUILD_TESTS=OFF
+ -DBUILD_SHARED_LIBS=ON)
+
+##
+## Public dependencies.
+##
+
+cooking_ingredient (c-ares
+ GIT_REPOSITORY https://github.com/c-ares/c-ares.git
+ GIT_TAG fd6124c74da0801f23f9d324559d8b66fb83f533)
+
+cooking_ingredient (cryptopp
+ GIT_REPOSITORY https://github.com/weidai11/cryptopp.git
+ GIT_TAG c621ce053298fafc1e59191079c33acd76045c26
+ CMAKE_ARGS
+ -DCMAKE_INSTALL_LIBDIR=<INSTALL_DIR>/lib
+ -DBUILD_TESTING=OFF)
+
+set (dpdk_quadruple ${CMAKE_SYSTEM_PROCESSOR}-native-linuxapp-gcc)
+
+set (dpdk_args
+ EXTRA_CFLAGS=-Wno-error
+ O=<BINARY_DIR>
+ DESTDIR=<INSTALL_DIR>
+ T=${dpdk_quadruple})
+
+cooking_ingredient (dpdk
+ GIT_REPOSITORY https://github.com/scylladb/dpdk.git
+ GIT_TAG a1774652fbbb1fe7c0ff392d5e66de60a0154df6
+ CONFIGURE_COMMAND
+ COMMAND
+ ${CMAKE_COMMAND} -E chdir <SOURCE_DIR>
+ make ${dpdk_args} config
+ COMMAND
+ ${CMAKE_COMMAND}
+ -DSeastar_DPDK_CONFIG_FILE_IN=<BINARY_DIR>/.config
+ -DSeastar_DPDK_CONFIG_FILE_CHANGES=${CMAKE_CURRENT_LIST_DIR}/dpdk_config
+ -DSeastar_DPDK_CONFIG_FILE_OUT=<BINARY_DIR>/${dpdk_quadruple}/.config
+ -P ${CMAKE_CURRENT_LIST_DIR}/dpdk_configure.cmake
+ BUILD_COMMAND <DISABLE>
+ INSTALL_COMMAND
+ ${CMAKE_COMMAND} -E chdir <SOURCE_DIR>
+ ${make_command} ${dpdk_args} install)
+
+cooking_ingredient (fmt
+ GIT_REPOSITORY https://github.com/fmtlib/fmt.git
+ GIT_TAG 398343897f98b88ade80bbebdcbe82a36c65a980
+ CMAKE_ARGS
+ -DBUILD_SHARED_LIBS=ON
+ -DFMT_DOC=OFF
+ -DFMT_TEST=OFF)
+
+cooking_ingredient (lz4
+ GIT_REPOSITORY https://github.com/lz4/lz4.git
+ GIT_TAG b3692db46d2b23a7c0af2d5e69988c94f126e10a
+ # This is upsetting.
+ BUILD_IN_SOURCE ON
+ CONFIGURE_COMMAND <DISABLE>
+ BUILD_COMMAND <DISABLE>
+ INSTALL_COMMAND ${make_command} PREFIX=<INSTALL_DIR> install)
diff --git a/recipe/dpdk_config b/recipe/dpdk_config
new file mode 100644
index 00000000..f832a2f8
--- /dev/null
+++ b/recipe/dpdk_config
@@ -0,0 +1,23 @@
+CONFIG_RTE_LIBRTE_PMD_BOND=n
+CONFIG_RTE_MBUF_SCATTER_GATHER=n
+CONFIG_RTE_LIBRTE_IP_FRAG=n
+CONFIG_RTE_APP_TEST=n
+CONFIG_RTE_TEST_PMD=n
+CONFIG_RTE_MBUF_REFCNT_ATOMIC=n
+CONFIG_RTE_MAX_MEMSEG=8192
+CONFIG_RTE_EAL_IGB_UIO=n
+CONFIG_RTE_LIBRTE_KNI=n
+CONFIG_RTE_KNI_KMOD=n
+CONFIG_RTE_LIBRTE_JOBSTATS=n
+CONFIG_RTE_LIBRTE_LPM=n
+CONFIG_RTE_LIBRTE_ACL=n
+CONFIG_RTE_LIBRTE_POWER=n
+CONFIG_RTE_LIBRTE_IP_FRAG=n
+CONFIG_RTE_LIBRTE_METER=n
+CONFIG_RTE_LIBRTE_SCHED=n
+CONFIG_RTE_LIBRTE_DISTRIBUTOR=n
+CONFIG_RTE_LIBRTE_PMD_CRYPTO_SCHEDULER=n
+CONFIG_RTE_LIBRTE_REORDER=n
+CONFIG_RTE_LIBRTE_PORT=n
+CONFIG_RTE_LIBRTE_TABLE=n
+CONFIG_RTE_LIBRTE_PIPELINE=n
diff --git a/recipe/dpdk_configure.cmake b/recipe/dpdk_configure.cmake
new file mode 100644
index 00000000..f901df9d
--- /dev/null
+++ b/recipe/dpdk_configure.cmake
@@ -0,0 +1,40 @@
+#
+# This file is open source software, licensed to you under the terms
+# of the Apache License, Version 2.0 (the "License"). See the NOTICE file
+# distributed with this work for additional information regarding copyright
+# ownership. You may not use this file except in compliance with the License.
+#
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# Copyright (C) 2018 Scylladb, Ltd.
+#
+
+file (READ ${Seastar_DPDK_CONFIG_FILE_IN} dpdk_config)
+file (STRINGS ${Seastar_DPDK_CONFIG_FILE_CHANGES} dpdk_config_changes)
+set (word_pattern "[^\n\r \t]+")
+
+foreach (var ${dpdk_config_changes})
+ if (var MATCHES "(${word_pattern})=(${word_pattern})")
+ set (key ${CMAKE_MATCH_1})
+ set (value ${CMAKE_MATCH_2})
+
+ string (REGEX REPLACE
+ "${key}=${word_pattern}"
+ "${key}=${value}"
+ dpdk_config
+ ${dpdk_config})
+ endif ()
+endforeach ()
+
+file (WRITE ${Seastar_DPDK_CONFIG_FILE_OUT} ${dpdk_config})
diff --git a/src/net/dns.cc b/src/net/dns.cc
index faa5e713..4a4e520e 100644
--- a/src/net/dns.cc
+++ b/src/net/dns.cc
@@ -22,7 +22,7 @@
#include <chrono>
#include <experimental/string_view>

-#include <c-ares/ares.h>
+#include <ares.h>

#include <seastar/net/ip.hh>
#include <seastar/net/api.hh>
diff --git a/test.py b/test.py
deleted file mode 100755
index e1968251..00000000
--- a/test.py
+++ /dev/null
@@ -1,199 +0,0 @@
-#!/usr/bin/env python3
-#
-# This file is open source software, licensed to you under the terms
-# of the Apache License, Version 2.0 (the "License"). See the NOTICE file
-# distributed with this work for additional information regarding copyright
-# ownership. You may not use this file except in compliance with the License.
-#
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-import os
-import sys
-import argparse
-import subprocess
-import signal
-import re
-
-app_tests = [
- 'app/memcached/test/memcached_ascii_parser_test',
-]
-
-boost_tests = [
- 'unit/alloc_test',
- 'unit/futures_test',
- 'unit/thread_test',
- 'unit/sstring_test',
- 'unit/unwind_test',
- 'unit/defer_test',
- 'unit/output_stream_test',
- 'unit/httpd_test',
- 'unit/fstream_test',
- 'unit/foreign_ptr_test',
- 'unit/semaphore_test',
- 'unit/expiring_fifo_test',
- 'unit/shared_ptr_test',
- 'unit/weak_ptr_test',
- 'unit/file_io_test',
- 'unit/packet_test',
- 'unit/tls_test',
- 'unit/rpc_test',
- 'unit/connect_test',
- 'unit/json_formatter_test',
- 'unit/execution_stage_test',
- 'unit/lowres_clock_test',
- 'unit/program_options_test',
- 'unit/tuple_utils_test',
- 'unit/noncopyable_function_test',
- 'unit/abort_source_test',
-]
-
-other_tests = [
- 'unit/smp_test',
- 'unit/timer_test',
- 'unit/directory_test',
- 'unit/thread_context_switch_test',
- 'unit/fair_queue_test',
- 'unit/alien_test',
-]
-
-last_len = 0
-
-def print_status_short(msg):
- global last_len
- print('\r' + ' '*last_len, end='')
- last_len = len(msg)
- print('\r' + msg, end='')
-
-print_status_verbose = print
-
-class Alarm(Exception):
- pass
-def alarm_handler(signum, frame):
- raise Alarm
-
-def make_build_path(mode, *suffixes):
- return os.path.join('build', mode, *suffixes)
-
-if __name__ == "__main__":
- all_modes = ['debug', 'release']
-
- parser = argparse.ArgumentParser(description="Seastar test runner")
- parser.add_argument('--fast', action="store_true", help="Run only fast tests")
- parser.add_argument('--name', action="store", help="Run only test whose name contains given string")
- parser.add_argument('--mode', choices=all_modes, help="Run only tests for given build mode")
- parser.add_argument('--timeout', action="store",default="300",type=int, help="timeout value for test execution")
- parser.add_argument('--jenkins', action="store",help="jenkins output file prefix")
- parser.add_argument('--verbose', '-v', action = 'store_true', default = False,
- help = 'Verbose reporting')
- args = parser.parse_args()
- print_status = print_status_verbose if args.verbose else print_status_short
-
- # Run on 2 shard - it should be enough
- cpu_count = 2
-
- test_to_run = []
- modes_to_run = all_modes if not args.mode else [args.mode]
- for mode in modes_to_run:
- prefix = os.path.join('build', mode)
- for test in other_tests:
- test_to_run.append((os.path.join(prefix,'test',test),'other'))
- for test in boost_tests:
- test_to_run.append((os.path.join(prefix,'test',test),'boost'))
- for test in app_tests:
- test_to_run.append((os.path.join(prefix,test),'app'))
- memcached_path = make_build_path(mode, 'app', 'memcached', 'memcached')
- test_to_run.append(('app/memcached/test/test.py --memcached ' + memcached_path + (' --fast' if args.fast else ''),'other'))
- test_to_run.append((os.path.join(prefix, 'test', 'unit', 'distributed_test'),'other'))
-
-
- allocator_test_path = os.path.join(prefix, 'allocator_test')
- if args.fast:
- if mode == 'debug':
- test_to_run.append((allocator_test_path + ' --iterations 5','other'))
- else:
- test_to_run.append((allocator_test_path + ' --time 0.1','other'))
- else:
- test_to_run.append((allocator_test_path,'other'))
-
- if args.name:
- test_to_run = [t for t in test_to_run if args.name in t[0]]
-
-
- all_ok = True
-
- n_total = len(test_to_run)
- env = os.environ
- # disable false positive due to new (with_alignment(...)) ...
- env['ASAN_OPTIONS'] = 'alloc_dealloc_mismatch=0'
- for n, test in enumerate(test_to_run):
- path = test[0]
- prefix = '[%d/%d]' % (n + 1, n_total)
- print_status('%s RUNNING %s' % (prefix, path))
- signal.signal(signal.SIGALRM, alarm_handler)
- if args.jenkins and test[1] == 'boost':
- mode = 'release'
- if test[0].startswith(os.path.join('build','debug')):
- mode = 'debug'
- xmlout = args.jenkins+"."+mode+"."+os.path.basename(test[0])+".boost.xml"
- path = path + " --output_format=XML --log_level=all --report_level=no --log_sink=" + xmlout
- print(path)
- if os.path.isfile('tmp.out'):
- os.remove('tmp.out')
- outf=open('tmp.out','w')
-
- # Limit shards count
- if test[1] == 'boost':
- path = path + " -- --smp={}".format(cpu_count)
- else:
- if not re.search("app/memcached/test/test.py", path):
- if re.search("allocator_test", path) or re.search("fair_queue_test", path) or re.search("ascii_parser_test", path):
- path = path + " -- --smp={}".format(cpu_count)
- else:
- path = path + " --smp={}".format(cpu_count)
-
- proc = subprocess.Popen(path.split(' '), stdout=outf, stderr=subprocess.PIPE, env=env,preexec_fn=os.setsid)
- signal.alarm(args.timeout)
- err = None
- out = None
- try:
- out,err = proc.communicate()
- signal.alarm(0)
- except:
- os.killpg(os.getpgid(proc.pid), signal.SIGKILL)
- proc.kill()
- proc.returncode = -1
- finally:
- outf.close();
- if proc.returncode:
- print_status('FAILED: %s\n' % (path))
- if proc.returncode == -1:
- print_status('TIMED OUT\n')
- else:
- print_status(' with error code {code}\n'.format(code=proc.returncode))
- print('=== stdout START ===')
- with open('tmp.out') as outf:
- for line in outf:
- print(line)
- print('=== stdout END ===')
- if err:
- print('=== stderr START ===')
- print(err.decode())
- print('=== stderr END ===')
- all_ok = False
- else:
- print_status('%s PASSED %s' % (prefix, path))
-
- if all_ok:
- print('\nOK.')
- else:
- print_status('')
- sys.exit(1)
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
new file mode 100644
index 00000000..84fcfb82
--- /dev/null
+++ b/test/CMakeLists.txt
@@ -0,0 +1,47 @@
+#
+# This file is open source software, licensed to you under the terms
+# of the Apache License, Version 2.0 (the "License"). See the NOTICE file
+# distributed with this work for additional information regarding copyright
+# ownership. You may not use this file except in compliance with the License.
+#
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# Copyright (C) 2018 Scylladb, Ltd.
+#
+
+add_library (seastar_testing
+ exchanger.hh
+ test-utils.hh
+ test-utils.cc
+ test_runner.hh
+ test_runner.cc)
+
+target_include_directories (seastar_testing
+ PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
+
+target_link_libraries (seastar_testing
+ PUBLIC
+ Boost::unit_test_framework
+ seastar)
+
+# Distribution tests.
+if (Seastar_INSTALL)
+ add_subdirectory (dist)
+endif ()
+
+# Performance tests.
+add_subdirectory (perf)
+
+# Unit tests.
+add_subdirectory (unit)
diff --git a/test/dist/CMakeLists.txt b/test/dist/CMakeLists.txt
new file mode 100644
index 00000000..e8368741
--- /dev/null
+++ b/test/dist/CMakeLists.txt
@@ -0,0 +1,54 @@
+#
+# This file is open source software, licensed to you under the terms
+# of the Apache License, Version 2.0 (the "License"). See the NOTICE file
+# distributed with this work for additional information regarding copyright
+# ownership. You may not use this file except in compliance with the License.
+#
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# Copyright (C) 2018 Scylladb, Ltd.
+#
+
+add_custom_command (
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/consumer
+ DEPENDS
+ ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
+ ${CMAKE_CURRENT_SOURCE_DIR}/consumer/CMakeLists.txt
+ ${CMAKE_CURRENT_SOURCE_DIR}/consumer/Makefile
+ ${CMAKE_CURRENT_SOURCE_DIR}/consumer/cmake_consumer.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/consumer/pkgconfig_consumer.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/consumer/recipe/test_dist.cmake
+ COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/consumer ${CMAKE_CURRENT_BINARY_DIR}/consumer)
+
+configure_file (
+ ${Seastar_SOURCE_DIR}/cooking.sh
+ ${CMAKE_CURRENT_BINARY_DIR}/consumer/cooking.sh
+ COPYONLY)
+
+add_custom_target (test_dist_consumer_test_run
+ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/consumer
+ COMMAND
+ ${CMAKE_COMMAND} -E env
+ CONSUMER_SOURCE_DIR=${CMAKE_CURRENT_BINARY_DIR}/consumer
+ SEASTAR_SOURCE_DIR=${Seastar_SOURCE_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}/consumer_test.sh
+ USES_TERMINAL)
+
+add_test (
+ NAME Seastar.dist.consumer
+ COMMAND ${CMAKE_COMMAND} --build ${Seastar_BINARY_DIR} --target test_dist_consumer_test_run)
+
+add_custom_target (test_dist
+ COMMAND ctest --verbose -R Seastar.dist
+ USES_TERMINAL)
diff --git a/test/dist/consumer/CMakeLists.txt b/test/dist/consumer/CMakeLists.txt
new file mode 100644
index 00000000..0c47f676
--- /dev/null
+++ b/test/dist/consumer/CMakeLists.txt
@@ -0,0 +1,36 @@
+#
+# This file is open source software, licensed to you under the terms
+# of the Apache License, Version 2.0 (the "License"). See the NOTICE file
+# distributed with this work for additional information regarding copyright
+# ownership. You may not use this file except in compliance with the License.
+#
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# Copyright (C) 2018 Scylladb, Ltd.
+#
+
+cmake_minimum_required (VERSION 3.5)
+
+list (APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
+include (Cooking OPTIONAL)
+
+project (SeastarConsumer)
+
+find_package (Seastar 2.0.0 REQUIRED)
+
+add_executable (cmake_consumer
+ cmake_consumer.cc)
+
+target_link_libraries (cmake_consumer
+ PRIVATE Seastar::seastar)
diff --git a/test/dist/consumer/Makefile b/test/dist/consumer/Makefile
new file mode 100644
index 00000000..d9587e0f
--- /dev/null
+++ b/test/dist/consumer/Makefile
@@ -0,0 +1,35 @@
+#
+# This file is open source software, licensed to you under the terms
+# of the Apache License, Version 2.0 (the "License"). See the NOTICE file
+# distributed with this work for additional information regarding copyright
+# ownership. You may not use this file except in compliance with the License.
+#
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# Copyright (C) 2018 Scylladb, Ltd.
+#
+
+# Required environmental variables:
+#
+# BUILD_DIR
+
+source=pkgconfig_consumer.cc
+
+.PHONY: prepare
+
+pkgconfig_consumer: $(source) prepare
+ $(CXX) $< `pkg-config seastar --cflags --libs --static` -o $(BUILD_DIR)/$@
+
+prepare:
+ mkdir -p $(BUILD_DIR)
diff --git a/test/dist/consumer/cmake_consumer.cc b/test/dist/consumer/cmake_consumer.cc
new file mode 100644
index 00000000..ebdc060d
--- /dev/null
+++ b/test/dist/consumer/cmake_consumer.cc
@@ -0,0 +1,15 @@
+#include <iostream>
+
+#include <seastar/core/app-template.hh>
+#include <seastar/core/future.hh>
+
+namespace sr = seastar;
+
+int main(int argc, char** argv) {
+ sr::app_template app;
+
+ return app.run(argc, argv, [] {
+ std::cout << "\"Hello\" from the Seastar CMake consumer!\n";
+ return sr::make_ready_future<>();
+ });
+}
diff --git a/test/dist/consumer/pkgconfig_consumer.cc b/test/dist/consumer/pkgconfig_consumer.cc
new file mode 100644
index 00000000..a0cce755
--- /dev/null
+++ b/test/dist/consumer/pkgconfig_consumer.cc
@@ -0,0 +1,15 @@
+#include <iostream>
+
+#include <seastar/core/app-template.hh>
+#include <seastar/core/future.hh>
+
+namespace sr = seastar;
+
+int main(int argc, char** argv) {
+ sr::app_template app;
+
+ return app.run(argc, argv, [] {
+ std::cout << "\"Hello\" from the Seastar pkg-config consumer!\n";
+ return sr::make_ready_future<>();
+ });
+}
diff --git a/test/dist/consumer/recipe/test_dist.cmake b/test/dist/consumer/recipe/test_dist.cmake
new file mode 100644
index 00000000..63e27160
--- /dev/null
+++ b/test/dist/consumer/recipe/test_dist.cmake
@@ -0,0 +1,11 @@
+cooking_ingredient (Seastar
+ SOURCE_DIR $ENV{SEASTAR_SOURCE_DIR}
+ COOKING_RECIPE dev
+ CMAKE_ARGS
+ # Not `lib64`.
+ -DCMAKE_INSTALL_LIBDIR=lib
+ -DSeastar_APPS=OFF
+ -DSeastar_DOCS=OFF
+ -DSeastar_DEMOS=OFF
+ -DSeastar_DPDK=ON
+ -DSeastar_TESTING=OFF)
diff --git a/test/dist/consumer_test.sh b/test/dist/consumer_test.sh
new file mode 100755
index 00000000..5f412343
--- /dev/null
+++ b/test/dist/consumer_test.sh
@@ -0,0 +1,49 @@
+#
+# This file is open source software, licensed to you under the terms
+# of the Apache License, Version 2.0 (the "License"). See the NOTICE file
+# distributed with this work for additional information regarding copyright
+# ownership. You may not use this file except in compliance with the License.
+#
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# Copyright (C) 2018 Scylladb, Ltd.
+#
+
+# This test expects the following environmental variables to be defined:
+#
+# CONSUMER_SOURCE_DIR
+# SEASTAR_SOURCE_DIR
+#
+
+set -e
+
+cd "${CONSUMER_SOURCE_DIR}"
+./cooking.sh -r test_dist
+
+#
+# Consume from CMake.
+#
+
+cmake --build build
+build/cmake_consumer
+
+#
+# Consume from pkg-config.
+#
+
+ingredients_dir="build/_cooking/installed"
+library_path="${ingredients_dir}"/lib
+pkg_config_path="${library_path}"/pkgconfig
+make BUILD_DIR=build LD_LIBRARY_PATH="${library_path}" PKG_CONFIG_PATH="${pkg_config_path}"
+LD_LIBRARY_PATH="${library_path}" build/pkgconfig_consumer
diff --git a/test/perf/CMakeLists.txt b/test/perf/CMakeLists.txt
new file mode 100644
index 00000000..1cfabd12
--- /dev/null
+++ b/test/perf/CMakeLists.txt
@@ -0,0 +1,77 @@
+#
+# This file is open source software, licensed to you under the terms
+# of the Apache License, Version 2.0 (the "License"). See the NOTICE file
+# distributed with this work for additional information regarding copyright
+# ownership. You may not use this file except in compliance with the License.
+#
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# Copyright (C) 2018 Scylladb, Ltd.
+#
+
+add_library (seastar_perf_testing
+ perf_tests.hh
+ perf_tests.cc)
+
+target_link_libraries (seastar_perf_testing
+ PUBLIC
+ fmt::fmt
+ seastar)
+
+# Logical target for all perf tests.
+add_custom_target (perf_tests)
+
+macro (seastar_add_test name)
+ set (args ${ARGN})
+
+ cmake_parse_arguments (
+ parsed_args
+ "NO_SEASTAR_PERF_TESTING_LIBRARY"
+ ""
+ "SOURCES"
+ ${args})
+
+ set (target test_perf_${name})
+ add_executable (${target} ${parsed_args_SOURCES})
+
+ if (parsed_args_NO_SEASTAR_PERF_TESTING_LIBRARY)
+ set (libraries seastar)
+ else ()
+ set (libraries
+ seastar
+ seastar_perf_testing)
+ endif ()
+
+ target_link_libraries (${target}
+ PRIVATE ${libraries})
+
+ target_include_directories (${target}
+ PRIVATE
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${Seastar_SOURCE_DIR}/src)
+
+ set_target_properties (${target}
+ PROPERTIES
+ OUTPUT_NAME ${name})
+
+ add_dependencies (perf_tests ${target})
+ set (${name}_test ${target})
+endmacro ()
+
+seastar_add_test (fstream
+ SOURCES fstream_perf.cc
+ NO_SEASTAR_PERF_TESTING_LIBRARY)
+
+seastar_add_test (future_util
+ SOURCES future_util_perf.cc)
diff --git a/test/unit/CMakeLists.txt b/test/unit/CMakeLists.txt
new file mode 100644
index 00000000..0b53308c
--- /dev/null
+++ b/test/unit/CMakeLists.txt
@@ -0,0 +1,260 @@
+#
+# This file is open source software, licensed to you under the terms
+# of the Apache License, Version 2.0 (the "License"). See the NOTICE file
+# distributed with this work for additional information regarding copyright
+# ownership. You may not use this file except in compliance with the License.
+#
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# Copyright (C) 2018 Scylladb, Ltd.
+#
+
+# Logical target for all unit tests.
+add_custom_target (unit_tests)
+
+macro (seastar_add_test name)
+ set (args ${ARGN})
+
+ cmake_parse_arguments (parsed_args
+ "NO_SEASTAR_TESTING_LIBRARY"
+ ""
+ "RUN_ARGS;SOURCES"
+ ${args})
+
+ set (command_args "")
+ set (depends_args "")
+
+ if (parsed_args_SOURCES)
+ if (parsed_args_NO_SEASTAR_TESTING_LIBRARY)
+ set (libraries seastar)
+ set (run_args -c 2)
+ else ()
+ set (libraries
+ seastar
+ seastar_testing)
+
+ set (run_args -- -c 2)
+ endif ()
+
+ list (APPEND run_args ${parsed_args_RUN_ARGS})
+ set (executable_target test_unit_${name})
+ add_executable (${executable_target} ${parsed_args_SOURCES})
+
+ target_link_libraries (${executable_target}
+ PRIVATE ${libraries})
+
+ target_include_directories (${executable_target}
+ PRIVATE
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${Seastar_SOURCE_DIR}/src)
+
+ set_target_properties (${executable_target}
+ PROPERTIES
+ OUTPUT_NAME ${name})
+
+ add_dependencies (unit_tests ${executable_target})
+ list (APPEND depends_args DEPENDS ${executable_target})
+ list (APPEND command_args COMMAND ${executable_target} ${run_args})
+ endif ()
+
+ set (target test_unit_${name}_run)
+
+ add_custom_target (${target}
+ ${command_args}
+ ${parsed_args_UNPARSED_ARGUMENTS}
+ USES_TERMINAL)
+
+ add_test (
+ NAME Seastar.unit.${name}
+ COMMAND ${CMAKE_COMMAND} --build ${Seastar_BINARY_DIR} --target ${target})
+endmacro ()
+
+function (prepend_each var prefix)
+ set (result "")
+
+ foreach (x ${ARGN})
+ list (APPEND result ${prefix}/${x})
+ endforeach ()
+
+ set (${var} ${result} PARENT_SCOPE)
+endfunction ()
+
+add_custom_target (test_unit
+ COMMAND ctest --verbose -R Seastar.unit
+ USES_TERMINAL)
+
+seastar_add_test (abort_source
+ SOURCES abort_source_test.cc)
+
+seastar_add_test (alloc
+ SOURCES alloc_test.cc)
+
+seastar_add_test (allocator
+ SOURCES allocator_test.cc
+ NO_SEASTAR_TESTING_LIBRARY)
+
+seastar_add_test (alien
+ SOURCES alien_test.cc
+ NO_SEASTAR_TESTING_LIBRARY)
+
+seastar_add_test (checked_ptr
+ SOURCES checked_ptr_test.cc)
+
+seastar_add_test (chunked_fifo
+ SOURCES chunked_fifo_test.cc)
+
+seastar_add_test (circular_buffer
+ SOURCES circular_buffer_test.cc)
+
+seastar_add_test (circular_buffer_fixed_capacity
+ SOURCES circular_buffer_fixed_capacity_test.cc)
+
+seastar_add_test (connect
+ SOURCES connect_test.cc)
+
+seastar_add_test (defer
+ SOURCES defer_test.cc)
+
+seastar_add_test (directory
+ SOURCES directory_test.cc
+ NO_SEASTAR_TESTING_LIBRARY)
+
+seastar_add_test (distributed
+ SOURCES distributed_test.cc
+ NO_SEASTAR_TESTING_LIBRARY)
+
+seastar_add_test (dns
+ SOURCES dns_test.cc)
+
+seastar_add_test (execution_stage
+ SOURCES execution_stage_test.cc)
+
+seastar_add_test (expiring_fifo
+ SOURCES expiring_fifo_test.cc)
+
+seastar_add_test (fair_queue
+ SOURCES fair_queue_test.cc)
+
+seastar_add_test (file_io
+ SOURCES file_io_test.cc)
+
+seastar_add_test (foreign_ptr
+ SOURCES foreign_ptr_test.cc)
+
+seastar_add_test (fstream
+ SOURCES
+ fstream_test.cc
+ mock_file.hh)
+
+seastar_add_test (futures
+ SOURCES futures_test.cc)
+
+seastar_add_test (httpd
+ SOURCES
+ httpd_test.cc
+ loopback_socket.hh)
+
+seastar_add_test (json_formatter
+ SOURCES json_formatter_test.cc)
+
+seastar_add_test (lowres_clock
+ SOURCES lowres_clock_test.cc)
+
+seastar_add_test (net_config
+ SOURCES net_config_test.cc)
+
+seastar_add_test (noncopyable_function
+ SOURCES noncopyable_function_test.cc)
+
+seastar_add_test (output_stream
+ SOURCES output_stream_test.cc)
+
+seastar_add_test (packet
+ SOURCES packet_test.cc)
+
+seastar_add_test (program_options
+ SOURCES program_options_test.cc)
+
+seastar_add_test (queue
+ SOURCES queue_test.cc)
+
+seastar_add_test (rpc
+ SOURCES
+ loopback_socket.hh
+ rpc_test.cc)
+
+seastar_add_test (semaphore
+ SOURCES semaphore_test.cc)
+
+seastar_add_test (shared_ptr
+ SOURCES shared_ptr_test.cc)
+
+seastar_add_test (slab
+ SOURCES slab_test.cc
+ NO_SEASTAR_TESTING_LIBRARY)
+
+seastar_add_test (smp
+ SOURCES smp_test.cc
+ NO_SEASTAR_TESTING_LIBRARY)
+
+seastar_add_test (sstring
+ SOURCES sstring_test.cc)
+
+seastar_add_test (thread
+ SOURCES thread_test.cc)
+
+seastar_add_test (thread_context_switch
+ SOURCES thread_context_switch_test.cc
+ NO_SEASTAR_TESTING_LIBRARY)
+
+seastar_add_test (timer
+ SOURCES timer_test.cc
+ NO_SEASTAR_TESTING_LIBRARY)
+
+set (tls_certificate_files
+ catest.key
+ catest.pem
+ tls-ca-bundle.pem
+ test.crl
+ test.crt
+ test.csr
+ test.key)
+
+prepend_each (
+ in_tls_certificate_files
+ ${CMAKE_CURRENT_SOURCE_DIR}/
+ ${tls_certificate_files})
+
+prepend_each (
+ out_tls_certificate_files
+ ${CMAKE_CURRENT_BINARY_DIR}/
+ ${tls_certificate_files})
+
+add_custom_command (
+ DEPENDS ${in_tls_certificate_files}
+ OUTPUT ${out_tls_certificate_files}
+ COMMAND ${CMAKE_COMMAND} -E copy ${in_tls_certificate_files} ${CMAKE_CURRENT_BINARY_DIR})
+
+seastar_add_test (tls
+ DEPENDS ${out_tls_certificate_files}
+ SOURCES tls_test.cc)
+
+seastar_add_test (tuple_utils
+ SOURCES tuple_utils_test.cc)
+
+seastar_add_test (unwind
+ SOURCES unwind_test.cc)
+
+seastar_add_test (weak_ptr
+ SOURCES weak_ptr_test.cc)
diff --git a/test/unit/tls_test.cc b/test/unit/tls_test.cc
index 4fd765d8..294d39d7 100644
--- a/test/unit/tls_test.cc
+++ b/test/unit/tls_test.cc
@@ -84,7 +84,7 @@ static future<> connect_to_ssl_google(::shared_ptr<tls::certificate_credentials>

SEASTAR_TEST_CASE(test_simple_x509_client) {
auto certs = ::make_shared<tls::certificate_credentials>();
- return certs->set_x509_trust_file("test/unit/tls-ca-bundle.pem", tls::x509_crt_format::PEM).then([certs]() {
+ return certs->set_x509_trust_file("tls-ca-bundle.pem", tls::x509_crt_format::PEM).then([certs]() {
return connect_to_ssl_google(certs);
});
}
@@ -184,7 +184,7 @@ SEASTAR_TEST_CASE(test_non_tls) {

SEASTAR_TEST_CASE(test_abort_accept_before_handshake) {
auto certs = ::make_shared<tls::server_credentials>(::make_shared<tls::dh_params>());
- return certs->set_x509_key_file("test/unit/test.crt", "test/unit/test.key", tls::x509_crt_format::PEM).then([certs] {
+ return certs->set_x509_key_file("test.crt", "test.key", tls::x509_crt_format::PEM).then([certs] {
::listen_options opts;
opts.reuse_address = true;
auto addr = ::make_ipv4_address( {0x7f000001, 4712});
@@ -203,7 +203,7 @@ SEASTAR_TEST_CASE(test_abort_accept_before_handshake) {
SEASTAR_TEST_CASE(test_abort_accept_after_handshake) {
return async([] {
auto certs = ::make_shared<tls::server_credentials>(::make_shared<tls::dh_params>());
- certs->set_x509_key_file("test/unit/test.crt", "test/unit/test.key", tls::x509_crt_format::PEM).get();
+ certs->set_x509_key_file("test.crt", "test.key", tls::x509_crt_format::PEM).get();

::listen_options opts;
opts.reuse_address = true;
@@ -212,7 +212,7 @@ SEASTAR_TEST_CASE(test_abort_accept_after_handshake) {
auto sa = server.accept();

tls::credentials_builder b;
- b.set_x509_trust_file("test/unit/catest.pem", tls::x509_crt_format::PEM).get();
+ b.set_x509_trust_file("catest.pem", tls::x509_crt_format::PEM).get();

auto c = tls::connect(b.build_certificate_credentials(), addr).get0();
server.abort_accept(); // should not affect the socket we got.
@@ -241,7 +241,7 @@ SEASTAR_TEST_CASE(test_abort_accept_on_server_before_handshake) {
auto sa = server.accept();

tls::credentials_builder b;
- b.set_x509_trust_file("test/unit/catest.pem", tls::x509_crt_format::PEM).get();
+ b.set_x509_trust_file("catest.pem", tls::x509_crt_format::PEM).get();

auto creds = b.build_certificate_credentials();
auto f = tls::connect(creds, addr);
@@ -355,8 +355,8 @@ static future<> run_echo_test(sstring message,
int loops,
sstring trust,
sstring name,
- sstring crt = "test/unit/test.crt",
- sstring key = "test/unit/test.key",
+ sstring crt = "test.crt",
+ sstring key = "test.key",
tls::client_auth ca = tls::client_auth::NONE,
sstring client_crt = {},
sstring client_key = {},
@@ -440,17 +440,17 @@ SEASTAR_TEST_CASE(test_simple_x509_client_server) {
// will not validate
// Must match expected name with cert CA or give empty name to ignore
// server name
- return run_echo_test(message, 20, "test/unit/catest.pem", "test.scylladb.org");
+ return run_echo_test(message, 20, "catest.pem", "test.scylladb.org");
}


SEASTAR_TEST_CASE(test_simple_x509_client_server_again) {
- return run_echo_test(message, 20, "test/unit/catest.pem", "test.scylladb.org");
+ return run_echo_test(message, 20, "catest.pem", "test.scylladb.org");
}

SEASTAR_TEST_CASE(test_x509_client_server_cert_validation_fail) {
// Load a real trust authority here, which out certs are _not_ signed with.
- return run_echo_test(message, 1, "test/unit/tls-ca-bundle.pem", {}).then([] {
+ return run_echo_test(message, 1, "tls-ca-bundle.pem", {}).then([] {
BOOST_FAIL("Should have gotten validation error");
}).handle_exception([](auto ep) {
try {
@@ -465,7 +465,7 @@ SEASTAR_TEST_CASE(test_x509_client_server_cert_validation_fail) {

SEASTAR_TEST_CASE(test_x509_client_server_cert_validation_fail_name) {
// Use trust store with our signer, but wrong host name
- return run_echo_test(message, 1, "test/unit/tls-ca-bundle.pem", "nils.holgersson.gov").then([] {
+ return run_echo_test(message, 1, "tls-ca-bundle.pem", "nils.holgersson.gov").then([] {
BOOST_FAIL("Should have gotten validation error");
}).handle_exception([](auto ep) {
try {
@@ -487,7 +487,7 @@ SEASTAR_TEST_CASE(test_large_message_x509_client_server) {
for (size_t i = 0; i < msg.size(); ++i) {
msg[i] = '0' + char(i % 30);
}
- return run_echo_test(std::move(msg), 20, "test/unit/catest.pem", "test.scylladb.org");
+ return run_echo_test(std::move(msg), 20, "catest.pem", "test.scylladb.org");
}

SEASTAR_TEST_CASE(test_simple_x509_client_server_fail_client_auth) {
@@ -496,7 +496,7 @@ SEASTAR_TEST_CASE(test_simple_x509_client_server_fail_client_auth) {
// Must match expected name with cert CA or give empty name to ignore
// server name
// Server will require certificate auth. We supply none, so should fail connection
- return run_echo_test(message, 20, "test/unit/catest.pem", "test.scylladb.org", "test/unit/test.crt", "test/unit/test.key", tls::client_auth::REQUIRE).then([] {
+ return run_echo_test(message, 20, "catest.pem", "test.scylladb.org", "test.crt", "test.key", tls::client_auth::REQUIRE).then([] {
BOOST_FAIL("Expected exception");
}).handle_exception([](auto ep) {
// ok.
@@ -509,7 +509,7 @@ SEASTAR_TEST_CASE(test_simple_x509_client_server_client_auth) {
// Must match expected name with cert CA or give empty name to ignore
// server name
// Server will require certificate auth. We supply one, so should succeed with connection
- return run_echo_test(message, 20, "test/unit/catest.pem", "test.scylladb.org", "test/unit/test.crt", "test/unit/test.key", tls::client_auth::REQUIRE, "test/unit/test.crt", "test/unit/test.key");
+ return run_echo_test(message, 20, "catest.pem", "test.scylladb.org", "test.crt", "test.key", tls::client_auth::REQUIRE, "test.crt", "test.key");
}

SEASTAR_TEST_CASE(test_many_large_message_x509_client_server) {
@@ -526,7 +526,7 @@ SEASTAR_TEST_CASE(test_many_large_message_x509_client_server) {
// machine.
auto range = boost::irange(0, 20);
return do_for_each(range, [msg = std::move(msg)](auto) {
- return run_echo_test(std::move(msg), 1, "test/unit/catest.pem", "test.scylladb.org", "test/unit/test.crt", "test/unit/test.key", tls::client_auth::NONE, {}, {}, false);
+ return run_echo_test(std::move(msg), 1, "catest.pem", "test.scylladb.org", "test.crt", "test.key", tls::client_auth::NONE, {}, {}, false);
});
}

--
2.17.1

Kefu Chai

<tchaikov@gmail.com>
unread,
Aug 4, 2018, 12:53:02 PM8/4/18
to seastar-dev
+find_package_handle_standard_args (GnuTLS 
+  FOUND_VAR GnuTLS_FOUND 

might want to drop FOUND_VAR arg, because FOUND_VAR is obsolete now. see https://cmake.org/cmake/help/v3.5/module/FindPackageHandleStandardArgs.html
 
+  REQUIRED_VARS 
+    GnuTLS_INCLUDE_DIR 
+    GnuTLS_LIBRARY 
+  VERSION_VAR GnuTLS_VERSION) 


and in:


+# Try to compile without the library first. 
+try_compile (_dl_test_nil 
+  ${CMAKE_CURRENT_BINARY_DIR} 
+  SOURCES ${_dl_test_source}) 

+if (NOT _dl_test_nil) 
+  # The `dl` library is required. 

+  try_compile (_dl_test 
+    ${CMAKE_CURRENT_BINARY_DIR} 
+    SOURCES ${_dl_test_source} 
+    LINK_LIBRARIES dl) 

+  if (_dl_test) 
+    set (dl_LIBRARY_NAME dl) 

if ${_dl_test_source} compiles and run without this library, dl_LIBRARY_NAME is not defined.
 
+  endif () 
+endif () 

+if (_dl_test_nil OR dl_LIBRARY_NAME) 
+  set (dl_FOUND ON) 
+  set (dl_LIBRARIES -l${dl_LIBRARY_NAME}) 

${dl_LIBRARIES} will be "-l"

+endif () 

+include (FindPackageHandleStandardArgs) 

+find_package_handle_standard_args (dl 
+  FOUND_VAR dl_FOUND 
+  REQUIRED_VARS dl_LIBRARY_NAME) 

and dl_FOUND will be reset. so `find_package (dl REQUIRED) ` will fail in this case. i don't think this is intended in this module.

that's what i had when testing with 

cmake -DCMAKE_EXE_LINKER_FLAGS="-fsanitize=address"  -DCMAKE_CXX_FLAGS="-fsanitize=address" -DCMAKE_CXX_COMPILER=clang++-7 ..

+if (Sanitizers_FIBER_SUPPORT) 
+  target_compile_definitions (seastar 
+    PRIVATE SEASTAR_HAVE_ASAN_FIBER_ 
SUPPORT) 
+endif () 

 SEASTAR_HAVE_ASAN_FIBER_SUPPORT is defined nowhere, might want use Sanitizers_FIBER_SUPPORT instead?

Avi Kivity

<avi@scylladb.com>
unread,
Aug 5, 2018, 2:13:15 AM8/5/18
to Jesse Haber-Kucharsky, seastar-dev@googlegroups.com


On 2018-08-04 01:15, Jesse Haber-Kucharsky wrote:
> We are older and wiser now. Better to start with a clean slate.
>
>

Was all that work really flushed down the drain?

This is contrary to our development methodology of incrementally
improving things.

Avi Kivity

<avi@scylladb.com>
unread,
Aug 5, 2018, 2:21:26 AM8/5/18
to Jesse Haber-Kucharsky, seastar-dev@googlegroups.com


On 2018-08-04 01:15, Jesse Haber-Kucharsky wrote:
> We will follow a standard MAJOR.MINOR.PATCH scheme, where the major
> version is incremented when a change is backwards-incompatible.
>
> The reason for incrementing the version now is so that if a development
> version of Seastar is installed in a system, then it will have a higher
> version number than a released version of Seastar.
>
> Once a release is actually made, the major version increment can be
> changed to a minor one (depending on the scope of changes since the last
> release).

We actually did release once, using the yyyy.mm release numbering scheme.

Avi Kivity

<avi@scylladb.com>
unread,
Aug 5, 2018, 2:31:08 AM8/5/18
to Jesse Haber-Kucharsky, seastar-dev@googlegroups.com


On 2018-08-04 01:15, Jesse Haber-Kucharsky wrote:
> diff --git a/apps/httpd/main.cc b/apps/httpd/main.cc
> index 8c76cfaf..39f5ab28 100644
> --- a/apps/httpd/main.cc
> +++ b/apps/httpd/main.cc
> @@ -19,12 +19,12 @@
> * Copyright 2015 Cloudius Systems
> */
>
> -#include "http/httpd.hh"
> -#include "http/handlers.hh"
> -#include "http/function_handlers.hh"
> -#include "http/file_handler.hh"
> -#include "apps/httpd/demo.json.hh"
> -#include "http/api_docs.hh"
> +#include <seastar/http/httpd.hh>
> +#include <seastar/http/handlers.hh>
> +#include <seastar/http/function_handlers.hh>
> +#include <seastar/http/file_handler.hh>
> +#include <seastar/apps/httpd/demo.json.hh>
> +#include <seastar/http/api_docs.hh>
>

Why are we using <> style internally? That's supposed to be for
"standard" libraries, and Seastar isn't a standard library when it's built.

> diff --git a/http/http_response_parser.rl b/gen/http/http_response_parser.rl
> similarity index 98%
> rename from http/http_response_parser.rl
> rename to gen/http/http_response_parser.rl
> index 3b109fd0..9bc4af20 100644
> --- a/http/http_response_parser.rl
> +++ b/gen/http/http_response_parser.rl
> @@ -19,7 +19,7 @@
> * Copyright (C) 2015 Cloudius Systems, Ltd.
> */
>
> -#include "core/ragel.hh"
> +#include <seastar/core/ragel.hh>

> --- a/core/abort_source.hh
> +++ b/include/seastar/core/abort_source.hh
> @@ -21,8 +21,8 @@
>
> #pragma once
>
> -#include "util/noncopyable_function.hh"
> -#include "util/optimized_optional.hh"
> +#include <seastar/util/noncopyable_function.hh>
> +#include <seastar/util/optimized_optional.hh>

Here however we can, and I think "../util/noncopyable_function.hh" is
better since it's not dependent on the environment (for example, a
Seastar installed to /usr/include/seastar).


In fact we should find a way to avoid <seastar/...> in uninstalled
generated code too.

>

Avi Kivity

<avi@scylladb.com>
unread,
Aug 5, 2018, 2:31:39 AM8/5/18
to Jesse Haber-Kucharsky, seastar-dev@googlegroups.com


On 2018-08-04 01:15, Jesse Haber-Kucharsky wrote:
Are they rendered correctly without text changes?

Avi Kivity

<avi@scylladb.com>
unread,
Aug 5, 2018, 2:34:40 AM8/5/18
to Jesse Haber-Kucharsky, seastar-dev@googlegroups.com


On 2018-08-04 01:15, Jesse Haber-Kucharsky wrote:
> The previous naming scheme used an inconsistent mix of plural and
> singular names.
>
> Singular names are more conventional in C and C++.
>

That's gratuitous breakage. Maybe it's unconventional, but is the
convention worth breaking everything that depends on the file locations?

This is just noise.

On a practical note, if you mix cosmetic changes like this with real
changes like changing the build system, you'd just causing pain for
yourself. Leave the cosmetic changes for stand-alone patches.

Botond Dénes

<bdenes@scylladb.com>
unread,
Aug 6, 2018, 4:57:20 AM8/6/18
to Jesse Haber-Kucharsky, seastar-dev@googlegroups.com
On 2018-08-04 01:15, Jesse Haber-Kucharsky wrote:
I don't understand this. How can you only check the dependencies when
installing, they are needed for building in the first place.
I think it would be better if this was organized as a set of incremental
patches to the previous CMakeLists.txt. Are the changes so drastic that
it warrants a dump and complete rewrite? It's hard to see what exactly
had to be adapted to the new dependency management.
Shouldn't this be 3.5.2, the version you claim have tested this with?
Is this to prevent these targets being generated when being a
subproject? A comment should be in order to explain.

> +
> +#
> +# Useful (non-cache) variables.
> +#
> +
> +set (Seastar_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
> +set (Seastar_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})


Why use these aliases instead of the well known CMake names?
This is *so* much cleaner than what we had before. Awesome!
Do they all export targets? I guess I'll see it further down.

> +
> +#
> +# Code generation helpers.
> +#
> +
> +function (seastar_generate_protobuf target var in_file out_dir)


Nitpick: the CMake convention is to have an all-caps variable name
helpers as part of the signature, when there are more than 2-3
parameters. See the `add_custom_command()` call below.
There is a helper script for extracting the parameters from the
`${ARGS}`, see:
https://github.com/denesb/scylla/blob/bea1157ee8ca7ffcc9ed022369e7bc1d375113da/CMakeLists.txt#L978
Nice!
Why include this here? Isn't this part of a standard CMake installation?
Ditto.

Botond Dénes

<bdenes@scylladb.com>
unread,
Aug 6, 2018, 4:59:29 AM8/6/18
to Jesse Haber-Kucharsky, seastar-dev@googlegroups.com
On 2018-08-04 01:14, Jesse Haber-Kucharsky wrote:
> This change is a modernization of Seastar's build system to maximize its
> ability to integrate easily into applications and into the C++
> ecosystem.
>
> These changes reflect the C++'s community's evolving and solidifying
> understanding of how to work with CMake and structure libraries and also
> my own evolving experience and understanding in the same.
>
> With this structure and integration support, Seastar and Seastar-based
> applications will be easier to package, deploy, and develop, and in a
> variety of environments.
>
> There are many internal changes, but none of these changes should impact
> existing consumers of Seastar.
>
> I have carefully structured this series so that each patch is incremental
> and compile-able. This is to help with review and auditing. However,
> to review this series the best first step is to start at the
> "finished product" and evaluate and experiment with the new build.
>
> Fixes #67.
> Fixes #264.
> Fixes #313.
>
> Also available at https://github.com/hakuch/seastar.git on the jhk/better_cmake/v2 branch.
>
> Changes since v1:
>
> - Split changes into an auditable series
> - Rebased against documentation-generation changes


I think the directory reorganization could go in a separate patch-series
to fast-track it. Of course this would require due updating of the
experimental CMake-file which I guess you wanted to avoid, hence the
dropping of it as the first patch. But as Avi noted, this goes against
our philosophy of incremental changes.

Jesse Haber-Kucharsky

<jhaberku@scylladb.com>
unread,
Aug 7, 2018, 7:40:51 AM8/7/18
to Avi Kivity, seastar-dev
On Sun, Aug 5, 2018 at 2:13 AM, Avi Kivity <a...@scylladb.com> wrote:


On 2018-08-04 01:15, Jesse Haber-Kucharsky wrote:
We are older and wiser now. Better to start with a clean slate.



Was all that work really flushed down the drain?

Absolutely not!

It was only through trying to do things the wrong way that it is clear what the right way is.

There are many, many changes between the old experimental system and the new one, but also changes that reflect important changes outside the build-system itself, like the private/public split.
 

This is contrary to our development methodology of incrementally improving things.

It would probably be possible to morph the old CMake system into the new one in many incremental steps. However, doing so would entail modifying two build systems (the Python scripts and CMake) each step so that they both compile. That would be lots of intermediate work that would go away at the end.

My own evaluation is that ripping off the bandage quickly (at least with respect to CMake files) and benefiting from all the learning since the last version is more clear, easier to review, and much faster.

That being said, if you feel that doing a wholesale replacement is totally not viable then I'm open to suggestions on how to split things into more incremental steps on the CMake side.

Jesse Haber-Kucharsky

<jhaberku@scylladb.com>
unread,
Aug 7, 2018, 7:43:37 AM8/7/18
to Avi Kivity, seastar-dev
On Sun, Aug 5, 2018 at 2:34 AM, Avi Kivity <a...@scylladb.com> wrote:


On 2018-08-04 01:15, Jesse Haber-Kucharsky wrote:
The previous naming scheme used an inconsistent mix of plural and
singular names.

Singular names are more conventional in C and C++.


That's gratuitous breakage. Maybe it's unconventional, but is the convention worth breaking everything that depends on the file locations?

This is just noise.

On a practical note, if you mix cosmetic changes like this with real changes like changing the build system, you'd just causing pain for yourself. Leave the cosmetic changes for stand-alone patches.

It's a fair assessment.

I'll rebase without the directory renamings. I'm glad to hear that you're open to cosmetic improvements, albeit at more appropriate times.

Jesse Haber-Kucharsky

<jhaberku@scylladb.com>
unread,
Aug 7, 2018, 7:49:22 AM8/7/18
to Botond Dénes, seastar-dev
Exactly.
 
But as Avi noted, this goes against our philosophy of incremental changes.

I don't agree.

The CMake support was marked experimental precisely because it was in the tree to fast-track learning about what works and what doesn't.

In the time that the support was initially added, I've learned a great deal about how to structure CMake builds effectively, and also about all the things we did ineffectively.

In order to modify the experimental CMake support to accommodate the other changes in this series, it would require doubling-down on all those mistakes and extra work, all for a system that is changing dramatically in later patches.

Likewise, the new CMake support is so clean precisely because of the structural changes in this series. Without those changes, we again have a great deal of additional work and for very little benefit.

Jesse Haber-Kucharsky

<jhaberku@scylladb.com>
unread,
Aug 7, 2018, 7:50:54 AM8/7/18
to Avi Kivity, seastar-dev
I elaborated a little bit about why I'm reluctant to keep modifying the experimental support in a reply to Botond in the "cover letter" thread.

Avi Kivity

<avi@scylladb.com>
unread,
Aug 7, 2018, 8:14:16 AM8/7/18
to Jesse Haber-Kucharsky, seastar-dev
I'm not proposing that we redo the work just to preserve the appearance of the traditional work flow, given that it was experimental.

Jesse Haber-Kucharsky

<jhaberku@scylladb.com>
unread,
Aug 7, 2018, 1:20:52 PM8/7/18
to Avi Kivity, seastar-dev
Good question.

Rather than answer it, I think I'll drop this patch along with the directory renaming one (plural/singular).

Jesse Haber-Kucharsky

<jhaberku@scylladb.com>
unread,
Aug 7, 2018, 1:27:44 PM8/7/18
to Avi Kivity, seastar-dev
On Sun, Aug 5, 2018 at 2:21 AM, Avi Kivity <a...@scylladb.com> wrote:


On 2018-08-04 01:15, Jesse Haber-Kucharsky wrote:
We will follow a standard MAJOR.MINOR.PATCH scheme, where the major
version is incremented when a change is backwards-incompatible.

The reason for incrementing the version now is so that if a development
version of Seastar is installed in a system, then it will have a higher
version number than a released version of Seastar.

Once a release is actually made, the major version increment can be
changed to a minor one (depending on the scope of changes since the last
release).

We actually did release once, using the yyyy.mm release numbering scheme.

I've noticed.

As far as I can see, the time-based version number scheme is primarily useful because a release made chronologically later is always always greater ordinally than one made earlier and because it's a convenient identifier for a particular snapshot (and easier to remember than a Git hash).

However, one useful property of a scheme like MAJOR.MINOR.PATCH is that it communicates -- to an imperfect but nonetheless often useful extent -- the compatibility of a release with respect to previous ones. Like a data time-stamp, it's also easy to remember and has the same benefits in that respect. For this reason, I think it's useful to maintain this scheme for external consumption of the library.

If a time-based tag would be useful for identifying the time period in which a release is made, one solution could be to use Git tags of the form `dYYYY.MM` (where `YYYY` and `MM` would be substituted with their respective values) when a release is made in addition to any tags for the version triple.

For what reason(s) do you like the chronological version scheme (if I have missed any)?

Jesse Haber-Kucharsky

<jhaberku@scylladb.com>
unread,
Aug 7, 2018, 1:46:15 PM8/7/18
to Botond Dénes, seastar-dev
The dependencies are checked during configure time, normally.

In `test_dist`, we simulate what it's like for a consumer of Seastar to use the files installed as part of the `install` target to link against the library and compile an application. Executing the `install` target installs the `libseastar.a` file, the public header files, the `seastar.pc` pkg-config file, and all the CMake files. The CMake files describe the properties of the `Seastar::seastar` imported target and also include all the scripts locating dependencies on an arbitrary system. The `test_dist` creates a development environment for all dependencies because it will always work on any platform (that's the beauty of `cmake-cooking`) and because the installed CMake and `pkg-config` files cannot know the location of dependencies on the machine in which Seastar was built: the target being installed to could be totally different!
The changes are drastic, yes. All of the helper functions for code generation and test-management have been significantly improved, the pkg-config support has changed, and the files are in different places.

This is in addition to all the removed CMake stuff for compiling dependencies (including DPDK).

It would be possible to make iterated changes, but likely a lot of work and for limited benefit, because of the other structural changes in this series (as I've mentioned).

If this change is really distasteful to you and others, I can attempt to map out a path from the old to the new CMake sutff, but it may take a while.
If I'm not mistaken, writing a version string missing a component (in this case, the patch version), means that all versions are accepted. i.e., any version 3.5.X is accepted. I believe this is what we want. Why do you think it's important to specify the patch version?
That's exactly right. I can add a comment.
 

+
+#
+# Useful (non-cache) variables.
+#
+
+set (Seastar_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
+set (Seastar_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})


Why use these aliases instead of the well known CMake names?

There are some variables like `CMAKE_SOURCE_DIR` and others (see [1]).

The reason I defined these variables is that in a sub-directory of the project (like `test/unit`), it's easy to clearly refer to the Seastar-specific top-level directory. I was also thinking about cases where Seastar is embedded via `add_subdirectory`: in those cases, I have not tested the behavior of the CMake-provided variable names and, again, I thought having the Seastar-specific variables would be useful. There are used a couple of different places in the various `CMakeLists.txt` and tests.
Thank you! I think so too, I appreciate the positive feed-back.
 
Do they all export targets? I guess I'll see it further down.

Some do, but the various `Find*.cmake` files defined imported targets if they do not.
 

+
+#
+# Code generation helpers.
+#
+
+function (seastar_generate_protobuf target var in_file out_dir)


Nitpick: the CMake convention is to have an all-caps variable name helpers as part of the signature, when there are more than 2-3 parameters. See the `add_custom_command()` call below.
There is a helper script for extracting the parameters from the `${ARGS}`, see:
https://github.com/denesb/scylla/blob/bea1157ee8ca7ffcc9ed022369e7bc1d375113da/CMakeLists.txt#L978


I've defined other functions with `cmake_parse_arguments` in this series, but I thought in this case that the usage was clear enough.

Do you think that these functions would be more clear with named arguments?
:-D
We have gotten a request to support CMake 3.5.2. The implementation of `FindBoost.cmake` provided by CMake and installed by distributions like Fedora enforces a strong coupling between CMake version and the supported version of Boost. The imported targets that we want to use are not supported for the version of Boost that we want in CMake 3.5.2. Therefore, my quick solution was to bundle a later version (from 3.11) and include the license text as directed by the header (in the `license` directory).

Botond Dénes

<bdenes@scylladb.com>
unread,
Aug 8, 2018, 1:08:39 AM8/8/18
to Jesse Haber-Kucharsky, seastar-dev
I see.

>
> As part of this build system, we also generate a pkg-config
> specification which is installed alongside the CMake files
> necessary for
> consumers to use Seastar.
>
> This new build system also includes the new `test_dist` target. This
> test verifies that clients can build applications against
> Seastar with
> the files that the build-system installs. The test uses
> `cooking.sh` to
> manage all dependencies and checks both "native" CMake support
> and also
> compilation with pkg-config.
>
> Signed-off-by: Jesse Haber-Kucharsky <jhab...@scylladb.com
> <mailto:jhab...@scylladb.com>>
>   cmake/SeastarConfig.cmake.in <http://SeastarConfig.cmake.in>
> <http://SeastarConfig.cmake.in>
No need, we can make an exception as the previous CMake support was
experimental.
No particular reason, I just though maybe we unknowingly depend on some
feature that is in 3.5.2 but not in 3.5.1 for example.
Right, didn't think of that.
In my opinion CMake functions with more than 2-3 arguments start to
become not very obvious on the call sites, hence the suggestion to use
`cmake_parse_arguments`.
> <http://SeastarConfig.cmake.in>
> <http://en.wikipedia.org/wiki/Futures_and_promises>).

Jesse Haber-Kucharsky

<jhaberku@scylladb.com>
unread,
Aug 10, 2018, 4:49:58 PM8/10/18
to Avi Kivity, seastar-dev@googlegroups.com
I will describe my thought process in-depth.

The GCC documentation for `#include` [1] says:

#include <file>

This variant is used for system header files. It searches for a file named file in a standard list of system directories. You can prepend directories to this list with the -I option (see Invocation).

#include "file"

This variant is used for header files of your own program. It searches for a file named file first in the directory containing the current file, then in the quote directories and then the same directories used for <file>. You can prepend directories to the list of quote directories with the -iquote option.

Note that the ""-syntax is mostly the same as the <> one functionally, except that it *also* searches the local directory of the file and the list of files modified with `-iquote`, and then falling back to `-I`.

The documentation describes "systen directories" (as you've said as well), but note that these are modified with `-I`. Most Makefiles and build systems invoke GCC with `-I` in practise. As an example, consider almost all pkg-config specifications for libraries or the Ninja specifications generated by CMake.

Therefore, I believe that in practise the distinction of "system directories" and other directories is not a meaningful one, with the possible exception of platform libraries like POSIX and Linux ones.

If that distinction does not exist, we still don't have good guidelines for preferring "" over <>. Eager to fix this, I looked for some examples of libraries from experts in the C++ community.

Here are some:

- Range v3 from Eric Niebler: https://github.com/ericniebler/range-v3
- Boost Hana, originally from Louis Dionne: https://github.com/boostorg/hana
- Guideline Support Library (GSL), from the people behind the C++ Core Guidelines: https://github.com/Microsoft/GSL

All of these projects use the <> form in their public header files for referencing other header files in the same project.

One justification of this decision is as follows: once the public header files of a library are installed, they become "system directories" from the point of view of consumers of the library.

These projects don't tend to have lots of non-header files, so I did some thinking and concluded the following:

The distinction between public and private definitions in C++ is very important, because the model for exporting symbols by pasting in text files means that it's easy to increase the already-long compile times without realizing it. Therefore, we should maximize our ability to be clear about how header files are propogated in the project and the interdependencies that exist.

I will repeat the rules that I devised in the message for this change:

Consider this project:

├── include
│   └── seastar
│   └── core
│   └── future.hh
└── src
└── core
├── future.cc
└── future_impl.hh

- All public headers of the project are included relative to the root project directory, and with <>-delimiters.

Example:

#include <seastar/core/future.hh>

- All internal headers of the project are included relative to the root of the base source directory, and with ""-delimiters.

Example:

#include "core/future_impl.hh"

This means that no public header files will ever include headers with "" because that would imply that a public file depends on a private one.

Furthermore, source files and private header files (ones in the `src` tree) can contain both "" and <> header files, because they can depend on both private and public interfaces.

Now consider how the compiler is invoked, with `-Iinclude`. If we break first rule by -- for example, having `#include "core/future_impl.hh"` in `seastar/core/future.hh` -- then the compilation will fail because `core` is not in the current directory of `include/core`.

Now consider the argument for eliminating ambiguity.

Suppose the following structure exists:

├── include
│   └── seastar
│   ├── http
│   │   ├── common.hh
│   │   └── response.hh
│   └── net
│   ├── common.hh
│   └── tcp.hh
└── src
├── config.hh
├── http
│   └── response.cc
└── net
├── config.hh
├── internal_detail.hh
└── tcp.cc

In `seastar/http/response.hh` we could have:

#include <seastar/http/common.hh>
#include <seastar/net/common.hh>

In `src/http/response.cc` we could have:

#include <seastar/http/response.hh>
#include "net/internal_detail.hh"

Suppose `net/tcp.cc` depends on the file in the same directory `config.hh` and we set `-Isrc` because we want to avoid relative paths (`.` and `..`) in `#include` directives (to avoid having to change the directives if the file moves). Then, with this proposed scheme, `#include "config.hh"` inside `src/net/tcp.hh` would clearly (for humans) refer to `src/config.hh` and we could refer to the neighbor file as `#include "net/config.hh"`.

>
> > diff --git a/http/http_response_parser.rl b/gen/http/http_response_parser.rl
> > similarity index 98%
> > rename from http/http_response_parser.rl
> > rename to gen/http/http_response_parser.rl
> > index 3b109fd0..9bc4af20 100644
> > --- a/http/http_response_parser.rl
> > +++ b/gen/http/http_response_parser.rl
> > @@ -19,7 +19,7 @@
> > * Copyright (C) 2015 Cloudius Systems, Ltd.
> > */
> > -#include "core/ragel.hh"
> > +#include <seastar/core/ragel.hh>
>
> > --- a/core/abort_source.hh
> > +++ b/include/seastar/core/abort_source.hh
> > @@ -21,8 +21,8 @@
> > #pragma once
> > -#include "util/noncopyable_function.hh"
> > -#include "util/optimized_optional.hh"
> > +#include <seastar/util/noncopyable_function.hh>
> > +#include <seastar/util/optimized_optional.hh>
>
> Here however we can, and I think "../util/noncopyable_function.hh" is better
> since it's not dependent on the environment (for example, a Seastar
> installed to /usr/include/seastar).

The absolute paths do not depend on the environment, because all build systems specify `-I` to the compiler in their own way.

>
>
> In fact we should find a way to avoid <seastar/...> in uninstalled generated
> code too.
>
>

Relative paths (containing `..`) with ""-delimiters for including headers in `src` (but not public headers, to emphasize that they're public) could work as well, but I have two observations:

- Moving a file to a different location means adjusting many `#include` lines in one file, instead of one `#include` line per file that depends on it. I think this would be more lines changed.
- I find absolute paths relative to `src` is more clear than trying to reconstruct the relative path in my head. Also, what if there are many levels of nesting?

[1] https://gcc.gnu.org/onlinedocs/cpp/Include-Syntax.html#Include-Syntax
Reply all
Reply to author
Forward
0 new messages