This repository has been archived by the owner on May 18, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathCMakeLists.txt
executable file
·92 lines (85 loc) · 4.06 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
# ┌──────────────────────────────────────────────────────────────────┐
# Hello, World! This is another reverse engineering tool
# inspired by Cheat Engine. Feel free to contribute!
# └──────────────────────────────────────────────────────────────────┘
cmake_minimum_required(VERSION 3.13.1) # todo[medium]: set lowest possible cmake version
project("Reverse Engine")
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/utils/cmake")
include(cheats)
#include(legacy)
include(external)
include(PVS-Studio)
# ┌──────────────────────────────────────────────────────────────────┐
# Checks
# └──────────────────────────────────────────────────────────────────┘
if (NOT EXISTS "/proc/self/maps")
message(FATAL_ERROR "This system does not seem to have /proc/self/maps files.")
endif()
# ┌──────────────────────────────────────────────────────────────────┐
# Project structure
# └──────────────────────────────────────────────────────────────────┘
add_subdirectory(reverseengine)
add_subdirectory(GUI)
#add_subdirectory(CLI)
add_subdirectory(example)
if (EXISTS ${CMAKE_SOURCE_DIR}/main.cc)
set(RE_TEST MAIN_CC)
add_executable(${RE_TEST} main.cc)
# add_dependencies(${RE_TEST} ex_all)
set(USE_OPENMP 1)
# set(USE_OPENACC 1)
if (USE_OPENMP)
message(STATUS "Using OpenMP")
target_compile_options(${RE_TEST} PUBLIC "$<$<STREQUAL:${CMAKE_CXX_COMPILER_ID},Intel>:-qopenmp>")
target_compile_options(${RE_TEST} PUBLIC "$<$<STREQUAL:${CMAKE_CXX_COMPILER_ID},GNU>:-fopenmp>")
target_compile_options(${RE_TEST} PUBLIC "$<$<STREQUAL:${CMAKE_CXX_COMPILER_ID},Clang>:-fopenmp>")
target_link_libraries(${RE_TEST} PUBLIC
-fopenmp
)
target_compile_definitions(${RE_TEST} PUBLIC
-DOMPTARGET_DEBUG
)
endif()
# if (USE_OPENACC)
# message(STATUS "Using OpenACC")
# target_compile_options(${RE_TEST} PUBLIC "$<$<STREQUAL:${CMAKE_CXX_COMPILER_ID},Intel>:-openacc>")
# target_compile_options(${RE_TEST} PUBLIC "$<$<STREQUAL:${CMAKE_CXX_COMPILER_ID},GNU>:-fopenacc>")
# target_compile_options(${RE_TEST} PUBLIC "$<$<STREQUAL:${CMAKE_CXX_COMPILER_ID},Clang>:-openacc>")
# endif()
set_property(TARGET ${RE_TEST} PROPERTY CXX_STANDARD 20)
target_compile_options(${RE_TEST} PUBLIC
-O0
-g3
-Wall
)
find_package(Boost)
target_include_directories(${RE_TEST} PUBLIC
${Boost_INCLUDE_DIR}
${RE_INCLUDE_DIRS}
${R2_INCLUDE_DIRS}
)
target_link_directories(${RE_TEST} PUBLIC
${Boost_LIBRARY_DIR}
)
target_compile_definitions(${RE_TEST} PUBLIC
# -DLLVM_TARGETS_TO_BUILD="all"
)
target_link_libraries(${RE_TEST} PUBLIC
${Boost_LIBRARIES}
boost_serialization
boost_iostreams
stdc++fs
rt
${RE_LIBRARIES}
${R2_LIBRARIES}
reverseengine
)
pvs_studio_add_target(TARGET ${RE_TEST}.PVS ALL
OUTPUT FORMAT errorfile
ANALYZE ${RE_TEST}
MODE GA:1,2 OP
LOG target.err
LICENSE /home/user/bin/a
BIN /home/user/bin/pvs-studio-analyzer
)
endif()