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(SYSTEM_BENCHMARKS_SRC_FILES 25 main.cpp 26 LRUCacheBenchmarks.cpp 27 MathBenchmarks.cpp 28) 29 30add_executable(system-benchmarks 31 ${SYSTEM_BENCHMARKS_SRC_FILES} 32) 33 34set_target_properties(system-benchmarks PROPERTIES 35 FOLDER "Tests/Benchmarks" 36 RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" 37) 38 39target_compile_options(system-benchmarks 40 PRIVATE 41 ${ROOT_PROJECT_COMPILE_OPTIONS} 42) 43 44target_link_options(system-benchmarks 45 PRIVATE 46 ${SWIFTSHADER_LINK_FLAGS} 47) 48 49target_link_libraries(system-benchmarks 50 PRIVATE 51 benchmark::benchmark 52 vk_system 53 gtest 54 gmock 55 ${ROOT_PROJECT_LINK_LIBRARIES} 56) 57