xref: /aosp_15_r20/external/swiftshader/tests/ReactorBenchmarks/CMakeLists.txt (revision 03ce13f70fcc45d86ee91b7ee4cab1936a95046e)
1# Copyright 2020 The SwiftShader Authors. All Rights Reserved.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#    http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15set(ROOT_PROJECT_COMPILE_OPTIONS
16    ${SWIFTSHADER_COMPILE_OPTIONS}
17)
18
19set(ROOT_PROJECT_LINK_LIBRARIES
20    ${OS_LIBS}
21    ${SWIFTSHADER_LIBS}
22)
23
24set(REACTOR_BENCHMARKS_SRC_FILES
25    ReactorBenchmarks.cpp
26)
27
28add_executable(ReactorBenchmarks
29    ${REACTOR_BENCHMARKS_SRC_FILES}
30)
31
32set_target_properties(ReactorBenchmarks PROPERTIES
33    FOLDER "Tests/Benchmarks"
34    RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}"
35)
36
37target_compile_options(ReactorBenchmarks
38    PRIVATE
39        ${ROOT_PROJECT_COMPILE_OPTIONS}
40)
41
42target_link_options(ReactorBenchmarks
43    PRIVATE
44        ${SWIFTSHADER_LINK_FLAGS}
45)
46
47target_link_libraries(ReactorBenchmarks
48    PRIVATE
49        benchmark::benchmark
50        marl
51        Reactor
52        ${ROOT_PROJECT_LINK_LIBRARIES}
53)
54