• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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    ${WARNINGS_AS_ERRORS}
18)
19
20set(ROOT_PROJECT_LINK_LIBRARIES
21    ${OS_LIBS}
22    ${SWIFTSHADER_LIBS}
23)
24
25set(REACTOR_UNIT_TESTS_SRC_FILES
26    main.cpp
27    ReactorUnitTests.cpp
28)
29
30add_executable(ReactorUnitTests
31    ${REACTOR_UNIT_TESTS_SRC_FILES}
32)
33
34target_compile_features(ReactorUnitTests
35    PUBLIC
36        cxx_std_17
37)
38
39set_target_properties(ReactorUnitTests PROPERTIES
40    FOLDER "Tests"
41    RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}"
42)
43
44target_compile_options(ReactorUnitTests
45    PRIVATE
46        ${ROOT_PROJECT_COMPILE_OPTIONS}
47)
48
49target_link_options(ReactorUnitTests
50    PRIVATE
51        ${SWIFTSHADER_LINK_FLAGS}
52)
53
54target_link_libraries(ReactorUnitTests
55    PRIVATE
56        ${Reactor}
57        gtest
58        ${ROOT_PROJECT_LINK_LIBRARIES}
59)
60