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