aboutsummaryrefslogtreecommitdiff
path: root/backend/unittests/CodeGen/CMakeLists.txt
blob: eb4dbfedba1cdcba4b6a5476931719d6d03387e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
# SPDX-License-Identifier: GPL-3.0-or-later

set(
  RCCBackendCodeGenTestSources
  CoreTypesTest.cpp
  InstructionDescriptorTest.cpp
  MachineConstantPoolTest.cpp
  MachineFrameInfoTest.cpp
  MachineFunctionClonerTest.cpp
  MachineIRBuilderTest.cpp
  MachineIRCoreTest.cpp
  MachineJumpTableInfoTest.cpp
  MachineVerifierTest.cpp
  MachineValueTypesTest.cpp
  TargetConstantTest.cpp
)

add_executable(RCCBackendCodeGenCoreTypesTests CoreTypesTest.cpp)
rcc_backend_configure_target(RCCBackendCodeGenCoreTypesTests)
target_link_libraries(RCCBackendCodeGenCoreTypesTests PRIVATE RCCBackend::CodeGen)

add_test(NAME RCCBackend.CodeGen.CoreTypes COMMAND RCCBackendCodeGenCoreTypesTests)

add_executable(
  RCCBackendCodeGenInstructionDescriptorTests
  InstructionDescriptorTest.cpp
)
rcc_backend_configure_target(RCCBackendCodeGenInstructionDescriptorTests)
target_link_libraries(
  RCCBackendCodeGenInstructionDescriptorTests
  PRIVATE RCCBackend::CodeGen
)

add_test(
  NAME RCCBackend.CodeGen.InstructionDescriptor
  COMMAND RCCBackendCodeGenInstructionDescriptorTests
)

add_executable(RCCBackendCodeGenMachineConstantPoolTests MachineConstantPoolTest.cpp)
rcc_backend_configure_target(RCCBackendCodeGenMachineConstantPoolTests)
target_link_libraries(RCCBackendCodeGenMachineConstantPoolTests PRIVATE RCCBackend::CodeGen)

add_test(
  NAME RCCBackend.CodeGen.MachineConstantPool
  COMMAND RCCBackendCodeGenMachineConstantPoolTests
)

add_executable(RCCBackendCodeGenMachineFrameInfoTests MachineFrameInfoTest.cpp)
rcc_backend_configure_target(RCCBackendCodeGenMachineFrameInfoTests)
target_link_libraries(RCCBackendCodeGenMachineFrameInfoTests PRIVATE RCCBackend::CodeGen)

add_test(
  NAME RCCBackend.CodeGen.MachineFrameInfo
  COMMAND RCCBackendCodeGenMachineFrameInfoTests
)

add_executable(
  RCCBackendCodeGenMachineFunctionClonerTests
  MachineFunctionClonerTest.cpp
)
rcc_backend_configure_target(RCCBackendCodeGenMachineFunctionClonerTests)
target_link_libraries(
  RCCBackendCodeGenMachineFunctionClonerTests
  PRIVATE RCCBackend::CodeGen
)

add_test(
  NAME RCCBackend.CodeGen.MachineFunctionCloner
  COMMAND RCCBackendCodeGenMachineFunctionClonerTests
)

add_executable(RCCBackendCodeGenMachineIRBuilderTests MachineIRBuilderTest.cpp)
rcc_backend_configure_target(RCCBackendCodeGenMachineIRBuilderTests)
target_link_libraries(
  RCCBackendCodeGenMachineIRBuilderTests
  PRIVATE RCCBackend::CodeGen
)

add_test(
  NAME RCCBackend.CodeGen.MachineIRBuilder
  COMMAND RCCBackendCodeGenMachineIRBuilderTests
)

add_executable(RCCBackendCodeGenMachineVerifierTests MachineVerifierTest.cpp)
rcc_backend_configure_target(RCCBackendCodeGenMachineVerifierTests)
target_link_libraries(
  RCCBackendCodeGenMachineVerifierTests
  PRIVATE RCCBackend::CodeGen
)

add_test(
  NAME RCCBackend.CodeGen.MachineVerifier
  COMMAND RCCBackendCodeGenMachineVerifierTests
)

add_executable(RCCBackendCodeGenMachineValueTypesTests MachineValueTypesTest.cpp)
rcc_backend_configure_target(RCCBackendCodeGenMachineValueTypesTests)
target_link_libraries(RCCBackendCodeGenMachineValueTypesTests PRIVATE RCCBackend::CodeGen)

add_test(
  NAME RCCBackend.CodeGen.MachineValueTypes
  COMMAND RCCBackendCodeGenMachineValueTypesTests
)

add_executable(RCCBackendCodeGenMachineIRCoreTests MachineIRCoreTest.cpp)
rcc_backend_configure_target(RCCBackendCodeGenMachineIRCoreTests)
target_link_libraries(RCCBackendCodeGenMachineIRCoreTests PRIVATE RCCBackend::CodeGen)

add_test(
  NAME RCCBackend.CodeGen.MachineIRCore
  COMMAND RCCBackendCodeGenMachineIRCoreTests
)

add_executable(RCCBackendCodeGenMachineJumpTableInfoTests MachineJumpTableInfoTest.cpp)
rcc_backend_configure_target(RCCBackendCodeGenMachineJumpTableInfoTests)
target_link_libraries(RCCBackendCodeGenMachineJumpTableInfoTests PRIVATE RCCBackend::CodeGen)

add_test(
  NAME RCCBackend.CodeGen.MachineJumpTableInfo
  COMMAND RCCBackendCodeGenMachineJumpTableInfoTests
)

add_executable(RCCBackendCodeGenTargetConstantTests TargetConstantTest.cpp)
rcc_backend_configure_target(RCCBackendCodeGenTargetConstantTests)
target_link_libraries(RCCBackendCodeGenTargetConstantTests PRIVATE RCCBackend::CodeGen)

add_test(
  NAME RCCBackend.CodeGen.TargetConstant
  COMMAND RCCBackendCodeGenTargetConstantTests
)

rcc_backend_register_format_files(
  "${CMAKE_CURRENT_SOURCE_DIR}/CoreTypesTest.cpp"
  "${CMAKE_CURRENT_SOURCE_DIR}/InstructionDescriptorTest.cpp"
  "${CMAKE_CURRENT_SOURCE_DIR}/MachineConstantPoolTest.cpp"
  "${CMAKE_CURRENT_SOURCE_DIR}/MachineFrameInfoTest.cpp"
  "${CMAKE_CURRENT_SOURCE_DIR}/MachineFunctionClonerTest.cpp"
  "${CMAKE_CURRENT_SOURCE_DIR}/MachineIRBuilderTest.cpp"
  "${CMAKE_CURRENT_SOURCE_DIR}/MachineIRCoreTest.cpp"
  "${CMAKE_CURRENT_SOURCE_DIR}/MachineJumpTableInfoTest.cpp"
  "${CMAKE_CURRENT_SOURCE_DIR}/MachineVerifierTest.cpp"
  "${CMAKE_CURRENT_SOURCE_DIR}/MachineValueTypesTest.cpp"
  "${CMAKE_CURRENT_SOURCE_DIR}/TargetConstantTest.cpp"
)
rcc_backend_register_tidy_files(
  "${CMAKE_CURRENT_SOURCE_DIR}/CoreTypesTest.cpp"
  "${CMAKE_CURRENT_SOURCE_DIR}/InstructionDescriptorTest.cpp"
  "${CMAKE_CURRENT_SOURCE_DIR}/MachineConstantPoolTest.cpp"
  "${CMAKE_CURRENT_SOURCE_DIR}/MachineFrameInfoTest.cpp"
  "${CMAKE_CURRENT_SOURCE_DIR}/MachineFunctionClonerTest.cpp"
  "${CMAKE_CURRENT_SOURCE_DIR}/MachineIRBuilderTest.cpp"
  "${CMAKE_CURRENT_SOURCE_DIR}/MachineIRCoreTest.cpp"
  "${CMAKE_CURRENT_SOURCE_DIR}/MachineJumpTableInfoTest.cpp"
  "${CMAKE_CURRENT_SOURCE_DIR}/MachineVerifierTest.cpp"
  "${CMAKE_CURRENT_SOURCE_DIR}/MachineValueTypesTest.cpp"
  "${CMAKE_CURRENT_SOURCE_DIR}/TargetConstantTest.cpp"
)