-
Notifications
You must be signed in to change notification settings - Fork 61
/
CMakeLists.txt
211 lines (161 loc) · 5.03 KB
/
CMakeLists.txt
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
203
204
205
206
207
208
209
210
211
# This file is automatically generated from cmake.toml - DO NOT EDIT
# See https://github.com/build-cpp/cmkr for more information
cmake_minimum_required(VERSION 3.15)
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
message(FATAL_ERROR "In-tree builds are not supported. Run CMake from a separate directory: cmake -B build")
endif()
set(CMKR_ROOT_PROJECT OFF)
if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
set(CMKR_ROOT_PROJECT ON)
# Bootstrap cmkr and automatically regenerate CMakeLists.txt
include("cmake/cmkr.cmake" OPTIONAL RESULT_VARIABLE CMKR_INCLUDE_RESULT)
if(CMKR_INCLUDE_RESULT)
cmkr()
endif()
# Enable folder support
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
# Create a configure-time dependency on cmake.toml to improve IDE support
configure_file(cmake.toml cmake.toml COPYONLY)
endif()
# Variables
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
set(GFLAGS_USE_TARGET_NAMESPACE ON)
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -gfull")
project(remill-workshop)
# Packages
find_package(Z3 REQUIRED)
find_package(LLVM-Wrapper REQUIRED)
find_package(remill REQUIRED)
find_package(LIEF REQUIRED)
# Subdirectory: helpers
set(CMKR_CMAKE_FOLDER ${CMAKE_FOLDER})
if(CMAKE_FOLDER)
set(CMAKE_FOLDER "${CMAKE_FOLDER}/helpers")
else()
set(CMAKE_FOLDER helpers)
endif()
add_subdirectory(helpers)
set(CMAKE_FOLDER ${CMKR_CMAKE_FOLDER})
# Target: remill-lift
set(remill-lift_SOURCES
"src/remill-lift.cpp"
cmake.toml
)
add_executable(remill-lift)
target_sources(remill-lift PRIVATE ${remill-lift_SOURCES})
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${remill-lift_SOURCES})
target_compile_features(remill-lift PRIVATE
cxx_std_20
)
target_link_libraries(remill-lift PRIVATE
LLVM-Wrapper
remill
remill_settings
)
target_link_libraries(remill-lift PRIVATE
LIEF::LIEF
)
get_directory_property(CMKR_VS_STARTUP_PROJECT DIRECTORY ${PROJECT_SOURCE_DIR} DEFINITION VS_STARTUP_PROJECT)
if(NOT CMKR_VS_STARTUP_PROJECT)
set_property(DIRECTORY ${PROJECT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT remill-lift)
endif()
# Target: api-basics
set(api-basics_SOURCES
"src/api-basics.cpp"
cmake.toml
)
add_executable(api-basics)
target_sources(api-basics PRIVATE ${api-basics_SOURCES})
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${api-basics_SOURCES})
target_compile_features(api-basics PRIVATE
cxx_std_20
)
target_link_libraries(api-basics PRIVATE
LLVM-Wrapper
remill
remill_settings
)
get_directory_property(CMKR_VS_STARTUP_PROJECT DIRECTORY ${PROJECT_SOURCE_DIR} DEFINITION VS_STARTUP_PROJECT)
if(NOT CMKR_VS_STARTUP_PROJECT)
set_property(DIRECTORY ${PROJECT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT api-basics)
endif()
# Target: bc-tool
set(bc-tool_SOURCES
"src/bc-tool.cpp"
cmake.toml
)
add_executable(bc-tool)
target_sources(bc-tool PRIVATE ${bc-tool_SOURCES})
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${bc-tool_SOURCES})
target_compile_features(bc-tool PRIVATE
cxx_std_20
)
target_link_libraries(bc-tool PRIVATE
LLVM-Wrapper
remill
remill_settings
)
get_directory_property(CMKR_VS_STARTUP_PROJECT DIRECTORY ${PROJECT_SOURCE_DIR} DEFINITION VS_STARTUP_PROJECT)
if(NOT CMKR_VS_STARTUP_PROJECT)
set_property(DIRECTORY ${PROJECT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT bc-tool)
endif()
# Target: bc-demangle
set(bc-demangle_SOURCES
"src/bc-demangle.cpp"
cmake.toml
)
add_executable(bc-demangle)
target_sources(bc-demangle PRIVATE ${bc-demangle_SOURCES})
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${bc-demangle_SOURCES})
target_compile_features(bc-demangle PRIVATE
cxx_std_20
)
target_link_libraries(bc-demangle PRIVATE
LLVM-Wrapper
remill
remill_settings
)
get_directory_property(CMKR_VS_STARTUP_PROJECT DIRECTORY ${PROJECT_SOURCE_DIR} DEFINITION VS_STARTUP_PROJECT)
if(NOT CMKR_VS_STARTUP_PROJECT)
set_property(DIRECTORY ${PROJECT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT bc-demangle)
endif()
# Target: bc-annotate
set(bc-annotate_SOURCES
"src/bc-annotate.cpp"
cmake.toml
)
add_executable(bc-annotate)
target_sources(bc-annotate PRIVATE ${bc-annotate_SOURCES})
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${bc-annotate_SOURCES})
target_compile_features(bc-annotate PRIVATE
cxx_std_20
)
target_link_libraries(bc-annotate PRIVATE
LLVM-Wrapper
remill
remill_settings
)
get_directory_property(CMKR_VS_STARTUP_PROJECT DIRECTORY ${PROJECT_SOURCE_DIR} DEFINITION VS_STARTUP_PROJECT)
if(NOT CMKR_VS_STARTUP_PROJECT)
set_property(DIRECTORY ${PROJECT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT bc-annotate)
endif()
# Target: ram-cleaner
set(ram-cleaner_SOURCES
"src/ram-cleaner.cpp"
cmake.toml
)
add_executable(ram-cleaner)
target_sources(ram-cleaner PRIVATE ${ram-cleaner_SOURCES})
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${ram-cleaner_SOURCES})
target_compile_features(ram-cleaner PRIVATE
cxx_std_20
)
target_link_libraries(ram-cleaner PRIVATE
LLVM-Wrapper
remill
remill_settings
)
get_directory_property(CMKR_VS_STARTUP_PROJECT DIRECTORY ${PROJECT_SOURCE_DIR} DEFINITION VS_STARTUP_PROJECT)
if(NOT CMKR_VS_STARTUP_PROJECT)
set_property(DIRECTORY ${PROJECT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT ram-cleaner)
endif()