forked from NaC-L/Mergen
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcmake.toml
More file actions
84 lines (69 loc) · 2.72 KB
/
cmake.toml
File metadata and controls
84 lines (69 loc) · 2.72 KB
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
[cmake]
version = "3.16"
cmkr-include = "cmake/cmkr.cmake;"
[project]
name = "Mergen"
[conditions]
windows = "WIN32"
testmode = "DEFINED MERGEN_TEST"
[variables]
CMAKE_MODULE_PATH = "${CMAKE_CURRENT_SOURCE_DIR}/cmake"
CMAKE_CXX_FLAGS_DEBUG = "-O0 -gfull"
[fetch-content.linux-pe]
git = "https://github.com/can1357/linux-pe"
tag = "be6d1f6"
[find-package.Iced-Wrapper]
[fetch-content.Zydis]
condition = "ICED_NOT_FOUND"
git = "https://github.com/zyantific/zydis"
tag = "v4.1.0"
[fetch-content.magic_enum]
git = "https://github.com/Neargye/magic_enum"
tag = "a413fcc"
[find-package.LLVM-Wrapper]
[target.lifter]
type = "executable"
sources = ["lifter/core/*.cpp", "lifter/analysis/*.cpp", "lifter/test/*.cpp"]
headers = [
"lifter/core/*.h", "lifter/core/*.hpp",
"lifter/semantics/*.hpp", "lifter/semantics/*.ipp",
"lifter/disasm/*.h", "lifter/disasm/*.hpp",
"lifter/memory/*.h", "lifter/memory/*.hpp", "lifter/memory/*.ipp",
"lifter/analysis/*.h", "lifter/analysis/*.hpp", "lifter/analysis/*.ipp",
"lifter/test/*.h", "lifter/test/*.hpp"
]
include-directories = ["lifter/core", "lifter/semantics", "lifter/disasm", "lifter/memory", "lifter/analysis", "lifter/test"]
link-libraries = ["LLVM-Wrapper", "linux-pe", "magic_enum"]
ICED_NOT_FOUND.link-libraries = ["Zydis"]
ICED_FOUND.link-libraries = ["Iced_Wrapper"]
windows.link-libraries = ["Ws2_32"]
compile-features = ["cxx_std_20"]
testmode.compile-definitions = ["MERGEN_TEST"]
windows.compile-options = [
"$<$<BOOL:${MSVC}>:/EHsc>",
"$<$<AND:$<BOOL:${MSVC}>,$<NOT:$<CXX_COMPILER_ID:Clang>>>:/Zc:preprocessor>"
]
# rewrite_microtests is a clone of lifter with MERGEN_TEST always defined.
# cmkr lacks target inheritance, so fields are duplicated — keep in sync with [target.lifter].
[target.rewrite_microtests]
type = "executable"
sources = ["lifter/core/*.cpp", "lifter/analysis/*.cpp", "lifter/test/*.cpp"]
headers = [
"lifter/core/*.h", "lifter/core/*.hpp",
"lifter/semantics/*.hpp", "lifter/semantics/*.ipp",
"lifter/disasm/*.h", "lifter/disasm/*.hpp",
"lifter/memory/*.h", "lifter/memory/*.hpp", "lifter/memory/*.ipp",
"lifter/analysis/*.h", "lifter/analysis/*.hpp", "lifter/analysis/*.ipp",
"lifter/test/*.h", "lifter/test/*.hpp"
]
include-directories = ["lifter/core", "lifter/semantics", "lifter/disasm", "lifter/memory", "lifter/analysis", "lifter/test"]
link-libraries = ["LLVM-Wrapper", "linux-pe", "magic_enum"]
ICED_NOT_FOUND.link-libraries = ["Zydis"]
ICED_FOUND.link-libraries = ["Iced_Wrapper"]
windows.link-libraries = ["Ws2_32"]
compile-features = ["cxx_std_20"]
compile-definitions = ["MERGEN_TEST"]
windows.compile-options = [
"$<$<BOOL:${MSVC}>:/EHsc>",
"$<$<AND:$<BOOL:${MSVC}>,$<NOT:$<CXX_COMPILER_ID:Clang>>>:/Zc:preprocessor>"
]