2 # This file is open source software, licensed to you under the terms
3 # of the Apache License, Version 2.0 (the "License"). See the NOTICE file
4 # distributed with this work for additional information regarding copyright
5 # ownership. You may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing,
12 # software distributed under the License is distributed on an
13 # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 # KIND, either express or implied. See the License for the
15 # specific language governing permissions and limitations
20 # Copyright (C) 2018 Scylladb, Ltd.
23 add_library (seastar_perf_testing
27 target_link_libraries (seastar_perf_testing
32 # Logical target for all perf tests.
33 add_custom_target (perf_tests)
35 macro (seastar_add_test name)
38 cmake_parse_arguments (
40 "NO_SEASTAR_PERF_TESTING_LIBRARY"
45 set (target test_perf_${name})
46 add_executable (${target} ${parsed_args_SOURCES})
48 if (parsed_args_NO_SEASTAR_PERF_TESTING_LIBRARY)
49 set (libraries seastar_with_flags)
56 target_link_libraries (${target}
59 target_include_directories (${target}
61 ${CMAKE_CURRENT_SOURCE_DIR}
62 ${Seastar_SOURCE_DIR}/src)
64 set_target_properties (${target}
68 add_dependencies (perf_tests ${target})
69 set (${name}_test ${target})
72 seastar_add_test (fstream
73 SOURCES fstream_perf.cc
74 NO_SEASTAR_PERF_TESTING_LIBRARY)
76 seastar_add_test (future_util
77 SOURCES future_util_perf.cc)