]> git.proxmox.com Git - ceph.git/blob - ceph/src/seastar/tests/perf/CMakeLists.txt
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / seastar / tests / perf / CMakeLists.txt
1 #
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.
6 #
7 # You may obtain a copy of the License at
8 #
9 # http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing,
12 # software distributed under the License is distributed on an
13 # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 # KIND, either express or implied. See the License for the
15 # specific language governing permissions and limitations
16 # under the License.
17 #
18
19 #
20 # Copyright (C) 2018 Scylladb, Ltd.
21 #
22
23 add_library (seastar_perf_testing
24 perf_tests.hh
25 perf_tests.cc)
26
27 target_link_libraries (seastar_perf_testing
28 PUBLIC
29 fmt::fmt
30 seastar_with_flags)
31
32 # Logical target for all perf tests.
33 add_custom_target (perf_tests)
34
35 macro (seastar_add_test name)
36 set (args ${ARGN})
37
38 cmake_parse_arguments (
39 parsed_args
40 "NO_SEASTAR_PERF_TESTING_LIBRARY"
41 ""
42 "SOURCES"
43 ${args})
44
45 set (target test_perf_${name})
46 add_executable (${target} ${parsed_args_SOURCES})
47
48 if (parsed_args_NO_SEASTAR_PERF_TESTING_LIBRARY)
49 set (libraries seastar_with_flags)
50 else ()
51 set (libraries
52 seastar_with_flags
53 seastar_perf_testing)
54 endif ()
55
56 target_link_libraries (${target}
57 PRIVATE ${libraries})
58
59 target_include_directories (${target}
60 PRIVATE
61 ${CMAKE_CURRENT_SOURCE_DIR}
62 ${Seastar_SOURCE_DIR}/src)
63
64 set_target_properties (${target}
65 PROPERTIES
66 OUTPUT_NAME ${name})
67
68 add_dependencies (perf_tests ${target})
69 set (${name}_test ${target})
70 endmacro ()
71
72 seastar_add_test (fstream
73 SOURCES fstream_perf.cc
74 NO_SEASTAR_PERF_TESTING_LIBRARY)
75
76 seastar_add_test (future_util
77 SOURCES future_util_perf.cc)