-
Notifications
You must be signed in to change notification settings - Fork 43
/
cmake.toml
202 lines (183 loc) · 4.69 KB
/
cmake.toml
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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
# Reference: https://build-cpp.github.io/cmkr/cmake-toml
[cmake]
version = "3.25"
[project]
name = "zasm"
languages = ["CXX"]
[options]
ZASM_BUILD_TESTS = "root"
ZASM_BUILD_BENCHMARKS = "root"
ZASM_BUILD_EXAMPLES = "root"
[subdir.thirdparty]
[target.zasm_common]
type = "interface"
msvc.compile-options = ["/bigobj", "/MP", "/W3", "/permissive-"]
compile-features = ["cxx_std_17"]
alias = "zasm::common"
[target.zasm]
type = "static"
alias = "zasm::zasm"
sources = [
"zasm/src/**.cpp",
]
headers = [
"zasm/src/**.hpp",
"zasm/include/**.hpp",
]
include-directories = ["zasm/include"]
link-libraries = [
"zasm::common",
"Zydis",
]
[target.zasm_testdata]
condition = "build-tests"
type = "interface"
alias = "zasm::testdata"
include-directories = ["testdata/include"]
[target.zasm_tests]
condition = "build-tests"
type = "executable"
sources = [
"tests/src/**.cpp",
]
headers = [
"tests/src/**.hpp",
]
link-libraries = [
"zasm::common",
"zasm::zasm",
"zasm::testdata",
"GTest::gtest",
]
[target.zasm_tests.properties]
PROJECT_LABEL = "tests"
[target.zasm_benchmarks]
condition = "build-benchmarks"
type = "executable"
sources = [
"benchmark/src/**.cpp",
]
headers = [
"benchmark/src/**.hpp",
]
link-libraries = [
"zasm::common",
"zasm::zasm",
"zasm::testdata",
"benchmark::benchmark",
]
[target.zasm_benchmarks.properties]
PROJECT_LABEL = "benchmarks"
[target.zasm_example_common]
condition = "build-examples"
type = "interface"
alias = "zasm::examples::common"
include-directories = ["examples/common"]
link-libraries = [
"zasm::common",
"zasm::zasm"
]
## Examples
[target.zasm_example_assembler_basic]
condition = "build-examples"
type = "executable"
sources = ["examples/assembler_basic/main.cpp"]
link-libraries = [
"zasm::examples::common",
]
[target.zasm_example_assembler_basic.properties]
FOLDER = "examples"
PROJECT_LABEL = "assembler_basic"
RUNTIME_OUTPUT_NAME = "example.assembler_basic"
[target.zasm_example_assembler_sections]
condition = "build-examples"
type = "executable"
sources = ["examples/assembler_sections/main.cpp"]
link-libraries = [
"zasm::examples::common",
]
[target.zasm_example_assembler_sections.properties]
FOLDER = "examples"
PROJECT_LABEL = "assembler_sections"
RUNTIME_OUTPUT_NAME = "example.assembler_sections"
[target.zasm_example_decode_to_assembler]
condition = "build-examples"
type = "executable"
sources = ["examples/decode_to_assembler/main.cpp"]
link-libraries = [
"zasm::examples::common",
]
[target.zasm_example_decode_to_assembler.properties]
FOLDER = "examples"
PROJECT_LABEL = "decode_to_assembler"
RUNTIME_OUTPUT_NAME = "example.decode_to_assembler"
[target.zasm_example_program_observer]
condition = "build-examples"
type = "executable"
sources = ["examples/program_observer/main.cpp"]
link-libraries = [
"zasm::examples::common",
]
[target.zasm_example_program_observer.properties]
FOLDER = "examples"
PROJECT_LABEL = "program_observer"
RUNTIME_OUTPUT_NAME = "example.program_observer"
[target.zasm_example_instruction_info]
condition = "build-examples"
type = "executable"
sources = ["examples/instruction_info/main.cpp"]
link-libraries = [
"zasm::examples::common",
]
[target.zasm_example_instruction_info.properties]
FOLDER = "examples"
PROJECT_LABEL = "instruction_info"
RUNTIME_OUTPUT_NAME = "example.instruction_info"
[target.zasm_example_modify_program]
condition = "build-examples"
type = "executable"
sources = ["examples/modify_program/main.cpp"]
link-libraries = [
"zasm::examples::common",
]
[target.zasm_example_modify_program.properties]
FOLDER = "examples"
PROJECT_LABEL = "modify_program"
RUNTIME_OUTPUT_NAME = "example.modify_program"
[target.zasm_example_basic_jit]
condition = "build-examples"
type = "executable"
sources = ["examples/basic_jit/main.cpp"]
link-libraries = [
"zasm::examples::common",
]
[target.zasm_example_basic_jit.properties]
FOLDER = "examples"
PROJECT_LABEL = "basic_jit"
RUNTIME_OUTPUT_NAME = "example.basic_jit"
[target.zasm_example_modify_instruction]
condition = "build-examples"
type = "executable"
sources = ["examples/modify_instruction/main.cpp"]
link-libraries = [
"zasm::examples::common",
]
[target.zasm_example_modify_instruction.properties]
FOLDER = "examples"
PROJECT_LABEL = "modify_instruction"
RUNTIME_OUTPUT_NAME = "example.modify_instruction"
[target.zasm_example_memory_operands]
condition = "build-examples"
type = "executable"
sources = ["examples/memory_operands/main.cpp"]
link-libraries = [
"zasm::examples::common",
]
[target.zasm_example_memory_operands.properties]
FOLDER = "examples"
PROJECT_LABEL = "memory_operands"
RUNTIME_OUTPUT_NAME = "example.memory_operands"
[[test]]
condition = "build-tests"
name = "tests"
command = "$<TARGET_FILE:zasm_tests>"