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